Skip to content

Commit 18dce57

Browse files
committed
docs: point README and CLAUDE.md at the claudelegate skill
1 parent 8d7968e commit 18dce57

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The plugin's runtime behaviour lives in the markdown files below plus the bundle
1717

1818
| Surface | File | Role |
1919
| --------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20-
| Skill | `skills/opencode-delegate/SKILL.md` | Model picking, brief template, review-after-return rules |
20+
| Skill | `skills/claudelegate/SKILL.md` | Model picking, brief template, review-after-return rules |
2121
| Agent | `agents/opencode-worker.md` | Supervisor (`model: haiku`, `background: true`, no edit tools: Read/Grep/Glob/Bash/ToolSearch plus MCP `delegate`/`list_models`/`list_sessions`): the only caller of MCP `delegate`; never writes the solution itself; verifies git changes and tests, iterates at most twice, then rejects |
2222
| Command | `commands/opencode.md` | `/opencode <model> -- <task>`: splits on `--`, spawns `opencode-worker` |
2323
| Hook | `scripts/route-to-opencode.sh`, `scripts/guard-main-thread-mcp.sh`, `plugin-hooks/hooks.json` | PreToolUse `Agent\|Task`: rewrites only built-in subagent calls (general-purpose, claude, Explore, Plan, claude-code-guide, statusline-setup) to `claudelegate:opencode-worker` on Haiku (Explore/Plan/claude-code-guide forced read-only); custom, plugin, reviewer and SDD agents never routed; pass-through guards: `OPENCODE_DELEGATE_ROUTE=off`, missing opencode, `[no-opencode]`, no `jq`. Second PreToolUse entry (`guard-main-thread-mcp.sh`) denies this plugin's MCP `delegate`/`delegate_async` when the input has no `agent_id` (main thread); calls from `opencode-worker` pass |

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ claude ▸ reads git diff, runs tests, reports which model did what and a verdic
1313

1414
| Surface | File | Role |
1515
| ------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
16-
| Skill | `skills/opencode-delegate/SKILL.md` | Model picking, brief template, review-after-return rules |
16+
| Skill | `skills/claudelegate/SKILL.md` | Model picking, brief template, review-after-return rules |
1717
| Agent | `agents/opencode-worker.md` | Supervisor (`model: haiku`, `background: true`, no edit tools): calls MCP `delegate`, verifies, iterates |
1818
| Command | `commands/opencode.md` | `/opencode <model> -- <task>`: splits on `--`, spawns `opencode-worker` |
1919
| Hook | `scripts/route-to-opencode.sh` | PreToolUse hook (`plugin-hooks/hooks.json`): reroutes built-in subagent calls to `opencode-worker` |
2020
| Hook | `scripts/guard-main-thread-mcp.sh` | PreToolUse hook (`plugin-hooks/hooks.json`): denies `delegate`/`delegate_async` calls from the main thread |
2121
| MCP | `plugin.json` `mcpServers`, `dist/index.js` | `opencode` MCP server (bundled from `src/index.ts`): `delegate` and friends, called by `opencode-worker` |
2222

23-
The MCP server exposes seven tools: `delegate` (run and wait), `delegate_async` (background run, returns a task id), `task_result`, `task_list`, `task_cancel`, `list_models` and `list_sessions`. Only `opencode-worker` calls them: the main thread spawns the worker in the background, because `delegate` blocks the main thread and `delegate_async` tasks are lost when `/reload-plugins` restarts the server. A PreToolUse hook denies `delegate` and `delegate_async` calls made without an `agent_id` (the main thread). `dist/index.js` is a committed bundle (the installed plugin cache has no `node_modules`); rebuild it with `bun run build` after changing `src/`, CI fails if it is stale. Claude Desktop is not supported. A PreToolUse hook denies `delegate` and `delegate_async` calls made from the main thread, with a reason telling Claude to spawn `claudelegate:opencode-worker` in the background. Claude Code puts `agent_id` in the hook input only inside a subagent, so calls from the worker pass through. It passes through as well when `OPENCODE_DELEGATE_ROUTE` is falsy, `jq` is missing, or the input is not valid JSON.
23+
The MCP server exposes seven tools: `delegate` (run and wait), `delegate_async` (background run, returns a task id), `task_result`, `task_list`, `task_cancel`, `list_models` and `list_sessions`. Only `opencode-worker` calls them: the main thread spawns the worker in the background, because `delegate` blocks the main thread and `delegate_async` tasks are lost when `/reload-plugins` restarts the server. A PreToolUse hook denies `delegate` and `delegate_async` calls made without an `agent_id` (the main thread). `dist/index.js` is a committed bundle (the installed plugin cache has no `node_modules`); rebuild it with `bun run build` after changing `src/`, CI fails if it is stale. Claude Desktop is not supported.
2424

2525
## How it works
2626

0 commit comments

Comments
 (0)