opencode

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

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill opencode-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/skills/autonomous-ai-agents/opencode
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill opencode-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencode-ai.

What problem does it solve? Delegating bounded or long-running coding work to an external autonomous agent is hard to orchestrate manually. This Skill lets Anakot drive the OpenCode CLI through terminal and process tools, handling one-shot tasks, interactive TUI sessions, and parallel work without manual babysitting. ## Core Features & Use Cases - One-Shot Execution: Run bounded tasks with opencode run, attaching context files, forcing models, and showing reasoning. - Interactive Sessions: Launch the OpenCode TUI in background with pty, submit prompts, poll progress, and exit cleanly with Ctrl+C. - PR Review & Parallel Work: Review pull requests via opencode pr and run isolated parallel tasks in separate workdirs or worktrees. - Use Case: Ask the agent to implement an 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 the opencode skill to run 'Add retry logic to API calls and update tests' in my project directory.

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 prompt'` in the target workdir for bounded, non-interactive tasks. Attach context files with `-f`, force a model with `--model provider/model`, and show reasoning with `--thinking`. No pty is needed for run commands.

How do I review a pull request with OpenCode?▼

Run `opencode pr 42` in the repository with pty enabled to use the built-in PR command. For isolation, clone the repo into a temporary directory and run a review prompt against the diff versus main.

Does OpenCode interactive mode require a pty terminal?▼

Yes, the interactive OpenCode TUI requires `pty=true` when started in background. The `opencode run` command does not need pty. Exit TUI sessions with Ctrl+C or process kill, never `/exit`.

Why does OpenCode behave differently in my terminal versus 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.

Can I run multiple OpenCode sessions in parallel?▼

Yes, launch separate background sessions in distinct workdirs or git worktrees to avoid collisions. Track them with process list and monitor each with poll or log actions. Avoid sharing one working directory across parallel sessions.