opencode-agents
OpenCode Agents Skill
Delegate tasks to specialized oh-my-openagent subagents via the opencode CLI.
Naming
| Term | Meaning |
|---|---|
| oh-my-openagent | The plugin package (npm: oh-my-openagent, formerly oh-my-opencode) |
| opencode | The CLI binary used to invoke agents |
| oh-my-openagent.json | Config file at ~/.config/opencode/oh-my-openagent.json |
Canonical repo: https://github.com/code-yeongyu/oh-my-openagent
Available Agents
| Agent | Mode | Specialization |
|---|---|---|
| sisyphus | primary | Orchestration, task delegation, general execution |
| atlas | primary | Large codebase exploration, dependency analysis |
| librarian | subagent | External documentation lookup, web research, best practices |
| oracle | subagent | Analysis, Q&A, explaining complex concepts |
| prometheus | subagent | Planning, architecture design, high-level decisions |
| explore | subagent | Filesystem exploration, code search |
| metis | subagent | Strategy, trade-off analysis |
| momus | subagent | Code review, quality assurance, gap/completeness checking |
Primary agents (sisyphus, atlas) are top-level orchestrators invoked directly.
Subagents cannot be called directly via --agent — they are delegated to by Sisyphus internally via call_omo_agent(). To target a subagent, name it in the prompt text.
How to Invoke
opencode run '<task prompt>'
Use single quotes to avoid shell expansion of special characters (see Shell Safety below).
Optional Flags
| Flag | Description | Example |
|---|---|---|
--agent <name> |
Route to a specific primary agent only (sisyphus, atlas) | opencode run --agent atlas 'analyze deps' |
--dir <path> |
Set working directory (defaults to process.cwd()) |
opencode run --dir /project 'review code' |
-m, --model <model> |
Override the model for this run | opencode run -m gpt-4o 'summarize' |
Routing to Subagents
Do NOT use --agent for subagents — it will fail with "not a primary agent" or silently fall back to Sisyphus without proper delegation.
Instead, name the subagent in the prompt text. Sisyphus reads this as an instruction to delegate:
opencode run 'Use librarian to find the official React docs on useEffect'
opencode run 'Ask oracle to analyze the tradeoffs of this architecture'
opencode run 'Use momus to review the auth module for security issues'
The delegation is probabilistic LLM behavior — for simple tasks Sisyphus may use its own tools directly instead of delegating.
Examples
opencode run 'search for best practices on LND channel management'
opencode run 'explain the difference between HTLC and PTLC in Lightning'
opencode run --agent atlas 'analyze dependencies across this monorepo'
opencode run --dir /path/to/project 'find all usages of the payment module'
Timeouts
- exec timeout: Always set
timeout: 600(10 minutes) when callingopencode runvia exec. - subagent timeout:
agents.defaults.subagents.runTimeoutSecondsis set to 600 globally. - opencode CLI has no built-in timeout flag; rely on the exec wrapper.
Execution Flow
This section describes how an AI agent (e.g., OpenClaw, Claude Code) should use this skill when a user requests an opencode agent task.
- Understand the task type and whether the user named a specific agent.
- Read local context if needed — use local tools (file reads, directory listings) to gather context and embed it in the prompt.
- Run the command via exec with
timeout: 600. If the user named a specific subagent, include it explicitly in the prompt text:# User named an agent → embed it in the prompt opencode run 'Use librarian to search today'\''s weather in Tokyo' # No agent named → let Sisyphus auto-route opencode run 'search today'\''s weather in Tokyo' - Return the output to the user.
- If the agent isn't in the list above, check
~/.config/opencode/oh-my-openagent.jsonfor the full configured agent list.
Output Handling
- stdout — agent's response (typically Markdown)
- stderr — progress/debug info; ignore unless diagnosing failures
- Exit code 0 — success; non-zero — failure
- For long outputs, summarize key findings before returning to the user
Shell Safety
opencode run passes messages as JSON over HTTP — the message itself is never shell-executed. However, the shell on the caller side will expand special characters before the CLI receives them.
Always use single quotes:
# Safe
opencode run 'analyze the $HOME variable usage'
# Unsafe — shell expands $HOME before the CLI sees it
opencode run "analyze the $HOME variable usage"
If the task contains single quotes, escape them with '\'':
opencode run 'find all usages of the it'\''s pattern'
Notes
- Config:
~/.config/opencode/oh-my-openagent.json— agent models, prompt_append, and settings - CWD: inherited from the calling process; override with
--dir <path> - Recursion: The
call_omo_agent()tool has built-in recursion protection (max depth 3, cycle detection). Shell-invokedopencode runstarts an independent process tree with no cross-process guard — avoid chaining shell invocations inside tasks already started viaopencode run. - If
opencodeis not in PATH: report the error clearly and suggest installing the oh-my-openagent plugin vianpm install -g oh-my-openagent
More from axot/agent-skills
ddg-search
>
17deep-resolve
Root-cause-driven solution decision framework for the hardest problems across any domain. This is the nuclear option — it consumes significant tokens through exhaustive multi-branch root cause analysis, MECE solution enumeration, and domain-adaptive external validation. Use ONLY for genuinely difficult problems: recurring failures that resist repeated fix attempts, complex systemic issues with no clear solution path, decisions where multiple approaches exist and the wrong choice has high cost, problems with multiple interacting causes spanning components or teams. Trigger when: the user says 'what's the best way to fix X', 'why does this keep happening', 'how should we approach this', 'find the root cause', 'what are my options for fixing X', 'analyze this problem systematically', 'evaluate our options for X', 'what's the right approach and why', or expresses frustration that previous solutions didn't stick. Do NOT use for: problems where the answer is already obvious or requires no analysis, straightforward issues with clear solutions, or routine investigation. If the problem can be solved in 5 minutes of investigation, this skill is overkill.
9smart-shopper
Product research and comparison shopping assistant. Use this skill whenever the user wants to find, compare, or filter products on any online shopping platform (Amazon, Rakuten, Yahoo Shopping, IKEA, Costco, Taobao, JD, etc.). Triggers include "find me a product", "search for X on Amazon", "help me buy Y", "compare products", "I need a [product]", "search [platform] for", "shop for", "looking for something to buy", any mention of shopping criteria like price range, star ratings, product specifications, or when the user names a product category and an online store. Also triggers when the user changes filtering criteria mid-search (e.g., "relax the rating to 3.9", "what if we increase the budget"). This skill caches all search results in a local SQLite database so criteria changes can be answered instantly without re-searching.
4ultra-troubleshoot
Ultimate root-cause-driven solution decision framework for the hardest software problems. This is the nuclear option — it consumes significant tokens through exhaustive multi-branch root cause analysis, MECE solution enumeration, and GitHub industry validation. Use ONLY for genuinely difficult problems: recurring bugs that keep coming back after repeated fix attempts, complex architectural issues with no clear solution path, problems where multiple solutions exist and the wrong choice has high cost, performance issues with multiple interacting causes, integration failures spanning multiple components. Trigger when: the user says 'what's the best way to fix X', 'why does this keep happening', 'how should we approach this', 'find the root cause', 'what are my options for fixing X', or expresses frustration that previous fixes didn't stick. Do NOT use for: simple bugs with obvious one-line fixes, straightforward error messages with clear solutions, problems where the fix is already known, or routine debugging. If the problem can be solved in 5 minutes of reading code, this skill is overkill.
3aws-expert
>-
2