← ClaudeAtlas

opencodelisted

Invoke OpenCode CLI as a sub-agent to leverage alternative AI models (GPT-5.x, Codex, local models) for code implementation, review, debugging, research, and second opinions. Use when the user asks to "use opencode", "get a second opinion from GPT/Codex", "implement with opencode", "review with opencode", "let opencode handle this", "use a different model", or wants cross-model validation. Also triggers when the user explicitly names an OpenCode model (e.g., "use gpt-5.4", "use codex") or wants to delegate a task to a non-Claude AI system. Supports all providers configured in the user's OpenCode installation (OpenAI, GitHub Copilot, local models via Ollama/LM Studio, and OpenCode's own free-tier models).
maystudios/claude-skills · ★ 21 · AI & Automation · score 79
Install: claude install-skill maystudios/claude-skills
# OpenCode Sub-Agent Protocol This is an executable protocol for delegating work to OpenCode agents. Follow it precisely. ## Prerequisites - `opencode` CLI installed and in PATH (verify: `opencode --version`) - At least one provider authenticated (`opencode providers list`) - Available models listed via `opencode models` ## Core Command ```bash OPENCODE_DISABLE_AUTOUPDATE=true opencode run --format json --model <provider/model> --agent <build|plan> --dir "<working-dir>" --dangerously-skip-permissions [options] "<prompt>" 2>/dev/null ``` Key flags: - `--format json` -- machine-parseable ndjson output (always use this) - `--model provider/model` -- e.g., `openai/gpt-5.4`, `openai/gpt-5.3-codex` - `--variant <level>` -- reasoning effort: `minimal`, `medium`, `high`, `xhigh` (provider-specific) - `--dir <path>` -- working directory for the task - `--dangerously-skip-permissions` -- auto-approve tool calls (required for headless) - `-f/--file <path>` -- attach file(s) to the prompt - `--agent <name>` -- `build` for implementation (filesystem+bash), `plan` for analysis (read-only) - `-c/--continue` -- continue last session - `-s/--session <id>` -- continue specific session ## Output Parsing The `--format json` flag emits ndjson (one JSON object per line): | type | Contains | |------|----------| | `text` | `.part.text` -- model's text response | | `tool_call` | `.part.name`, `.part.input` -- tool invocations | | `tool_result` | `.part.output` -- tool execution results | | `