naicud

opencode-routing

Use when the user EXPLICITLY asks for subagents, delegation, OpenCode workers, parallel workers, background tasks or fan-out work — routes heavy work to OpenCode via the opencode-delegate subagent or the delegate/fanOut tools of the `oc` MCP server. NEVER route proactively on your own judgment; do NOT route routine single-file edits, quick questions, exploration or anything you can finish in a couple of steps.

naicud 0 Updated 1mo ago
GitHub

Install

npx skillscat add naicud/opencode-plugin-cc/opencode-routing

Install via the SkillsCat registry.

SKILL.md

OpenCode Routing Guide

Decide WHEN work should leave this thread, then hand it off correctly.

Route to OpenCode (proactively)

  • User explicitly asks for subagents, delegates, parallel/background workers, fan-out.
  • Heavy implementation: multi-file refactors, migrations, large test suites, builds with long verification loops.
  • Reviews/audits that benefit from an isolated reviewer persona (persona: "reviewer").
  • Several independent chunks of work at once → fanOut (up to 12) + waitAll.
  • The task needs its own workspace blast-radius isolation → scope it explicitly in the task text (files in/out of scope); the subagent itself runs in the caller's directory, no worktree isolation.

Keep on the main thread (do NOT delegate)

  • Single-file edits, typo fixes, one-function changes.
  • Exploration, lookups, quick questions, reading code.
  • Anything where shaping a full task contract costs more than doing the work.

When unsure, do it yourself. Delegation pays only when the task is self-contained and verifiable.

How to hand off

  1. Prefer spawning the opencode-delegate subagent for substantial single tasks; it runs the full supervise+verify loop itself.
  2. Or call the oc MCP tools directly:
    • delegate {task} — omit tier/model; the resolver applies the default free tier and max effort.
    • wait {sessionID} until idle / needsInput / timeout.
    • logs {sessionID} to see the agent's streamed reasoning, output and permission asks live.
    • diff {sessionID} for blast radius; verify .oc-report.md yourself before trusting success.
  3. Parallel batches: fanOut once per batch, then waitAll.

Task quality bar

A delegable task states goal (one sentence), in-scope files, verifiable acceptance criteria, and a verification command. Vague asks must be tightened BEFORE delegating (see opencode-prompting).

Tool names by host

The tools below are the oc MCP server's, and each host qualifies them with its
own prefix. Call them under the name your host shows:

Host Qualified name
Claude Code mcp__plugin_opencode_oc__<tool>, e.g. mcp__plugin_opencode_oc__delegate
Codex mcp__oc__<tool>, e.g. mcp__oc__delegate

Everywhere else in this plugin's skills the bare name (delegate, wait,
fanOut, …) is used; prefix it for your host when you actually call it.