Claude-skill-registry invoke-opencode-acp
Delegate complex tasks to OpenCode subagent, use when >=2 file modifications or batch operations
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/invoke-opencode-acp" ~/.claude/skills/majiayu000-claude-skill-registry-invoke-opencode-acp && rm -rf "$T"
manifest:
skills/data/invoke-opencode-acp/SKILL.mdsource content
invoke-opencode-acp
When to Use
- Triggers: >=2 file modifications / refactor / batch ops / code review / multi-step reasoning / git ops
- Avoid: single-file quick edits / recursive OpenCode calls
Core Intent
- Save tokens (50-90%) / main model decides / subagent executes details
Efficiency Priority
(this dir) > manual protocolacp_client.cjs
> run/serve (avoid HTTP)opencode acp
Constraints
- Default sandbox blocks writes to
and~/.config/opencode
and blocks network~/.cache/opencode - First run plugin install ~30s;
defaultacp_client.cjsSESSION_TIMEOUT=10s - Fix: run
outside sandbox to allowacp_client.cjs
writes and network; or install once then retry; or raise~
> 30sSESSION_TIMEOUT - Evidence:
records bun add/install and duration~/.local/share/opencode/log/*.log
Workflow
- Pick timeout: simple >=180s / medium >=600s / complex >=1800s
- If first run or PermissionDenied/Timeout(10000ms) -> retry non-sandbox or install then retry
- Run:
node ~/.claude/skills/invoke-opencode-acp/acp_client.cjs "$PWD" "task description" -o /tmp/output.txt -t 300
- Listen
-> dropsession/update
-><thinking>result.stopReason === 'end_turn' - Return: OK / Timeout:{reason} / Error:{reason}
Protocol Notes
->initialize
(cwd,mcpServers:[]) ->session/new
(prompt:[] shape)session/prompt- Error codes: -32001 not found / -32002 rejected / -32003 state / -32601 method / -32602 params
Dependencies
- Node.js
- OpenCode CLI:
npm install -g opencode