opencode

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

Updated May 29, 2026
One-click install
npx skills add https://github.com/m4an5you6/aspera-agent --skill opencode-m4an5you6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode
Source: https://github.com/m4an5you6/aspera-agent/tree/main/skills/autonomous-ai-agents/opencode
Command: npx skills add https://github.com/m4an5you6/aspera-agent --skill opencode-m4an5you6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating bounded or long-running coding work to an external autonomous agent requires managing CLI flags, interactive TUI sessions, background processes, and session resumption, which is error-prone when done manually. ## Core Features & Use Cases - One-Shot Task Execution: Run bounded coding tasks with opencode run, attaching context files and forcing specific models or reasoning levels. - Interactive Background Sessions: Start the OpenCode TUI with pty support, submit prompts, poll progress, and resume past sessions by ID. - PR Review & Parallel Work: Review pull requests with the built-in opencode pr command and run parallel tasks in isolated 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 receive a summary of 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 prompt'` in the target repository for bounded, non-interactive tasks. Attach context files with `-f`, force a model with `--model provider/model`, and show reasoning with `--thinking`.

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, never `/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?▼

Use separate working directories or git worktrees for each session to avoid file collisions. Launch each `opencode run` command in background mode with its own workdir, then track sessions with the process list action.