スキル一覧に戻る
phonowell

invoke-opencode-acp

by phonowell

Claude Code CLI skill that delegates complex tasks to an OpenCode subagent via ACP protocol, saving 50-90% tokens.

6🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: invoke-opencode-acp description: Delegate complex tasks to OpenCode subagent, use when >=2 file modifications or batch operations allowed-tools: Bash

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 protocol
  • opencode acp > run/serve (avoid HTTP)

Constraints

  • Default sandbox blocks writes to ~/.config/opencode and ~/.cache/opencode and blocks network
  • First run plugin install ~30s; acp_client.cjs default SESSION_TIMEOUT=10s
  • Fix: run acp_client.cjs outside sandbox to allow ~ writes and network; or install once then retry; or raise SESSION_TIMEOUT > 30s
  • Evidence: ~/.local/share/opencode/log/*.log records bun add/install and duration

Workflow

  1. Pick timeout: simple >=180s / medium >=600s / complex >=1800s
  2. If first run or PermissionDenied/Timeout(10000ms) -> retry non-sandbox or install then retry
  3. Run:
node ~/.claude/skills/invoke-opencode-acp/acp_client.cjs "$PWD" "task description" -o /tmp/output.txt -t 300
  1. Listen session/update -> drop <thinking> -> result.stopReason === 'end_turn'
  2. 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

スコア

総合スコア

75/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です