opencode

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

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill opencode-avatar-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/autonomous-ai-agents/opencode
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill opencode-avatar-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating bounded or long-running coding work to an external autonomous agent is hard to orchestrate manually. This Skill standardizes how to launch, monitor, and control OpenCode CLI sessions from Hermes terminal and process tools, covering one-shot runs, interactive TUI sessions, and parallel worktrees. ## Core Features & Use Cases - One-Shot Task Execution: Run bounded coding tasks with opencode run, attaching context files, forcing models, and showing reasoning output. - Interactive Session Management: Start background TUI sessions with pty, submit prompts, poll logs, resume prior sessions, and exit cleanly with Ctrl+C. - PR Review & Parallel Work: Review pull requests via opencode pr or isolated clones, and run parallel tasks in separate workdirs or git worktrees. - Use Case: Ask the agent to fix issue #101 in one worktree while adding regression tests in another, then monitor both sessions and summarize files changed and test results. ## Quick Start Ask the agent to use OpenCode to implement a feature or review a pull request in your current repository, for example: run opencode to add retry logic to the API client 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'` from the project directory for bounded, non-interactive execution. Attach context files with `-f`, force a model with `--model`, and show reasoning with `--thinking`. No pty is required for run mode.

How do I manage interactive OpenCode TUI 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 process kill; never use /exit, which opens an agent selector 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 against the diff versus the main branch.

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`, and pin an explicit binary path such as $HOME/.opencode/bin/opencode if needed.

How do I run multiple OpenCode tasks in parallel safely?

Launch each task in a separate workdir or git worktree with background sessions, then track them with process list. Sharing one working directory across parallel OpenCode sessions causes collisions and should be avoided.