opencode

Delegates coding tasks to OpenCode CLI for autonomous implementation, refactoring, and PR review.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/timchap/dot-hermes --skill opencode-timchap
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/timchap/dot-hermes/tree/main/skills/coding/opencode
Command: npx skills add https://github.com/timchap/dot-hermes --skill opencode-timchap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating coding work to an external autonomous agent requires managing model selection, session lifecycles, and interactive TUI quirks. This Skill provides a complete operational playbook for orchestrating OpenCode CLI from Hermes, including automatic model tier selection via OpenRouter, one-shot and interactive execution modes, and parallel work patterns. ## Core Features & Use Cases - Model Tier Auto-Selection: Classifies tasks as low, medium, or high complexity and routes them to cost-appropriate OpenRouter models such as Qwen, Llama, Claude Sonnet, or Claude Opus. - One-Shot and Interactive Modes: Runs bounded tasks with opencode run or manages long-running TUI sessions in the background with progress polling and clean exit handling. - PR Review and Parallel Work: Reviews pull requests in isolated clones and runs multiple OpenCode sessions in separate worktrees to avoid collisions. - Use Case: Ask the agent to refactor an authentication module across four services; it selects the high-tier Claude Opus model, runs OpenCode in the project directory, monitors progress, and reports files changed and test results. ## Quick Start Ask the agent to use OpenCode to implement a feature or fix a bug in your repository, and it will verify installation, pick the right model tier, and execute the task autonomously.

Frequently Asked Questions about opencode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a one-shot coding task with OpenCode CLI?▼

Use `opencode run 'your task description'` in the project directory for bounded, non-interactive execution. Attach context files with `-f`, force a model with `--model openrouter/<provider>/<model>`, and show reasoning with `--thinking`.

How does OpenCode select which AI model to use?▼

Tasks are classified into low, medium, or high tiers based on files affected and complexity. Low tiers use Qwen or Llama models, medium uses Qwen Coder or Claude Sonnet, and high uses Claude Opus or o4-mini-high via OpenRouter.

Can OpenCode run interactive sessions in the background?▼

Yes, start `opencode` with background=true and pty=true, then send prompts and monitor progress through process actions like submit, poll, and log. Exit with Ctrl+C (\x03) or kill, never the `/exit` command.

Why does OpenCode behave differently in my terminal versus the agent?▼

Shell environments may resolve different OpenCode binaries from PATH. Check with `which -a opencode` and `opencode --version`, and pin an explicit binary path such as $HOME/.opencode/bin/opencode if needed.

Can I run multiple OpenCode sessions in parallel?▼

Yes, launch separate `opencode run` sessions in different workdirs or git worktrees so they do not collide. Sharing one working directory across parallel sessions should be avoided.