opencode-delegate
Skill0 starsChanged 31 days agoMITView on GitHub
Run OpenCode CLI as a headless delegate. Use when the user names OpenCode or opencode, says "ask OpenCode", wants `opencode run`, wants a provider-agnostic second opinion, or compares coding agents. Do NOT use for interactive sessions, other CLIs, or tasks not meant for delegation.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- EldinBegano/opencode-delegatetheir own version, first seen Nov 1, 2026
- aashahin/claude-opencode-delegatetheir own version, first seen Oct 11, 2026
- digital8150/claude-delegate-skillstheir own version, first seen Oct 8, 2026
- amElnagdy/delegate-skillstheir own version, first seen Jul 29, 2026
- sssemil/SKILLStheir own version, first seen Jul 22, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- amElnagdy/delegate-skills★ 2.6ksame name
- aashahin/claude-opencode-delegate★ 2same name
- sssemil/SKILLS★ 2same name
- digital8150/claude-delegate-skills★ 0same name
- EldinBegano/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.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 4 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Run OpenCode as a bounded headless subprocess (opencode run) and hand its final response back to the user.
- Very specific: line 18
Read runtime-setup.md before invoking the wrapper.
- Distinctive: line 24
Run the bundled wrapper with the Python command discovered by runtime-setup.md.
- Distinctive: line 25
Read headless-reference.md when flags, sessions, output parsing, or authentication details are needed.
- Distinctive: line 28
If the task is long-running, use a generous explicit timeout.
- Very specific: line 38
Prefer a one-shot invocation.
- Very specific: line 42
Do not read or print provider API keys, OAuth tokens, ~/.local/share/opencode or ~/.config/opencode credentials, .env*, private keys, or …
- Very specific: line 43
Do not add MCP servers, disable repository protections, publish or share sessions, push commits, or delete data unless the user explicitly …
- Very specific: line 44
Default to no auto-approval.
- Distinctive: line 45
Treat OpenCode's report as unverified.
- Very specific: line 46
If opencode is not found, tell the user to verify the official installation and PATH.
- Very specific: line 50
Use references/runtime-setup.md for Python and CLI pre-flight, scripts/delegate_opencode.py for deterministic invocation, and …
“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.
Files
OpenCode Delegate
Run OpenCode as a bounded headless subprocess (opencode run) and hand its final response back to the user. Keep the current project as the working directory unless the user specifies another directory.
Anti-Rationalization
Trigger this skill when the user explicitly asks for OpenCode, opencode run, a provider-agnostic second opinion, or a comparison that needs OpenCode evidence. Do not skip it because another installed CLI is available; the requested value is OpenCode's configured provider and runtime.
Pause instead when OpenCode is missing or unauthenticated, the user wants an interactive TUI, the task requires exposing secrets, or the requested auto-approval/sharing behavior exceeds the user's authorization.
Runtime Pre-Flight
Read runtime-setup.md before invoking the wrapper. Verify Python 3.10+ and opencode or OPENCODE_BIN; stop and report the missing prerequisite instead of inventing an installer or assuming a specific shell.
Workflow
- Clarify the delegated objective, scope, and whether OpenCode may edit files or run commands. Do not delegate secrets or expose protected files in the prompt.
- Resolve the project directory to an absolute path. Prefer the current working directory. Verify it exists before starting.
- Run the bundled wrapper with the Python command discovered by runtime-setup.md.
- Read headless-reference.md when flags, sessions, output parsing, or authentication details are needed.
- Report the wrapper's result, output-file path, exit status, and any stderr warning. A successful process is not proof that the requested change is correct: inspect the diff and run relevant tests independently when the delegated task changed files.
- If the task is long-running, use a generous explicit timeout. Never create a hidden daemon, polling loop, or unbounded background process.
Wrapper behavior
delegate_opencode.pyinvokesopencodedirectly, never through a shell, and supportsOPENCODE_BINfor an explicit executable path.- It uses headless mode with
opencode run,--dir <cwd>, and the delegated task as the message; it adds--auto(auto-approve non-denied permissions) only when--always-approveis requested. - OpenCode has no final-message file. By default the wrapper captures OpenCode's formatted text output as
response. Pass--jsonto switch to--format json; the raw JSON event stream is then stored and surfaced underevents, and the last text event is used asresponsewhen one can be identified. - Model selection uses
--model provider/modelwhen--modelis passed. The active provider is whichever the user configured withopencode auth. - It writes stdout, stderr, and a small result manifest to a temporary output directory, then prints the manifest as JSON.
- It returns nonzero for missing OpenCode, an invalid project directory, timeout, or a failed process. Do not hide these failures.
- Prefer a one-shot invocation. Use
--sessionor--continueonly when the user explicitly asks for a resumable OpenCode session.
Safety and verification
- Do not read or print provider API keys, OAuth tokens,
~/.local/share/opencodeor~/.config/opencodecredentials,.env*, private keys, or browser profiles. - Do not add MCP servers, disable repository protections, publish or share sessions, push commits, or delete data unless the user explicitly asks for that exact action. In particular, never pass
--shareunless requested. - Default to no auto-approval. Only escalate to
--always-approvewhen the user authorizes autonomous edits and the directory is trusted. - Treat OpenCode's report as unverified. Inspect changed files,
git diff, and tests from the controlling agent. - If
opencodeis not found, tell the user to verify the official installation and PATH; do not install packages or run an installer automatically.
Resources
Use references/runtime-setup.md for Python and CLI pre-flight, scripts/delegate_opencode.py for deterministic invocation, and references/headless-reference.md for the documented OpenCode interface.
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
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.

