MCPInstall

opencode-qa

QA opencode itself, per case: verify the CLI/terminal (opencode run, db, serve, export), prove a specific plugin hook/action/event fired via the SSE event stream, smoke-test the TUI under tmux, and investigate sessions in opencode's SQLite DB by id, title/name, or message text. Ships tested helper scripts (each with a --self-test) plus per-domain references. Use whenever someone wants to QA, smoke-test, verify, or debug opencode's CLI, HTTP server, plugin hooks/events, or TUI, or to find/inspect opencode sessions in the database. Triggers: opencode qa, qa opencode, test opencode, verify opencode hook, opencode session db, find opencode session by id/name/text, opencode tui test, opencode server health, opencode event stream.

Installs
446
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/code-yeongyu/oh-my-openagent --skill opencode-qa
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads opencode-qa automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

opencode QA

QA the opencode coding agent itself. This skill maps each QA need to a tested helper script and a deep reference. Every script ships a --self-test that asserts its scenario against the live machine, so the scripts are both the QA tools and their own regression checks.

Verified against opencode v1.17.7 (bun 1.3.12, macOS). Confirm the installed version with opencode --version; the surface is stable but always sanity check a flag with opencode <cmd> --help.

Golden rules (read before running anything)

  • READS of the live DB are safe and intended. Investigating sessions (Case D) only reads ~/.local/share/opencode/opencode.db.
  • Anything that SPAWNS opencode (serve, run, the TUI) must use an isolated XDG sandbox so QA never writes junk sessions into the real DB. The bundled scripts already do this; if you run opencode by hand for QA, set XDG_DATA_HOME / XDG_CONFIG_HOME / XDG_STATE_HOME / XDG_CACHE_HOME to temp dirs first.
  • Global text search over the part table is a multi-GB scan. Always scope it (--session, --recent, or --since). The text script refuses an unbounded scan on purpose.
  • The opencode source repo (packages/opencode) tests itself with bun test and CANNOT run tests from the repo root. See references/testing-harness.md.

Setup

Scripts live next to this file under scripts/. Invoke them from this skill directory (or with their absolute path):

cd <this-skill-dir>                        # .agents/skills/opencode-qa
bash scripts/lib/common.sh --self-check    # confirm the harness + deps

Docker is the default QA surface. Run QA inside a disposable container that has the latest opencode and a copy of your config, with the host untouched: script/agent/qa-docker.sh (see references/docker-qa.md). The local scripts below are the fallback for when Docker is unavailable or on Windows.

common.sh provides the shared harness (DB path, SQL escaping, isolated XDG sandbox, free port, server start/stop, and an EXIT-trap cleanup). It requires opencode, sqlite3, curl, jq, and tmux on PATH.

Router: pick your case

You want to...CaseScriptReference
Run opencode non-interactively / check a CLI commandAopencode run --format json (inline)references/cli-commands.md
Find a session by its idDscripts/db-session-by-id.sh <ses_id>references/db-investigation.md
Find sessions by title/nameDscripts/db-session-by-name.sh "<text>"references/db-investigation.md
Find sessions by message textDscripts/db-session-by-text.sh --recent N "<text>"references/db-investigation.md
Export a whole session as JSONDscripts/export-roundtrip.sh <ses_id>references/db-investigation.md
Check the HTTP server / an endpointBscripts/server-smoke.shreferences/server-api.md
Prove a hook / action / event firedBscripts/sse-hook-probe.shreferences/events-hooks.md
Prove serve-topology wake runner-split (reproduced/fixed)Bscripts/serve-wake-split-probe.sh --expect reproduced|fixed --evidence-dir DIR (self-test: --self-test; fake LLM: scripts/lib/fake-openai-server.mjs)references/events-hooks.md
Smoke-test the TUICscripts/tui-smoke.shreferences/tui-tmux.md
Write/run a test in the opencode source-(bun test)references/testing-harness.md
Drive opencode from a Bun/TS script-(SDK)references/sdk.md

Case A: CLI / terminal works

The canonical scriptable, non-interactive entry is opencode run. JSON mode emits one event per line so you can assert on it.

# stream structured events (types: text, tool_use, step_start, step_finish, reasoning, error)
opencode run "list files in src" --format json
# run a slash command
opencode run --command commit
# resume the last session
opencode run -c "continue"
# target an already-running server instead of booting one
opencode run "explain auth" --attach http://127.0.0.1:4096 -p "$OPENCODE_SERVER_PASSWORD"

Other QA-useful commands: opencode db path, opencode debug paths, opencode session list --format json, opencode models --verbose. Full flag detail in references/cli-commands.md.

