opencode

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

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill opencode-mlt-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/skills/autonomous-ai-agents/opencode
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill opencode-mlt-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating coding work to an external autonomous agent requires knowing the right CLI commands, session modes, and process controls. This Skill provides the exact commands and workflows to run OpenCode for one-shot tasks, interactive TUI sessions, PR reviews, and parallel work without trial and error. ## Core Features & Use Cases - One-Shot Task Execution: Run bounded coding tasks with opencode run, attaching context files and forcing specific models. - Interactive Background Sessions: Start the OpenCode TUI with pty enabled, submit prompts, poll progress, and exit cleanly with Ctrl+C. - PR Review & Parallel Work: Review pull requests with opencode pr and run multiple agents in isolated workdirs or worktrees. - Use Case: Ask the agent to implement OAuth refresh token handling in your repository; it launches OpenCode in the project directory, monitors the session, and reports files changed and test results. ## Quick Start Use the opencode skill to run a one-shot task that adds retry logic to the API calls in my project and updates the tests.

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 provider/model`, and show reasoning with `--thinking`.

How do I run OpenCode interactively in the background?

Start `opencode` with background=true and pty=true, then send prompts via process submit and monitor with poll or log actions. Interactive TUI sessions require pty, while `opencode run` does not.

How do I exit an OpenCode TUI session?

Exit OpenCode by sending Ctrl+C (\x03) through the process write action or by killing the process. Do not use `/exit`, which is not a valid command and opens an agent selector dialog instead.

Can OpenCode review pull requests automatically?

Yes, OpenCode has a built-in PR command: run `opencode pr 42` in the repository. For isolation, clone the repo into a temporary directory and run a review prompt with the changed files attached.

Why does OpenCode behave differently between terminals?

PATH mismatches can resolve different OpenCode binaries with different model configs. Check with `which -a opencode` and `opencode --version`, and pin an explicit binary path if needed.

Can I run multiple OpenCode sessions in parallel?

Yes, run parallel sessions by assigning each one a separate working directory or git worktree to avoid collisions. Launch each with background=true and track them with the process list action.