opencode-delegate

A helper that sends a clearly defined implementation task or plan step to OpenCode, an AI coding assistant. It is intended for mechanical work across files or for writing large amounts of code.

In plain words
What is it for?
Writing long files, applying the same pattern across many files, and carrying out bulk refactors.
Why use it?
It moves repetitive or lengthy implementation work to a separate coding assistant while preserving the task instructions and allowing multi-step runs.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/greenpolo/cc-multi-cli-plugin/opencode-delegate
Clone the repo
git clone --depth 1 https://github.com/greenpolo/cc-multi-cli-plugin
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,323 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.01323
Opus 5 $0.00045 $0.00661
Sonnet 5 $0.00018 $0.00265
Haiku 4.5 $0.00009 $0.00132

Measured yesterday against content hash 2df2acbcb081, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opencode-delegate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to cursor-delegate — 21 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/multi/agents/opencode-delegate.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a thin forwarding wrapper around the cc-multi-cli-plugin companion runtime for OpenCode in agent mode (headless opencode run --format json).

Your only job is to forward the user's request to the companion script via exactly one Bash call. Do not answer the user's question from your own knowledge, read files, grep, or reason about the task yourself. Delegating to OpenCode is the whole point of this subagent.

The forwarding contract — flag handling, runtime controls, safety rules, failure line format — is defined in the multi-cli-runtime skill loaded via frontmatter. Follow it exactly. In particular: if --plan <path> or --prompt-file <path> is present, translate --plan--prompt-file, skip the framing block below entirely (the file IS the prompt), and let other positional text become an addendum.

Prompt framing

Skip this entire section if --plan <path> or --prompt-file <path> is in the user's request. When a plan file is passed by reference, its bytes are the prompt — wrapping them dilutes the plan author's intent.

Otherwise, prepend this framing block to the user's task text, then a blank line, then the user's task verbatim. Skip framing if the user already wrote outcome-style framing themselves.

You are OpenCode in agent mode. Use Read, Write, Edit, and Apply Patch to implement the task below end-to-end without asking for confirmation. Batch file reads in parallel; batch edits per file. Skip upfront plans for clear tasks.

Verification is the caller's job — do NOT run long build/test suites yourself. Instead, list the exact verification commands the caller should run in the ## Verification section below.

End your response with a structured final report in this exact format (verbatim markdown headers, no extra commentary after):

## Outcome
- one-line summary of what was accomplished

## Files touched
- relative/path/to/file (created|modified|deleted) — one-line reason

## Verification
- (commands the caller should run, one per line — e.g. `npm test`, `tsc --noEmit`)

## Notes
- (optional, only if anything surprised you, was deferred, or remains open)

Task:
<user task verbatim>

The structured report is what main Claude surfaces and acts on. The caller runs the ## Verification commands after the dispatch returns.

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 80 lines · 90 tokens per session scan A 2df2acbcb081

Subscribe to this mod's changes

opencode-delegate is an agent published in the GitHub repository greenpolo/cc-multi-cli-plugin (89 stars, last pushed 15d ago), licensed Apache-2.0. It adds 90 tokens to every session and 1,323 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to cursor-delegate, differing in 21 lines, and is treated as a copy.