code-yeongyu/oh-my-openagent / .agents/skills/opencode-qa
opencode-qa
VerifiedQA 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.3 KB |
| references/cli-commands.md | markdown | 3.8 KB |
| references/db-investigation.md | markdown | 5.8 KB |
| references/docker-qa.md | markdown | 3.2 KB |
| references/events-hooks.md | markdown | 4.5 KB |
| references/sdk.md | markdown | 4.1 KB |
| references/server-api.md | markdown | 6.5 KB |
| references/testing-harness.md | markdown | 6.2 KB |
| references/tui-tmux.md | markdown | 4.0 KB |
| scripts/db-session-by-id.shexecutable | script | 1.7 KB |
| scripts/db-session-by-name.shexecutable | script | 1.9 KB |
| scripts/db-session-by-text.shexecutable | script | 6.6 KB |
| scripts/export-roundtrip.shexecutable | script | 2.8 KB |
| scripts/lib/common.shexecutable | script | 9.5 KB |
| scripts/lib/fake-openai-branches.mjs | script | 1.2 KB |
| scripts/lib/fake-openai-events.mjs | script | 2.3 KB |
| scripts/lib/fake-openai-server.mjsexecutable | script | 3.7 KB |
| scripts/lsp-e2e.shexecutable | script | 134.1 KB |
| scripts/serve-wake-split-probe.shexecutable | script | 38.2 KB |
| scripts/server-smoke.shexecutable | script | 2.1 KB |
| scripts/sse-hook-probe.shexecutable | script | 4.4 KB |
| scripts/tui-smoke.shexecutable | script | 3.6 KB |
references/docker-qa.md
View on GitHub# Docker QA (default path)
Run opencode QA inside a DISPOSABLE container so the host is never touched and
you always test against the latest opencode. The container itself is the
sandbox: latest released opencode + codex are baked in, a COPY of your local
config is loaded, and the container is removed on exit (`docker run --rm`). This
is the DEFAULT; fall back to running the scripts locally (see SKILL.md) only
when Docker is unavailable or on Windows.
## Use it
`qa-docker.sh` brings up a disposable box (builds `omo-dev` then `omo-qa` on
first use, reused after) and either drops you into it or serves opencode to
your host. From the repo root:
```bash
# a shell inside the box: just type `opencode ...` or `codex ...`
script/agent/qa-docker.sh
script/agent/qa-docker.sh shell
# serve opencode's HTTP API to the host, then drive it from OUTSIDE:
script/agent/qa-docker.sh serve 4096 # terminal 1 (Ctrl-C stops + removes)
curl http://127.0.0.1:4096/global/health # host -> {"healthy":true,"version":"1.17.7"}
opencode run "hi" --attach http://127.0.0.1:4096 # a real turn against the box
# one-off command, or a skill's own self-test, inside:
script/agent/qa-docker.sh exec opencode --version
script/agent/qa-docker.sh exec bash .agents/skills/opencode-qa/scripts/server-smoke.sh --self-test
script/agent/qa-docker.sh --no-config exec opencode --version # skip the config copy
script/agent/qa-docker.sh --clean # remove the QA images
```
`omo-qa` is `omo-dev` (`.devcontainer/Dockerfile`) plus the latest `opencode-ai`
and `@openai/codex` npm packages and `sqlite3 jq curl rsync`. Pin with
`--build-arg OMO_OPENCODE_VERSION=...` on the qa.Dockerfile for a specific release.
## Why the container is the sandbox
The local scripts isolate by pointing `XDG_*` at temp dirs so they never
pollute the real `~/.local/share/opencode/opencode.db`. In Docker the whole
container is throwaway, so isolation is structural: your host DB and config are
never written. `qa-docker.sh` mounts `~/.config/opencode` (and `~/.codex`)
READ-ONLY at `/mnt/host/*`; the entrypoint copies them into the container's
writable home (heavy caches excluded) so QA runs against a COPY.
## Credentials
Secrets are never baked into the image. Provide them at run time only:
- a gitignored `.env` or `.env.local` at the repo root (auto-sourced by
`script/agent/setup.sh` and `script/agent/qa-sandbox.sh`),
- GitHub Codespaces secrets, or
- the devcontainer `remoteEnv` passthrough.
The host config is mounted read-only, so auth that already lives in
`~/.config/opencode` rides along without copying secrets into any image layer.
Fish caveat: if your shell sets `OPENCODE_CONFIG_DIR` (for example a
`profiles/today` override), export it before calling `qa-docker.sh` so the
container resolves the same profile (the runner forwards it with `-e`).
## Fallback: local / Windows
`qa-docker.sh` exits 3 with guidance when Docker is unavailable or on Windows.
There, run the scripts directly on the host (the rest of this skill); they
isolate via temp `XDG_*`. Windows has no Docker QA path here by design.
## Cleanup
Each run auto-removes its container (`--rm`). The `omo-dev` / `omo-qa` images
persist for fast re-runs; drop them with `script/agent/qa-docker.sh --clean`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |