opencode-orchestrator
Delegate complex coding, refactoring, research, or multi-step development tasks to OpenCode, an autonomous AI coding agent running in the terminal.
Best use case
opencode-orchestrator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Delegate complex coding, refactoring, research, or multi-step development tasks to OpenCode, an autonomous AI coding agent running in the terminal.
Teams using opencode-orchestrator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/opencode-orchestrator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How opencode-orchestrator Compares
| Feature / Agent | opencode-orchestrator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Delegate complex coding, refactoring, research, or multi-step development tasks to OpenCode, an autonomous AI coding agent running in the terminal.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# OpenCode Orchestrator <purpose> This skill enables Antigravity to delegate complex multi-step coding tasks to OpenCode—a terminal-based autonomous AI coding agent. OpenCode operates independently with its own context, tools, and model access, making it ideal for tasks requiring deep focus, extensive file operations, or specialized model capabilities. </purpose> ## Trigger Workflow Use the `/use-opencode` slash command to invoke this skill: ``` /use-opencode ``` This will guide you through constructing an optimal handoff to OpenCode. ## When to Use OpenCode | Use OpenCode When | Stay in Antigravity When | |-------------------|--------------------------| | Multi-file refactoring across 15+ files | Quick single-file edits | | Long-running code generation tasks | Answering questions about code | | Tasks requiring Plan Mode review | Browser-based testing | | Deep codebase exploration | Tasks needing current conversation context | | Specialized model requirements | Interactive debugging with user | --- ## 1. Capabilities <capabilities> ### Core Features - **Autonomous Execution**: Runs independently, editing files, executing commands, and managing its own context - **Plan Mode**: Reviews and explains proposed changes before execution - **Multi-Provider Support**: Access to OpenAI, Anthropic, Google Gemini, AWS Bedrock, Groq, Azure OpenAI - **Session Management**: Persistent conversations with save/restore functionality - **Auto-Compact**: Automatic context summarization when approaching token limits - **LSP Integration**: Language Server Protocol support for code intelligence - **Project Awareness**: Reads `AGENTS.md` for project-specific conventions ### Available Tools (within OpenCode) - File read/write/search operations - Shell command execution - Code analysis and refactoring - Git operations - Web search and URL reading </capabilities> --- ## 2. Handoff Protocol <handoff_instructions> ### Critical: Context Transfer OpenCode does **NOT** share Antigravity's conversation context. You must explicitly provide: 1. **File Paths**: Absolute paths to all relevant files 2. **Task Context**: Background information and requirements 3. **Constraints**: Any specific approaches to use or avoid 4. **Success Criteria**: Clear definition of done ### Command Structure ```bash opencode run "YOUR_DETAILED_PROMPT" ``` ### Optional Flags | Flag | Purpose | Example | |------|---------|---------| | `-m MODEL` | Specify model | `-m github-copilot/claude-sonnet-4` | | `-a AGENT` | Use custom agent | `-a code-reviewer` | | `--plan` | Force Plan Mode | Review before execution | </handoff_instructions> --- ## 3. Prompt Construction <prompt_template> Structure prompts with clear sections for best results: ``` <context> Project: [Project name and type] Working Directory: [Absolute path] Related Files: [List of relevant file paths] </context> <background> [Any necessary context not obvious from files] </background> <task> [Clear, specific task description] </task> <requirements> - [Specific requirement 1] - [Specific requirement 2] </requirements> <constraints> - [What to avoid or preserve] </constraints> <success_criteria> - [How to know the task is complete] </success_criteria> ``` </prompt_template> --- ## 4. Model Selection <model_guidance> Choose models based on task characteristics: ### For Code-Heavy Tasks ```bash opencode run -m github-copilot/claude-sonnet-4 "..." # or opencode run -m github-copilot/gemini-3-pro "..." ``` ### For Research/Documentation ```bash opencode run -m github-copilot/gpt-4o "..." ``` ### Check Available Models ```bash opencode models ``` ### Default Behavior If no `-m` flag is provided, OpenCode uses the model configured in: - `~/.opencode.json` - `$XDG_CONFIG_HOME/opencode/.opencode.json` - `./.opencode.json` (project-local) </model_guidance> --- ## 5. Example Workflows <examples> ### Multi-File Refactoring ```bash opencode run -m github-copilot/claude-sonnet-4 " <context> Working Directory: /home/user/project Files: src/api/*.ts, src/services/*.ts </context> <task> Refactor all API handlers to use async/await instead of Promise chains. Add proper error handling with custom error classes. </task> <requirements> - Preserve existing functionality - Add JSDoc comments to all public functions - Update corresponding test files </requirements> <success_criteria> - All Promise.then() chains converted to async/await - Error handling uses ApiError class from src/errors.ts - All tests pass </success_criteria> " ``` ### Code Review Delegation ```bash opencode run " <context> Repository: /home/user/project Branch: feature/new-auth Compare against: main </context> <task> Review the changes in the current branch compared to main. Focus on security, performance, and code quality. </task> <requirements> - Check for SQL injection vulnerabilities - Identify N+1 query patterns - Note any breaking API changes </requirements> <success_criteria> - Written review summary in REVIEW.md - Critical issues clearly flagged - Suggested improvements provided </success_criteria> " ``` ### Research and Documentation ```bash opencode run -m github-copilot/gpt-4o " <context> Project: /home/user/project Tech Stack: Node.js, PostgreSQL, Redis </context> <task> Research caching strategies for our API endpoints and create an implementation plan. </task> <requirements> - Consider Redis caching patterns - Evaluate cache invalidation strategies - Account for our microservices architecture </requirements> <success_criteria> - CACHING_PLAN.md created with recommendations - Code examples for key patterns - Migration steps outlined </success_criteria> " ``` </examples> --- ## 6. Integration with Antigravity Workflow <antigravity_integration> ### Coordinated Handoffs When delegating from Antigravity to OpenCode: 1. **Prepare Context**: Gather all relevant file paths and requirements 2. **Construct Prompt**: Use the structured template above 3. **Execute Handoff**: Run via `run_command` tool 4. **Monitor Output**: Read OpenCode's logs and final result 5. **Verify Results**: Check file changes and run tests 6. **Continue Work**: Resume in Antigravity with updated codebase ### Artifact Coordination OpenCode may create its own files (plans, documentation). After handoff: - Check for new files in the working directory - Review any generated documentation - Incorporate findings into Antigravity artifacts if relevant ### When to Bring Work Back Return work to Antigravity when: - Browser testing is needed - User interaction is required - Results need integration with current conversation - Visual verification is needed </antigravity_integration> --- ## 7. Troubleshooting <troubleshooting> ### Common Issues | Issue | Cause | Solution | |-------|-------|----------| | `ProviderModelNotFoundError` | Invalid model identifier | Run `opencode models` to list available models | | Context too short | Auto-compact triggered | Task is self-contained; continue monitoring | | Permission denied | File access issues | OpenCode runs with user permissions; check file ownership | | Timeout | Long-running task | Increase `WaitMsBeforeAsync` or send to background | ### Model-Specific Notes - **GitHub Copilot models**: Require active Copilot subscription - **Anthropic models**: Best for complex reasoning and code generation - **Gemini models**: Strong at multi-file understanding - **OpenAI models**: Effective for research and documentation ### Debugging Commands ```bash # Check OpenCode configuration cat ~/.opencode.json # List available models opencode models # List configured agents opencode agent list # Check authentication status opencode auth status ``` </troubleshooting> --- ## 8. Advanced: Custom Agents <custom_agents> For recurring specialized tasks, create custom OpenCode agents: ```bash opencode agent create ``` This launches an interactive wizard to define: - Agent name and description - Custom system prompt - Tool permissions - Default model Then invoke with: ```bash opencode run -a my-custom-agent "Task description" ``` ### Example Use Cases - **Code Reviewer**: Specialized prompts for security and performance review - **Documentation Writer**: Focused on JSDoc/TSDoc generation - **Test Generator**: Configured for your testing framework </custom_agents> --- ## Quick Reference ```bash # Basic execution opencode run "Your task description" # With specific model opencode run -m github-copilot/claude-sonnet-4 "Task" # With custom agent opencode run -a custom-agent "Task" # Check available models opencode models # Check available agents opencode agent list ```
Related Skills
project-orchestrator
Master coordinator for complete project setup from ideation to ready-to-code. Manages workflow through ideation, research, tech stack selection, documentation, and project initialization to deliver working projects in minutes.
orchestrator
Multi-agent orchestrator that delegates all work to specialized subagents. Enforces parallelism, tracks progress, and coordinates agent teams for complex tasks.
orchestrator-conductor
This skill should be used when the user asks to "orchestrate agents", "run /orchestrate", "manage parallel agents", "coordinate multiple agents", "decompose this task", or needs patterns for multi-agent workflows with parallel execution and task decomposition.
cascade-orchestrator
Creates sophisticated workflow cascades coordinating multiple micro-skills with sequential pipelines, parallel execution, conditional branching, and Codex sandbox iteration. Enhanced with multi-model routing (Gemini/Codex), ruv-swarm coordination, memory persistence, and audit-pipeline patterns for production workflows.
add-opencode-model
Fetch OpenCode Zen model details and provide guidance for adding models to acai-ts provider configuration.
Proactive Orchestrator
Event-driven orchestrator that chains existing skills, edge functions, and agent capabilities into automated workflows triggered by real-time events. Receives events from webhooks (MeetingBaaS, email, calendar), cron jobs (morning brief, pipeline scan), and Slack interactions (button clicks, approvals), then executes multi-step sequences with context-aware routing, HITL approval gates, and self-invocation for long-running chains. This is the conductor — it connects 30+ existing Slack functions, 6 specialist agents, and the sequence executor into coherent, event-driven sales workflows. NOT triggered by user chat messages. Triggered by system events only.
ln-1000-pipeline-orchestrator
Meta-orchestrator (L0): reads kanban board, drives Stories through pipeline 300->310->400->500 in parallel via TeamCreate. Max 3 concurrent Stories. Auto squash-merge to develop on quality gate PASS.
archaeology-orchestrator
고고학 발굴조사 고찰 작성 자동화 파이프라인 마스터 오케스트레이터
AOC Orchestrator
Main coordinator for the automated Advent of Code workflow. Orchestrates puzzle fetching, TDD solving, and submission for daily AoC challenges. Use when running the full automated solving pipeline or when user requests to solve an AoC day.
adb-workflow-orchestrator
TOON workflow orchestration engine for coordinating ADB automation scripts across phases with error recovery
parallel-orchestrator
Orchestrate parallel agent workflows using HtmlGraph's ParallelWorkflow. Activate when planning multi-agent work, using Task tool for sub-agents, or coordinating concurrent feature implementation.
n8n-mcp-orchestrator
Expert MCP (Model Context Protocol) orchestration with n8n workflow automation. Master bidirectional MCP integration, expose n8n workflows as AI agent tools, consume MCP servers in workflows, build agentic systems, orchestrate multi-agent workflows, and create production-ready AI-powered automation pipelines with Claude Code integration.