Case B: a specific hook, action, or event

opencode publishes lifecycle events over Server-Sent Events at GET /event. Plugins observe the same events via the event hook, so seeing an event on the wire proves a hook would fire.

# prove the SSE plumbing works (isolated server, asserts server.connected)
bash scripts/sse-hook-probe.sh --self-test

# watch a REAL server for a specific event while you trigger an action
bash scripts/sse-hook-probe.sh --attach http://127.0.0.1:4096 \
  --password "$OPENCODE_SERVER_PASSWORD" --directory "$PWD" \
  --event message.part.updated --timeout 30

Trigger an action over HTTP (fire-and-forget so the stream is not blocked):

curl -X POST -u opencode:$OPENCODE_SERVER_PASSWORD -H 'Content-Type: application/json' \
  -d '{"parts":[{"type":"text","text":"say hi"}]}' \
  "http://127.0.0.1:4096/session/<ses_id>/prompt_async?directory=$PWD"

A real prompt needs a configured provider, so run the watch-and-trigger pattern against your real server, not the isolated sandbox. Event-type catalog, the 21 plugin hook points, and how to load a local plugin: references/events-hooks.md. Server start, auth, and routes: references/server-api.md.

Case C: the TUI

bash scripts/tui-smoke.sh --self-test

This launches the TUI under tmux in an isolated sandbox, confirms it renders (capture-pane), confirms send-keys reaches the composer, tears the tmux session down, and verifies the real DB session count is unchanged.

When TUI visual QA evidence is needed for a PR, follow docs/reference/web-terminal-visual-qa.md: render the TUI through the real xterm.js web terminal and screenshot it - NEVER the tmux capture-pane frame, which degrades color and CJK width. From the repository root:

node script/qa/web-terminal-visual-qa.mjs --title "OpenCode TUI QA" \
  --command "opencode" --input "{Enter}" \
  --evidence-dir .omo/evidence/<slug>/opencode-web-terminal

This runs a real pty, renders it in xterm.js under Chrome, and writes terminal.txt, terminal-ansi.txt, terminal.png (the true-color artifact), and metadata.json with a cleanup receipt (--from-file <capture.ansi> replays a saved raw stream). The isolated scripts/tui-smoke.sh remains the canonical OpenCode TUI boot smoke (tmux), separate from this visual evidence.

Honest verdict: tmux is fine for SMOKE (did it boot, render, accept a key) but fragile for asserting conversation output (the TUI is a 60fps full-screen app). For real behavior assertions use Case A (opencode run), Case B (server API + SSE), or the TUI control HTTP API (POST /tui/append-prompt, POST /tui/submit-prompt, POST /tui/execute-command). Details and the manual tmux recipe: references/tui-tmux.md.

Case D: investigate sessions in the DB

Read-only against the live SQLite DB. The session table is small (title and id lookups are instant); message text lives in the multi-GB part table, so text search must be scoped.

# by id
bash scripts/db-session-by-id.sh ses_3a4ee6335ffedFB8f76BPU1Eb3
# by title / name (newest first; second arg = limit)
bash scripts/db-session-by-name.sh "auth refactor" 20
# by message text - scope with --session, --recent N, or --since "<window>"
bash scripts/db-session-by-text.sh --session ses_3a4e... "ULTRAWORK"
bash scripts/db-session-by-text.sh --recent 50 "permission denied"
bash scripts/db-session-by-text.sh --since "7 days" --limit 50 "TODO"
# export an entire session as clean JSON
bash scripts/export-roundtrip.sh ses_3a4e... > session.json

Ad hoc queries: opencode db "<SQL>" --format json. Schema, tested query shapes with timings, the legacy message/part vs V2 session_message distinction, and the 25 GB caveat: references/db-investigation.md.

Scripts index

Run any script with --self-test to verify it against the live machine, or -h for usage. DB-read scripts are read-only; serve/sse/tui scripts use an isolated sandbox and clean up on exit.

ScriptCaseSelf-test asserts
scripts/lib/common.sh --self-check-deps present, DB path resolves, SQL escaping, free port, sandbox auto-removed
scripts/db-session-by-id.shDid round-trips for a real session
scripts/db-session-by-name.shDa derived title needle returns >=1 row
scripts/db-session-by-text.shDscoped search hits; unbounded scan refused; bounded search <30s
scripts/export-roundtrip.shDexport stdout is valid JSON and .info.id round-trips
scripts/server-smoke.shB/global/health healthy, /doc >=100 paths, no-auth -> 401
scripts/sse-hook-probe.shB/event opens and delivers server.connected
scripts/tui-smoke.shCTUI renders under tmux, tears down, real DB untouched

