opencode-delegate
Delegate a coding task to the OpenCode CLI as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to OpenCode — phrasings like "have OpenCode do X", "delegate this to OpenCode", "run it through OpenCode", or "use OpenCode to implement/fix/refactor" — or wants to run a queue of coding tasks through OpenCode while staying the reviewer. Prefer it when the user will review the diff and commit it themselves. DO NOT USE for
Security Assessment
About opencode-delegate
OpenCode Delegate lets an orchestrating agent hand a bounded coding task to the separate OpenCode CLI as a background implementer, then review the resulting diff and land it. It solves the problem of parallelizing implementation work while keeping a human or orchestrator firmly in the reviewer/committer role: the orchestrator writes the brief and owns judgment, OpenCode does the typing in its own session, and the orchestrator verifies and commits. It is meant for tasks large enough to justify delegation but where the diff will be reviewed before commit.
The workflow is a five-step loop: write a self-contained brief (OpenCode sees only the brief plus the working tree, so goals, constraints, real gate commands, and a report contract all go in it), dispatch it via a bundled Node relay that wraps `opencode run`, poll for completion, review the diff, and land it. The skill stresses model selection (OpenCode has no default model; the human owns the allowed set, the orchestrator picks per task) and provides a detailed review discipline: check for weakened or skipped tests, re-run the project's actual gates rather than trusting the self-reported `result.json`, round-trip migrations, grep for dangling references after removals, and sweep generated code for hardcoded success values, catch-all error suppression, unverified imports, dead weight, and speculative surface. Rework is sent as a delta via `--resume-last`.
It targets engineers and agent orchestrators (primarily Claude Code) who want to delegate mechanical or well-scoped implementation work while staying the reviewer. Prerequisites include the authenticated `opencode` CLI, Node 18+, git, and shell access.
FAQ
When should I use this skill?
When the user wants implementation work handed to OpenCode while they review the diff and commit it themselves. It is not for tasks small enough to do inline or when the code should be written directly without delegating.
What are the prerequisites?
The `opencode` CLI installed and authenticated (`opencode auth login`), a model provider credential, Node 18+, git, and an orchestrator that can run shell commands and read files. Examples assume bash/zsh.
How is the implementer model chosen?
OpenCode has no safe default, so a model must be named via `--model` or a lane. The human owns which models are allowed (ideally stated in AGENTS.md/CLAUDE.md); the orchestrator picks per task from that set, and asks rather than guessing to avoid metered-model surprise bills.
Who commits the work?
The orchestrator, never the implementer. The uncommitted working tree is treated as the authoritative copy, and the skill warns against reflexive git checkout/reset/clean before inspecting it.
How is a self-reported passing gate handled?
As a claim, not evidence. The skill instructs re-running the project's actual test/lint/build commands, reviewing test edits first, and sweeping the diff for gamed gates and generated-code failure patterns.
Install opencode-delegate
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
amelnagdy/delegate-skills