opencode

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

Updated May 4, 2026
One-click install
npx skills add https://github.com/Junkfooooood/hermes-governance --skill opencode-junkfooooood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/Junkfooooood/hermes-governance/tree/main/skills/autonomous-ai-agents/opencode
Command: npx skills add https://github.com/Junkfooooood/hermes-governance --skill opencode-junkfooooood

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating coding work to an external autonomous agent requires managing CLI sessions, interactive TUIs, background processes, and parallel workdirs, which is error-prone without clear operational guidance. ## 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: Drive the OpenCode TUI via pty sessions, submitting prompts, polling progress, and exiting cleanly with Ctrl+C. - PR Review & Parallel Work: Review pull requests with opencode pr and run parallel tasks in isolated workdirs or git worktrees. - Use Case: Ask the agent to implement OAuth refresh flow with tests in your repo; it starts an OpenCode session, monitors progress, and reports files changed and test results. ## Quick Start Use OpenCode to implement retry logic for API calls in my project and update 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 target repository. Attach context files with `-f`, force a model with `--model provider/model`, and show reasoning with `--thinking`. No pty is needed for run mode.

How do I run interactive OpenCode sessions in the background?

Start `opencode` with background=true and pty=true, then send prompts via process submit and monitor with poll or log actions. Exit with Ctrl+C (\x03) or kill the process; never use /exit, which opens an agent selector dialog.

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 via -f flags.

Why does OpenCode behave differently between my terminal and the agent?

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

How do I run multiple OpenCode tasks in parallel safely?

Run each task in a separate workdir or git worktree so sessions do not collide on the same files. Launch each with background=true and track all sessions with the process list action.