Risks and caveats

  • 25 GB part table: never run an unbounded text scan. Use --session, --recent, or --since. A naive JOIN ... WHERE session.time_created >= X scans oldest-first and can take ~50s; the scripts use an IN-subquery on the newest sessions (~20ms).
  • opencode export writes its banner to STDERR; pipe with 2>/dev/null before jq or you will get a parse error.
  • The server enforces auth only when OPENCODE_SERVER_PASSWORD is set; otherwise it runs unsecured. Authenticated calls use -u opencode:$PASS. Unauthenticated calls to a secured server return HTTP 401.
  • Installed binary vs dev source: cite dev source paths for internals but verify flags against the installed opencode <cmd> --help.
  • Isolation: any QA that spawns opencode must use an isolated XDG sandbox so it never pollutes the real DB. Prove it by comparing sqlite3 "$(opencode db path)" "SELECT count(*) FROM session" before and after.
  • TUI output assertions are fragile; use the API for real assertions.

References

  • references/cli-commands.md - every QA-relevant opencode subcommand and flag
  • references/db-investigation.md - DB schema, tested queries, the 25 GB caveat
  • references/server-api.md - server start, auth, route catalog, /doc
  • references/events-hooks.md - SSE endpoints, event types, plugin hooks
  • references/tui-tmux.md - tmux recipe, isolation, TUI control API
  • references/testing-harness.md - how opencode tests itself (bun test)
  • references/sdk.md - the @opencode-ai/sdk client (reference only)
  • references/docker-qa.md - run QA in a disposable Docker container (default; local is the fallback)

FAQ

What does the opencode-qa skill do?

QA opencode itself, per case: verify the CLI/terminal (opencode run, db, serve, export), prove a specific plugin hook/action/event fired via the SSE event stream, smoke-test the TUI under tmux, and investigate sessions in opencode's SQLite DB by id, title/name, or message text. Ships tested helper scripts (each with a --self-test) plus per-domain references. Use whenever someone wants to QA, smoke-test, verify, or debug opencode's CLI, HTTP server, plugin hooks/events, or TUI, or to find/inspect opencode sessions in the database. Triggers: opencode qa, qa opencode, test opencode, verify opencode hook, opencode session db, find opencode session by id/name/text, opencode tui test, opencode server health, opencode event stream.

How do I install opencode-qa?

Run npx skills add https://github.com/code-yeongyu/oh-my-openagent --skill opencode-qa in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/opencode-qa/ (personal) or .claude/skills/opencode-qa/ (project).

Which AI agents can use opencode-qa?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is opencode-qa safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains opencode-qa?

It is published by code-yeongyu in code-yeongyu/oh-my-openagent. It has 446 recorded installs.

More from code-yeongyu/oh-my-openagent

View all →

github-triage

code-yeongyu/oh-my-openagent

Read-only GitHub triage for issues AND PRs. 1 item = 1 background task (category: quick). Analyzes all open items and writes evidence-backed reports to /tmp/{datetime}/. Every claim requires a GitHub permalink as proof. NEVER takes any action on GitHub - no comments, no merges, no closes, no labels. Reports only. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'.

github-issue-triage

code-yeongyu/oh-my-openagent

Open the skill to read its SKILL.md instructions.

1.3K installs

work-with-pr

code-yeongyu/oh-my-openagent

Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the smallest atomic, independently-mergeable PRs and builds the independent ones concurrently via one worktree per PR driven by parallel subagents or a team. Unbounded loop: any failing gate sends you back to fix-and-re-QA inside that PR's worktree. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'split into atomic PRs', 'parallel PRs', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery.

pre-publish-review

code-yeongyu/oh-my-openagent

Nuclear-grade 12-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (orchestrator manual QA plus one gate reviewer) for holistic review, and 1 oracle for overall release synthesis. Runs ONLY when the user explicitly asks for a pre-publish review — a plain publish/release request MUST NOT trigger this; /publish ships directly. Triggers: 'pre-publish review', 'review before publish', 'release review', 'pre-release review', 'ready to publish?', 'can I publish?', 'pre-publish', 'safe to publish', 'publishing review', 'pre-publish check'.

hyperplan

code-yeongyu/oh-my-openagent

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the plan agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', 'adversarial plan', 'hostile planning', 'cross-critique plan', '하이퍼플랜', '적대적 계획', '교차 비평'.

remove-deadcode

code-yeongyu/oh-my-openagent

Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits. Triggers: remove dead code, dead code, cleanup, remove unused.

522 installs

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs