skills/opencode-workflow/SKILL.md
Full OpenCode delegation workflow — routing rules, agent-to-role mapping, model routing, invocation patterns, and examples for delegating tasks to OpenCode (GitHub Copilot). Use when delegating heavy work to OpenCode or making one-shot queries via opencode-ask.
npx skillsauth add moliboy5000/.claude opencode-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Claude = orchestrator. OpenCode = executor.
You (Claude) own: planning, decision-making, tool calls (Read/Edit/Bash/Glob/Grep), user communication, final review, and anything requiring direct filesystem or LSP access.
OpenCode owns: heavy implementation work, code generation, multi-file analysis, research, security reviews, architecture drafts, and any task expressible as a self-contained prompt.
opencode-orchestrator agent (it handles the OpenCode loop autonomously)opencode-ask "<task>" via Bashexecutor, debugger, etc.)opencode-orchestrator agents in background, or multiple opencode-ask calls for simple parallel queriesopencode-orchestrator agent (handles the back-and-forth loop with OpenCode autonomously until objective is met)opencode-ask directly via Bash (single prompt, single response)executor, debugger, etc.)Never spawn general-purpose, Explore, or Plan subagent types. These consume Claude tokens for work that OpenCode can handle. Route ALL research, exploration, planning, and multi-step delegation through opencode-orchestrator instead. The only Claude subagents permitted are OMC specialized agents (executor, debugger, verifier, etc.) when direct tool access is required.
Always use --agent-prompt when delegating to opencode. Match the agent role to the task type:
| Task Type | --agent-prompt Role |
|-----------|----------------------|
| Implementation / code changes | executor |
| Bug investigation / root cause | debugger |
| Architecture / system design | architect |
| Security audit | security-reviewer |
| Code quality / logic review | code-reviewer |
| Test strategy / TDD / coverage | test-engineer |
| Research / exploration | scientist or explore |
| Codebase search / pattern find | explore |
| External docs / SDK reference | document-specialist |
| Documentation | writer |
| Planning / breakdown | planner |
| Pre-planning / requirements | analyst |
| Verification / correctness check | verifier |
| Git commits / history / rebasing | git-master |
| Causal tracing / evidence-driven debug | tracer |
| Plan critique / multi-perspective review | critic |
Full catalog: copilot-instructions.md → "AI Tooling: Claude Code Agents & Skills" section lists every available --agent-prompt role, every Claude Code skill (/skill-name), and model routing rules.
Invoke via opencode-ask -m <model>:
| Model | Best For |
|-------|----------|
| github-copilot/claude-sonnet-4.6 | Default. All code tasks, implementation, debugging, reviews |
| github-copilot/claude-opus-4.6 | Complex reasoning, architecture decisions, deep analysis |
| github-copilot/gpt-5 | Complex reasoning, architecture decisions (alternative to opus) |
| github-copilot/gemini-2.5-pro | Large context analysis, research, multi-file review |
| github-copilot/gpt-5.1-codex | Pure code generation, completions |
| github-copilot/gpt-5-mini | Fast lookups, simple summarization, cheap single-purpose tasks |
opencode-orchestrator agent (preferred for iterative work)Use the Agent tool with subagent_type: "opencode-orchestrator". Always set mode: "bypassPermissions". Provide a clear objective and success criteria. The orchestrator handles the back-and-forth with OpenCode autonomously.
# Examples of when to use opencode-orchestrator:
- "Implement the favorites system end-to-end"
- "Debug and fix the duplicate listings issue"
- "Research the best notification strategy for our stack"
- "Refactor the auth module to use JWT tokens"
opencode-ask (for single prompt/response)# Standard — always include --agent-prompt
opencode-ask --agent-prompt executor "implement the repository layer for listings"
opencode-ask --agent-prompt debugger "trace why the feed returns 401 intermittently"
opencode-ask --agent-prompt security-reviewer "audit brokr-api/src/auth for vulnerabilities"
# Architecture tasks — use opus
opencode-ask --agent-prompt architect -m github-copilot/claude-opus-4.6 "design the caching strategy"
# Fast lookup — no agent needed, use gpt-5-mini
opencode-ask -m github-copilot/gpt-5-mini "what HTTP status code for a soft-delete endpoint"
# With artifact capture
opencode-ask --agent-prompt code-reviewer "review the listings module" > .omc/artifacts/ask/opencode-review.md
# Parallel one-shot queries — fire in background
opencode-ask --agent-prompt executor "task A" > /tmp/oc-a.md &
opencode-ask --agent-prompt executor "task B" > /tmp/oc-b.md &
wait && cat /tmp/oc-a.md /tmp/oc-b.md
opencode installed at /home/moli/.opencode/bin/opencodeopencode providers list shows GitHub Copilot with oauth)opencode-ask wrapper on PATH at ~/.local/bin/opencode-askVerify with:
opencode-ask --help 2>&1 || echo "wrapper not found"
opencode providers list
omc ask codex/gemini would be used but those CLIs aren't installed{{ARGUMENTS}}
tools
MANDATORY prerequisite — load this skill BEFORE every `generate_diagram` tool call. NEVER call `generate_diagram` directly without loading this skill first. Trigger whenever the user asks to create, generate, draw, render, sketch, or build a diagram — flowchart, architecture diagram, sequence diagram, ERD or entity-relationship diagram, state diagram or state machine, gantt chart, or timeline. Also trigger when the user mentions Mermaid syntax or wants a system architecture, decision tree, dependency graph, API call flow, auth handshake, schema, or pipeline visualized in FigJam. Routes to type-specific guidance, sets universal Mermaid constraints, and tells you when to use a different diagram type or skip the tool entirely (mindmaps, pie charts, class diagrams, etc.).
development
DEFAULT PIPELINE for all tasks requiring execution. You (Claude) are the strategic orchestrator. Codex agents are your implementation army - hyper-focused coding specialists. Trigger on ANY task involving code, file modifications, codebase research, multi-step work, or implementation. This is NOT optional - Codex agents are the default for all execution work. Only skip if the user explicitly asks you to do something yourself.
development
This skill should be used when the user asks to analyze a UI screen recording and map interaction states into Figma. Trigger for requests such as "put video frames in Figma", "extract states from my recording", "map interactions from video to Figma", "analyze this screen recording", "create a storyboard from my video", "deconstruct this interaction in Figma", "annotate the UI states in my recording", or "pull the key moments from this video into Figma". Also trigger when the user references a video file (.mp4, .mov, .webm, .avi) together with Figma, design review, interaction analysis, prototypes, or UI states. The skill extracts key visual moments from a video, infers interaction triggers, and builds an annotated Figma Design storyboard using native Figma annotations and uploaded screenshot assets.
development
Generate a FigJam project plan board from a PRD plus codebase context. Interactive flow: research → propose sections → per-section deep research → per-section content + block-shape proposal → create FigJam → skeleton → fill → diagrams → wrap. Each content block (section, nested section, intro callout, table, multi-column text, sticky column, diagram section, metadata strip) has its own subskill reference file. Use when the user asks for 'project plan in FigJam', 'interactive project plan', '/generate-project-plan', or provides a PRD and wants per-section confirmation on content + rendering.