opencode

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating coding work to an external autonomous agent requires managing CLI flags, interactive TUI sessions, background processes, and session lifecycles, 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 resuming prior sessions. - 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 token handling with tests in your repository; it launches OpenCode in the project directory, monitors progress, and reports files changed and test results. ## Quick Start Use OpenCode to add retry logic to the API calls in this project and update the tests, then summarize what changed.

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 review a pull request with OpenCode?

Run `opencode pr 42` inside the repository to use the built-in PR review command. For isolation, clone the repo into a temporary directory and run `opencode run` with a review prompt and the changed files attached.

Does OpenCode interactive mode require a pty terminal?

Yes, the interactive OpenCode TUI requires `pty=true` when launched as a background session. The `opencode run` one-shot command does not need a pty and works as a plain terminal command.

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

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

How do I exit an OpenCode TUI session cleanly?

Send Ctrl+C (`\x03`) to the session or kill the process directly. Do not use `/exit`, which is not a valid OpenCode command and instead opens an agent selector dialog.

Can I run multiple OpenCode sessions in parallel?

Yes, launch separate background sessions scoped to different workdirs or git worktrees so they do not collide. Avoid sharing one working directory across parallel OpenCode sessions.