Invoke opencode acp
Skill phonowell/invoke-opencode-acp/skills/invoke-opencode-acp
Claude Code CLI skill that delegates complex tasks to an OpenCode subagent via ACP protocol, saving 50-90% tokens.
npx -y skills add phonowell/invoke-opencode-acp --skill invoke-opencode-acpAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Delegate complex tasks to OpenCode subagent, use when >=2 file modifications or batch operations
SKILL.md
1.7 KB, as published. Nobody here has run it
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
acp_client.cjs(this dir) > manual protocolopencode acp> run/serve (avoid HTTP)
Constraints
- Default sandbox blocks writes to
~/.config/opencodeand~/.cache/opencodeand blocks network - First run plugin install ~30s;
acp_client.cjsdefaultSESSION_TIMEOUT=10s - Fix: run
acp_client.cjsoutside sandbox to allow~writes and network; or install once then retry; or raiseSESSION_TIMEOUT> 30s - Evidence:
~/.local/share/opencode/log/*.logrecords bun add/install and duration
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
session/update-> drop<thinking>->result.stopReason === 'end_turn' - Return: OK / Timeout:{reason} / Error:{reason}
Protocol Notes
initialize->session/new(cwd,mcpServers:[]) ->session/prompt(prompt:[] shape)- Error codes: -32001 not found / -32002 rejected / -32003 state / -32601 method / -32602 params
Dependencies
- Node.js
- OpenCode CLI:
npm install -g opencode