OpenCode
This guide covers using Flow with OpenCode, the open-source AI coding agent. You will learn:
- How to install the Flow harness for OpenCode
- Where Flow writes its files in an OpenCode project
- How to invoke Flow's skills
Overview
Flow installs into OpenCode using its standard skill and command files. The harness docs index becomes a managed block in AGENTS.md, and every Flow skill becomes either a slash command under .opencode/commands/, a skill under .opencode/skills/, or both, depending on how the skill is meant to run.
AGENTS.md is also read by the OpenAI Codex CLI. If you install for both agents in the same project, they share the file without conflict: Flow upserts the same managed block on each install.
This page covers only the OpenCode specifics. If you have not added the Flow package to your project yet, start with the Installation guide.
Installing for OpenCode
Run the harness installer and select OpenCode at the agent prompt:
node ace flow:install
Flow detects OpenCode automatically when a .opencode directory or an opencode.json / opencode.jsonc file is present, so it is usually pre-selected. To target it directly and skip the agent prompt, pass the --agent flag:
node ace flow:install --agent=opencode
Where Flow writes its files
Installing for OpenCode adds the following to your project:
.flow/docs/holds the harness docs. This location is the same for every agent.AGENTS.mdgains the managed harness block: the docs index and the project facts. Flow upserts this block between comment markers and leaves the rest of the file untouched..opencode/commands/gains aflow-<skill>.mdfile for every skill that is meant to be invoked as a slash command. The spec-driven workflow skills install here..opencode/skills/gains aflow-<skill>/SKILL.mddirectory for skills that the agent loads on demand, alongside any reference files that skill ships. Engineering skills such as CRUDDY controllers install here.
The .flow/docs/ directory and the installed flow- entries are added to .gitignore, because the harness is regenerated by re-running the installer.
Invoking skills
Flow's skills are invoked as slash commands. The command file name is also the command name, so the skill at .opencode/commands/flow-brief.md is invoked as /flow-brief:
/flow-brief checkout-redesign
Every spec-driven workflow skill follows the same /flow-<name> pattern: /flow-blueprint, /flow-assert, /flow-build, /flow-sync, /flow-archive. A skill name with a dot uses a dash in the command, so the build.tdd skill is /flow-build-tdd.
The workflow skills are registered only as commands, so OpenCode will not trigger them on its own. They run only when you type the command, keeping you in control of when the workflow advances. Engineering skills such as CRUDDY controllers are an exception: OpenCode may invoke them automatically when it recognizes a relevant task.
Next steps
- Spec-driven development explains the workflow these skills implement.
- Knowledge base describes the harness docs OpenCode reads from.