Tool integration · OpenCode
How Foundry surfaces inside OpenCode, the terminal coding assistant.
Foundry currently supports four tools, all with the same full-skill install: Claude Code (.claude/skills/), Cursor and Codex (shared .agents/skills/), and OpenCode (.opencode/skills/). Other IDEs are not currently supported.
What the installer writes
When you select OpenCode during npx @engineering11/e11-foundry install, the installer writes complete skill directories into:
.opencode/skills/
├── e11-master/
│ ├── SKILL.md
│ └── customize.toml
├── e11-agent-dev/
│ ├── SKILL.md
│ └── customize.toml
├── ... # one directory per installed skill — agents, workflows, tasksOpenCode uses the opencode template type — a small variation on the default skill rendering (different header/frontmatter layout). The installer handles this automatically; the skill content is the same.
Legacy installs may have files under .opencode/agents/, .opencode/commands/, .opencode/agent/, or .opencode/command/ — the installer cleans these up on update.
Invoking a skill
OpenCode reads .opencode/skills/ and registers each directory:
> e11-master # the entry point — catalog menu + routing
> use the e11-agent-dev skill # become the Dev agent
> skill:e11-create-story # run a workflow directlyStart with e11-master when you don't know what you need; e11-help ([BH]) answers "what next?" from anywhere.
Picking a command
Same command codes as all other Foundry tool surfaces. Type the code or describe what you want; each agent's menu does fuzzy matching.
Full catalog: first-run.md or .foundry/_config/e11-help.csv.
Ancestor-directory conflict check
Same protection as the other supported tools — the installer refuses to write a Foundry install that conflicts with a parent-directory install. Pick one location and stick to it.
Headless
OpenCode is a supported runtime for Foundry's headless CLI:
e11 agent dev "run e11-dev-auto for story 3-2" --runtime opencode
e11 pipeline --runtime opencode # run .foundry/pipeline.yaml through OpenCodee11 agent assembles the skill's activation prompt and your task and drives the opencode CLI non-interactively; e11 pipeline chains agents through the artifacts they write to disk. See Unattended runs.
Tips
@engineering11/alloyreads happen in the current cwd. Install alloy in your project root and invoke OpenCode from there.- Fresh context for
[CR]Code Review. Open a new session rather than continuing the implementation session. - The
opencodetemplate only adapts the header. Functionally the skills are identical to those in.claude/skills/or.agents/skills/— if a Foundry skill works in Claude Code, it works here too. - Customize from
.foundry/custom/. Files under.opencode/skills/are overwritten on update; your overrides survive. See Customization.
What this page does not cover
- Authentication or model selection for OpenCode itself.
- OpenCode-specific session management.
Source
Platform config: tools/cli/installers/lib/ide/platform-codes.yaml (see the opencode: entry).
See also: Installation · First run · Claude Code · Codex.