Skip to content
Agentmart
Submit a tool

opencode-agent

Run OpenCode CLI as an independent coding agent across its provider catalog, capture its session, or dispatch its profiled GitHub PR reviewer.

Skill by ejarmand

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ejarmand-opencode-agent

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Run OpenCode CLI as an independent coding agent across its provider catalog, capture its session, or dispatch its profiled GitHub PR reviewer.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/opencode-agent

What's inside

Skill name
opencode-agent
Description
Run OpenCode CLI as an independent coding agent across its provider catalog, capture its session, or dispatch its profiled GitHub PR reviewer.
License
MIT
Instructions
102 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (5)

  • SKILL.md
  • openai.yaml · agents/
  • server.js · plugins/decline-long-retry/
  • config.json · profiles/github-pr-reviewer/
  • run-profiled.sh · scripts/

SKILL.md (first lines)

# OpenCode Agent

Run `opencode run` from the intended workspace with one selected
`provider/model`. Read `/cross-provider-agent` first; backend choice and
authority doctrine live there.

## Check the transport

This skill targets OpenCode 2 (verified against 2.0.28). Treat installed help
as authoritative:

```bash
opencode --version
opencode run --help
opencode auth list
```

OpenCode accepts stored provider credentials and providers' conventional
environment variables.

## Choose the provider route

The `provider/` prefix decides who sees the prompt.

- Paid models: use `opencode/<model>` (OpenCode Zen). Zen's paid models
  follow its zero-retention policy; OpenAI and Anthropic models there are
  retained 30 days.
- Free, trial and Contributor models on Zen collect data. Use them only
  where repository policy allows.

## Start and monitor a worker

```bash
cd /absolute/path/to/workspace && \
  opencode run --format json --model opencode/<model> "TASK"
```

Pass the task as a plain argument, not after `--`: OpenCode 2 sends anything
after `--` twice. Select a variant in the model, as `opencode/<model>#high`.
`run` attaches to the user's background OpenCode service unless given
`--standalone`.

Capture `sessionID` from the first JSON event. Resume the same session with
`--session SESSION_ID`; add `--fork` when follow-up work must branch from it.
On completion require a successful process exit and no error event or failed
tool. OpenCode 2 exits nonzero when a step fails or the run is interrupted,
and does not always emit a final `step_finish`. The calling agent owns
monitoring and termination.

## Profiled dispatch

For running limited opencode sessions based on particular profiles use 

```bash
/absolute/path/to/opencode-agent/scripts/run-profiled.sh \
  --workspace /absolute/path/to/workspace \
  --profile github-pr-reviewer \
  --model opencode/deepseek-v4-flash \
  -- "REVIEW_TASK"
```

Add `--variant high` before `--` when the review calls for high effort. The
runner passes it to OpenCode in the model, as `opencode/<model>#high`. The
prompt must not start with `-`. `--agent` picks another primary agent from the
profile; the runner refuses subagents, which OpenCode would otherwise silently
swap for its default agent.

The runner starts OpenCode with `--standalone`, a private server inside the
sandbox, so a profiled run never attaches to the user's background service and
its config and credentials. OpenCode sees no user, project or system
(`/etc/opencode`) config or plugins; the only plugin is the runner's own,
below.

The runner mounts the workspace read-only at its own path, and a linked
worktree's repository git dir with it, so `git` and `gh` work inside as they do
outside; `gh` needs no `--repo`.

OpenCode prints nothing while it waits on a provider, so the runner bounds
those waits:

- `--provider-timeout SECONDS` (default 120) limits the wait for response
  headers and between stream chunks. OpenCode retries a timed-out request a
  few times, then emits an error event and exits nonzero. Timeouts the profile
  sets for that provider win.
- A run with no event for `--idle-timeout SECONDS` (default 1800) is stopped
  with exit 75, after the runner prints what each OpenCode process was waiting
  on (its stdin, kernel wait channel and TCP connections) and the log tail.
  Treat 75 as a failed run and report those lines rather than retrying
  blindly.
- OpenCode 2 waits out a provider's rate limit or overload (429, 503, 529)
  silently, honoring retry-after up to 15 minutes a retry. The runner's plugin
  lets it wait at most `--rate-limit-grace SECONDS` (default 60); a longer
  retry-after fails the run, and the runner prints the provider's error and
  exits 76. Retry later or dispatch another provider.

### available profiles

**github-pr-reviewer**: `profiles/github-pr-reviewer/config.json` encodes the
provider-neutral contract from `/cross-provider-agent`, including the
`code-review` skill and its two named child agents.

From ejarmand/skills, MIT.

More from ejarmand/skills

Signals

Stars
1
Forks
0
Open issues
20
Last commit (this folder)
Oct 14, 2026 (14 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ejarmand

Cite this page

opencode-agent skill. Agent Mart. https://agentmart.dev/skills/ejarmand-opencode-agent (last updated 2026-10-24)