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 |
scripts/server-smoke.sh
View on GitHub#!/usr/bin/env bash
# server-smoke.sh - boot an ISOLATED opencode HTTP server and verify the core
# API surface end to end. Uses an isolated XDG sandbox + a random password, so
# it never touches the real ~/.local/share/opencode DB, and tears the server
# down on exit.
#
# Checks:
# 1. GET /global/health -> {"healthy":true,"version":...}
# 2. GET /doc -> OpenAPI spec with >=100 paths
# 3. GET /session (no credentials) -> HTTP 401 (auth is enforced)
#
# Usage:
# server-smoke.sh # run the smoke test
# server-smoke.sh --self-test # same thing (alias for the QA sweep)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$SCRIPT_DIR/lib/common.sh"
oqa_server_smoke() {
oqa_require opencode curl jq || return 1
if ! oqa_start_server; then
oqa_log "FAIL: server did not become ready"; return 1
fi
local url="$OQA_SERVER_URL" auth="opencode:$OQA_SERVER_PASS" fails=0
local healthy version
healthy="$(curl -s -u "$auth" "$url/global/health" | jq -r '.healthy // false')"
version="$(curl -s -u "$auth" "$url/global/health" | jq -r '.version // "?"')"
if [ "$healthy" = "true" ]; then
oqa_pass "GET /global/health healthy=true version=$version ($url)"
else
oqa_log "FAIL: /global/health healthy=$healthy"; fails=$((fails+1))
fi
local npaths
npaths="$(curl -s -u "$auth" "$url/doc" | jq '.paths | length' 2>/dev/null)"
if [ "${npaths:-0}" -ge 100 ]; then
oqa_pass "GET /doc lists $npaths documented paths (>=100)"
else
oqa_log "FAIL: /doc path count=$npaths"; fails=$((fails+1))
fi
local code
code="$(curl -s -o /dev/null -w '%{http_code}' "$url/session?directory=$OQA_PROJ")"
if [ "$code" = "401" ]; then
oqa_pass "unauthenticated GET /session rejected with HTTP 401"
else
oqa_log "FAIL: unauthenticated /session returned $code (expected 401)"; fails=$((fails+1))
fi
if [ "$fails" -eq 0 ]; then
oqa_pass "server-smoke"
return 0
fi
oqa_log "server-smoke had $fails failure(s)"; return 1
}
case "${1:-}" in
-h|--help)
sed -n '2,18p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
exit 0 ;;
*)
oqa_server_smoke; exit $? ;;
esac
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: 196k | Updated | Claude CodeCodex | Verified | Install |