agentleFS
aashahinaashahin/claude-opencode-delegate/skills/opencode-delegate/SKILL.md

opencode-delegate

Skill2 starsChanged 51 days agoMITView on GitHub

Delegate coding or analysis work to another model through OpenCode (Grok, Kimi, GLM, Qwen, DeepSeek, MiMo, MiniMax, GPT… anything `opencode models` lists) while Claude stays the orchestrator. Use when the user says things like "use grok 4.7 in opencode to implement X", "ask kimi via opencode", "delegate this to glm", "get a second opinion from deepseek", "have opencode do it", or asks to run/compare several OpenCode models, including from subagents and workflows.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. amElnagdy/delegate-skills★ 2.6ksame name
    2. sssemil/SKILLS★ 2same name
    3. digital8150/claude-delegate-skills★ 0same name
    4. EldinBegano/opencode-delegate★ 0same name
    5. letya999/opencode-delegate★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you get an ambiguous error, the name matched several different models.

    line 30
  2. Very specific:

    If the user names no model, omit model.

    line 33
  3. Distinctive:

    Report: ask for a short summary of the changes and anything left undone.

    line 46
  4. Very specific:

    Use files to attach key files.

    line 48
  5. Distinctive:

    Read the diff (git diff) for the files it lists.

    line 60
  6. Distinctive:

    Run the tests or build yourself.

    line 61
  7. Very specific:

    Fan out: call delegate_async once per model or subtask, then task_result with wait_s for each.

    line 68

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Delegating to OpenCode models

The opencode MCP server runs tasks with opencode run in the user's project. The delegated model has its own tools (read, edit, shell), so it can implement code, not just answer. You stay the orchestrator: you plan, write the brief, and review what comes back.

Tools

ToolUse
list_models (filter?)Find the exact provider/model id.
delegateRun a task and wait for the result.
delegate_async → task_result (wait_s)Long tasks, or several models in parallel. Also task_list, task_cancel.
list_sessionsFind a session_id to continue.

In a plugin install the tools are named like mcp__plugin_opencode-delegate_opencode__delegate. With a manual install they are mcp__opencode__delegate.

Picking the model

  • Pass what the user said: model: "grok 4.7", "kimi k3", "xai grok 4.7". The server matches loose names. If a model is offered by several providers, the model maker's own provider wins over resellers like opencode-go, so "grok 4.7" goes to xai/grok-4.7. A provider word in the name overrides this ("opencode-go grok 4.7" → opencode-go/…). Include the provider word only when the user names one.
  • If you get an ambiguous error, the name matched several different models. Choose from the candidates it lists, and ask the user only if their intent is unclear.
  • For a reasoning variant, add #variant, e.g. "xai/grok-4.7#high".
  • If the user names no model, omit model. Tasks that edit files get the default (opencode-go/muse-spark-1.3-contributor). Read-only tasks with auto: false get the free opencode/muse-spark-1.3-contributor-free. Use auto: false for reading or summarising files, answering questions about code, and reviews.

Writing the brief (prompt)

The delegated model cannot see this conversation. Write a self-contained brief:

  1. Goal: what to build or fix, and why.
  2. Context: the relevant files and paths, the existing patterns to follow, and the commands to build and test.
  3. Constraints: what not to touch, and the style to follow. Tell it not to commit unless you want a commit.
  4. Done when: the acceptance criteria, e.g. "bun test passes" or "prints X".
  5. Report: ask for a short summary of the changes and anything left undone.

Use files to attach key files. Keep cwd at the project root unless the task is scoped to a subdirectory.

Permissions

auto defaults to true. The model can edit files and run commands without asking, but opencode rules set to "deny" are still enforced. Pass auto: false for read-only work, such as a review, a second opinion or a question.

After it returns: review, don't trust blindly

The result reports status, session_id, token usage, the tools used, and git changes.

  1. Read the diff (git diff) for the files it lists.
  2. Run the tests or build yourself.
  3. To fix something, either continue the same session with delegate and session_id, giving precise feedback, or fix it yourself if that's quicker.
  4. Tell the user which model did what, and your verdict on it.

Parallel and multi-model patterns

  • Fan out: call delegate_async once per model or subtask, then task_result with wait_s for each. Parallel tasks that edit files must use separate git worktrees (git worktree add) or non-overlapping files, because they share the directory.
  • Compare: give the same brief to 2–3 models in separate worktrees, then diff the results and pick or merge the best one.
  • Second opinion: auto: false with a prompt like "review this diff for bugs: …".
  • Subagents / workflows: the opencode-worker agent wraps this loop. Spawn it with the model and task in its prompt, e.g. "Use opencode model kimi k3 to add tests for src/foo.ts".

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.