Custom setup for Opencode: agents (system prompts defining a role), skills (instruction files loaded on demand) and a configuration snippet. It encodes my own workflow. Published as is.
How to install
Ask Opencode to install it:
Install https://coulon-jm.fr/opencode/agents.md
The agent downloads the files into ~/.config/opencode/, merges the configuration snippet, and reloads the configuration.
How to update
Ask Opencode to update it:
Update https://coulon-jm.fr/opencode/agents.md
If you ask opencode to "update its agents and skills", it should do the proper thing autonomously, but providing the URL is always clearer.
General behavior
Agents will behave for less autonomous operations, they will behave more like a peer that you work with. Agents will use local files in your current directory to keep track of tasks: that will improve efficiency of low complexity LLMs.
If you need a plain, straightforward agent: use Actions. Actions mode executes prompts in a straightforward way with no hidden mechanics, but it's limited to 12 rounds to avoid long unattended operations.
If you built a clean TODO list, you can ask the Code agent to work autonomously: it will execute tasks one by one and stop if anything looks wrong. All agents are made extra careful and cautious, they won't iterate wildly.
Agents
Seven agent files replace the two built-in agents. Primary agents are selected by the user. Subagents are launched by another agent to offload work.
| Agent | Mode | Role |
|---|---|---|
| Project | primary | Writing plans and specifications, managing todo lists, writing documentation. |
| Code | primary | Writing code from specs and plan files. Reports the issues found while implementing. |
| Actions | primary | Doing isolated actions on this computer or on the web, through the FoxPilot Firefox extension. |
| Research | primary | Autonomous research on a topic. Searches online and writes a report. |
| Brainstorm | primary | Interactive discussion to design things step by step, one topic at a time. Records pending topics in a file. |
| Subresearch | subagent | Does the actual research work for the Research agent. |
| Subagent | subagent | Executes simple but tedious tasks, such as searching a codebase or a documentation site. |
Skills
Skills are loaded on demand instead of sitting in every prompt.
| Skill | Purpose |
|---|---|
| speccing | Writing and editing specification files. |
| spec-implementation | Implementing a project from its specifications. |
| planning | Writing and editing plan files. |
| plan-implementation | Starting the implementation of a plan file. |
| item-list | Handling a file that holds a single tracked list: todo, issues, workarounds, steps. |
| session-history | Reading or searching a past session transcript to recover lost context. |
Impacting choices
These choices suit my own preferences and will not suit everybody.
- Question tool is disabled: it breaks the flow and pollutes the user's mind.
- Built-in agents are disabled: this discards the model-specific system prompts.
- Expression style is enforced: simpler language, pushback instead of compliance, efficiency over language quality.
- Subagent models are your choice: the installer asks which model free subagents use, and which model non-free subagents use. The free list starts with Big Pickle (opencode/big-pickle).
- Permissions are restricted per agent: Project writes markdown only, Brainstorm keeps its notes in two files, Research can only dispatch to Subresearch, Subresearch cannot edit files.
Typical workflow
Brainstorm
Use the brainstorm agent to brainstorm an idea. Good when starting a new project, a new feature, before creating specs.
- Switch to Brainstorm agent.
- Announce the main topic.
- The agent asks questions and guides you, focusing on each topic one by one.
- If new topics come to your mind during the process, announce them: the agent will add these to the list so they are not forgotten.
Specifications
Use the project agent to write specifications for the target system. Specifications will describe how the system should work once finished.
- Switch to the Project agent.
- Mention you want to start a specification and what part you want to specify.
- If you did a brainstorm before, mention brainstorm decisions to guide the agent.
- The agent will build the specification progressively, following the discussion.
- Either you check the spec manually or you go "full vibe" route and ask questions about the spec to challenge the agent.
Planning
Use the project agent to write an implementation plan. Writing a specification or brainstorming first is optional.
- Switch to the Project agent.
- Say you want to start a plan but you don't want the agent to write the plan yet. If you have specs or brainstorm, say so to guide the agent.
- Do a first description.
- Continue explaining and discussing with the agent.
- Once a first agreement is found, ask the agent to write the plan.
- Adjust the plan, check for issues.
Implementing things
When you have a plan, you can start implementing it.
- If you don't have a TODO list, switch to Project agent and ask the agent to produce a TODO list. Agents work better with a todo list to track their progress.
- Switch to the Code agent.
- Ask to implement the plan. By default, it will implement step by step, requiring manual intervention.
- If your plan is very clear or if you go test-driven, you can ask 'implement autonomously'. Autonomous operation does automated code reviews, so it may interrupt before the end in case of big issue.
Vibe coding
Switch to Code mode and just prompt. Occasionally, the agent will trigger code reviews to avoid drift.