# Opencode QA

QA opencode itself, per case: verify the CLI/terminal (opencode run, db, serve...

- Repository: https://github.com/code-yeongyu/oh-my-openagent (70577 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add code-yeongyu/oh-my-openagent --skill opencode-qa -g -a claude-code -y`
Codex: `npx skills add code-yeongyu/oh-my-openagent --skill opencode-qa -g -a codex -y`
Cursor: `npx skills add code-yeongyu/oh-my-openagent --skill opencode-qa -g -a cursor -y`
Gemini CLI: `npx skills add code-yeongyu/oh-my-openagent --skill opencode-qa -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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):

```bash
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](references/docker-qa.md)).
The local scripts below are the fallback for when Docker is unavailable or on
Windows.

The rest: https://github.com/code-yeongyu/oh-my-openagent/blob/HEAD/.agents/skills/opencode-qa/SKILL.md
