Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.77 KB

OPENCODE.md

File metadata and controls

47 lines (34 loc) · 1.77 KB

OpenCode Adapter

Read AGENTS.md first - it carries the operating rules, the required reads, the session lifecycle, and the skill routing for every tool. This file is only what differs in OpenCode.

loop session-start --tool opencode --command "<slash-command>"
loop session-end --tool opencode

Two namespaces

OpenCode keeps skills and slash commands apart, so loop skills writes both:

Path Reached by
Skills ~/.config/opencode/skills/loop-<name>/SKILL.md The model, from the description
Slash commands ~/.config/opencode/command/<name>.md The user typing /<name>

Installing only skills leaves opencode debug skill listing every router while /plan-loop matches nothing. Verify both:

opencode debug skill      # routers the model can reach
opencode debug config     # the `command` block - what `/` completes

OpenCode also auto-loads ~/.claude/skills/ and ~/.agents/skills/ and dedupes by skill name, so every install writes name: loop-<command> to match its folder and stop those copies collapsing.

External-directory permission

loop skills grants app-root read access in ~/.config/opencode/opencode.json[c]:

"permission": { "external_directory": { "*": "ask", "~/.loop-engineer/**": "allow" } }

Without it, OpenCode prompts on the first loop command in every new product folder and the answer is always yes - a prompt that teaches people to click through prompts. OpenCode applies the last matching rule, so the broad ask is written first. An existing value is never overwritten, and non-plain-JSON config is left alone with the snippet printed instead, because OpenCode refuses to start on invalid config.

Config is read once at startup - restart OpenCode after installing.