Agent skill

Smoke Test

by garrytan in garrytan/gbrain

Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present).

MITAuto-check: notesTesting & QA

Install Smoke Test

skills CLI
$ npx skills add garrytan/gbrain --skill smoke-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install garrytan/gbrain smoke-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/garrytan/gbrain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/smoke-test .claude/skills/smoke-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smoke-test
GitHub stars
31k
Token cost
~1.8k tokens
SKILL.md length
774 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present).

  • Works in 6 steps: Test first — never fix without… → Re-test after fix — verify the fix worked → Timeout everything — timeout N on any… → …
  • Tasks that involve QA and bug reports
  • SKILL.md covers Contract, Built-in Tests, Usage and Adding Custom Tests, plus 6 more sections
  • Calls bash, npm and redis-cli

What it does

Smoke Test is an agent skill from garrytan/gbrain. Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present). Run after machine/container restarts or whenever something seems broken. Tests critical services, auto-fixes bounded local issues, and reports worker topology without starting daemons. Extensible via user-defined test scripts in ~/.gbrain/smoke-tests.d/.sh.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering QA and bug reports. It works with Zod. The repository describes itself as: Garry's Opinionated OpenClaw/Hermes Agent Brain. The licence is MIT.

When your agent uses it

  • Tasks that involve QA and bug reports

Example prompts

  • “/smoke-test”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Test first — never fix without confirming broken
  2. Re-test after fix — verify the fix worked
  3. Timeout everything — timeout N on any command that could hang
  4. Use helpers — pass(), fail(), fixed(), skip()
  5. Idempotent fixes — safe to run repeatedly
  6. Skip gracefully — skip() when a prerequisite is missing, don't fail

What it can do on your machine

Read from SKILL.md and the folder at commit fc54831. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bash
    • npm
    • redis-cli

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smoke Test loads about 1.8k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 774 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:48
    | 7 | Embedding API key | — (check .env) |
  • NoteMentions a .env fileSKILL.md:135
    | `GBRAIN_DATABASE_URL` | (from .env) | Database connection URL |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from garrytan/gbrain at commit fc54831, republished under its MIT licence (© garrytan). 774 words, ~1,803 tokens.

Download SKILL.mdSave it as .claude/skills/smoke-test/SKILL.md (or your agent's skills folder).
name
smoke-test
description
Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present). Run after machine/container restarts or whenever something seems broken. Tests critical services, auto-fixes bounded local issues, and reports worker topology without starting daemons. Extensible via user-defined test scripts in ~/.gbrain/smoke-tests.d/*.sh.
triggers
smoke test, run smoke tests, container restart check, health check, did the restart break anything, did the container restart break anything
tools
exec, read
mutating
true

Smoke Test Skillpack

Run gbrain smoke-test after any machine or container restart, or whenever something seems broken.

Contract

This skill guarantees:

  • 8 core tests verify gbrain health after restart (plus OpenClaw services when present; skipped otherwise)
  • Bounded local failures are auto-fixed before reporting; worker repair is explicit because process topology and shell-job policy are operator choices
  • User-extensible via ~/.gbrain/smoke-tests.d/*.sh drop-in scripts
  • Results logged to /tmp/gbrain-smoke-test.log
  • Exit code = number of unfixed failures (0 = all pass)

Built-in Tests

#TestAuto-Fix
1Bun runtimeInstall from bun.sh
2GBrain CLI loadsReinstall deps
3GBrain database (engine identity via gbrain engine status --json, then doctor --json's connection check)gbrain db-repair --yes, re-test
4GBrain worker process— (native supervisor status + duplicate detection)
5OpenClaw Codex plugin (Zod CJS); skips if OpenClaw absentnpm install zod@4 --force
6OpenClaw gateway; skips if OpenClaw absent— (may not be started yet)
7Embedding API key— (check .env)
8Brain repo exists—

Usage

CLI
bash
gbrain smoke-test

This is the invocation for all installs; it resolves the test script from the installed package.

From any startup script or login hook
bash
gbrain smoke-test >> /tmp/bootstrap.log 2>&1
From OpenClaw bootstrap (OpenClaw deployments only)

Add to your ensure-services.sh or equivalent:

bash
bash /path/to/gbrain/scripts/smoke-test.sh >> /tmp/bootstrap.log 2>&1
From an agent
exec: gbrain smoke-test

Contributor note: inside a gbrain repo checkout you can also run the script directly with bash scripts/smoke-test.sh.

Adding Custom Tests

Create executable scripts in ~/.gbrain/smoke-tests.d/:

bash
# ~/.gbrain/smoke-tests.d/check-redis.sh
#!/bin/bash
redis-cli ping | grep -q PONG

Rules:

  • Exit 0 = pass, non-zero = fail
  • Filename becomes the test name (e.g. check-redis from check-redis.sh)
  • Keep tests fast (< 10s each)
  • Tests run in alphabetical order

Adding Built-in Tests (gbrain contributors)

This section is for contributors working in the gbrain source repo. Plugin installs ship the script read-only and upgrades overwrite it; if you just want extra checks, use the ~/.gbrain/smoke-tests.d/ drop-in scripts above.

Edit scripts/smoke-test.sh. Follow this pattern:

bash
# ── N. [Service Name] ──────────────────────────────────────
if [test condition]; then
  pass "[Service Name]"
else
  # Auto-fix attempt
  [fix command]
  if [re-test condition]; then
    fixed "[What was fixed]"
    pass "[Service Name] (after fix)"
  else
    fail "[Service Name] — [error detail]"
  fi
fi
Design rules:
  1. Test first — never fix without confirming broken
  2. Re-test after fix — verify the fix worked
  3. Timeout everything — timeout N on any command that could hang
  4. Use helpers — pass(), fail(), fixed(), skip()
  5. Idempotent fixes — safe to run repeatedly
  6. Skip gracefully — skip() when a prerequisite is missing, don't fail

Environment Variables

VarDefaultDescription
GBRAIN_SMOKE_LOG/tmp/gbrain-smoke-test.logLog file path
GBRAIN_DIR_OVERRIDE(auto-detect)Force gbrain install path
GBRAIN_BUN_PATH(auto-detect)Force Bun binary path
GBRAIN_DATABASE_URL(from .env)Database connection URL
GBRAIN_SMOKE_WORKER_PID_FILE/tmp/gbrain-worker.pidLegacy bare-worker PID path
OPENCLAW_GATEWAY_PORT18789Gateway port to test
GBRAIN_BRAIN_PATH(deployment-specific)Brain repo path. Container deployments default to /data/brain; set it to your brain repo path otherwise. Test 8 skips (not fails) when unset.

Known Issues & Their Auto-Fixes

Codex Zod core.cjs Missing (discovered 2026-04-23)

(OpenClaw gateway deployments only: this concerns OpenClaw's Codex ACP plugin, not the OpenAI Codex CLI.)

  • Symptom: Cannot find module './core.cjs' → all Codex ACP sessions fail
  • Cause: Zod v4 npm package ships without core.cjs in some installs
  • Auto-fix: npm install zod@4 --force in the codex extension's zod dir
  • Persistence: Does NOT survive container restart (gateway reinstalls deps)
  • This is why smoke tests must run on every restart
Show full SKILL.md (292 more words)Show less
GBrain Worker Auth Failure
  • Symptom: Worker can't connect to DB
  • Cause: GBRAIN_DATABASE_URL not propagated to worker subprocess
  • Auto-fix: Script explicitly passes both DATABASE_URL and GBRAIN_DATABASE_URL

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • Exit code = number of unfixed failures: report each by name and the attempted fix; never report all-green when a test was skipped.
  • The database test fails with a GBRAIN_DB_ACCESS marker: run gbrain db-repair and re-test; the rewrite tier needs the user's agreement.
  • The embedding API key check fails: there is no auto-fix. Tell the user which key is missing and that search runs keyword-only until it is set.

Anti-Patterns

  • ❌ Running smoke tests on every chat turn. Once per container restart (or on user request) is plenty. The script is cheap but it's not free.
  • ❌ Writing a user drop-in without timeout N around any command that could hang. A single hung drop-in stalls every subsequent run.
  • ❌ Auto-fixing without confirming the check is actually broken first. The pass → fail-detected → fix → re-test loop is the contract; fixes that skip the re-test can report success on a still-broken state.
  • ❌ Treating skip as fail. Missing prerequisites (no OpenClaw installed, no brain repo configured) are skips, not failures. Exit code = count of real failures, not skipped checks.
  • ❌ Hardcoding paths in a user drop-in. Read env vars (GBRAIN_DATABASE_URL, HOME, etc.) so the script travels across container rebuilds.

Output Format

The script writes a one-line status per check to stdout (✅/❌/🔧/⏭️) plus a final summary line: Results: N/M passed, F auto-fixed, S skipped. A structured timestamped log appends to $GBRAIN_SMOKE_LOG (default /tmp/gbrain-smoke-test.log) for post-run forensics. Exit code equals the count of unfixed failures (0 = all pass, positive integer = count of remaining failures).

© garrytan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/smoke-test of garrytan/gbrain.

Open the folder on GitHubat commit fc54831

Compare with similar skills

Smoke Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smoke Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smoke Test this skillgarrytan/gbrain31k—~1.8kAutomated safety check: NotesMIT
Smoke Testinbrainfun/inbrain142—~1.3kAutomated safety check: NotesCustom licence
Dogfood Exploratory QAvercel-labs/agent-browser44k8 repos~2.7kAutomated safety check: PassApache-2.0
DeerFlow Smoke Testbytedance/deer-flow84k—~2.5kAutomated safety check: NotesMIT
CodexBar Live QAsteipete/CodexBar22k—~1.2kAutomated safety check: PassMIT
Diagnose Playwright Failure as Product Bugappsmithorg/appsmith41k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • Smoke Test

    inbrainfun/inbrain

    Post-restart smoke tests + auto-fix for inbrain and OpenClaw environments.

    142 GitHub stars~1.3k tokensUpdated 2 mo ago
    Testing & QAAuto-check: notes
  • Dogfood Exploratory QA

    vercel-labs/agent-browser

    Official

    Explores a web app with the agent-browser CLI to find bugs and UX problems, then writes a report with screenshots, repro videos and step-by-step reproduction for each issue.

    44k GitHub starsUsed in 8 repos~2.7k tokens
    Testing & QAAuto-check passed
  • DeerFlow Smoke Test

    bytedance/deer-flow

    Walks through an end-to-end smoke test of a DeerFlow deployment: pull the latest code, deploy with Docker or locally, verify services, run health checks and write a report.

    84k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check: notes
  • CodexBar Live QA

    steipete/CodexBar

    Runs live QA for the CodexBar app: provider usage matrix checks through its packaged CLI, config validation and menu checks, with 1Password-backed credentials handled safely.

    22k GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Investigates a stubbornly failing Playwright test as a possible product bug, using error output, screenshots, traces and server code, and writes a structured bug report.

    41k GitHub stars~1.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Verifies a delivery end to end by driving the real product on a CLI, web, desktop or iOS Simulator surface, capturing evidence and publishing a round with the lh CLI.

    83k GitHub stars~9.7k tokensUpdated today
    Testing & QAAuto-check passed

More from garrytan/gbrain

All 47 skills in this repo
  • Traces a factual error the user points out back to its source (a brain page, a memory file, SOUL.md or USER.md, or a hallucination) and fixes that source instead of just noting the correction.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Searches and writes a company-wide knowledge brain through the gbrain CLI, so durable decisions and facts about people, projects and history stay findable beyond one session.

    31k GitHub stars~875 tokensUpdated today
    Auto-check passed
  • Idea Ingest

    garrytan/gbrain

    Ingest links, articles, tweets, and ideas into the brain. An agent skill from garrytan/gbrain.

    31k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Sends what your notes already know about a topic to Perplexity, so the cited web search reports only what is new, such as entity updates or deal changes.

    31k GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Schema Unify

    garrytan/gbrain

    Migrate a brain from gbrain-base (or any pack) to gbrain-base-v2's 14-canonical-type taxonomy via gbrain onboard --check + the unify-types Minion handler.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Skillpack Check

    garrytan/gbrain

    Run gbrain skillpack-check to produce an agent-readable JSON health report for the gbrain install.

    31k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Smoke Test

What does Smoke Test do?

Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present). Smoke Test is an agent skill from garrytan/gbrain. Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present).

When should I use Smoke Test?

Smoke Test fits situations like: tasks that involve QA and bug reports.

How do I install Smoke Test in Claude Code?

Run `npx skills add garrytan/gbrain --skill smoke-test -a claude-code`. Or copy the skill folder (skills/smoke-test in garrytan/gbrain) into .claude/skills/smoke-test in your project. Claude Code loads it when a task matches its description.

How do I install Smoke Test in Codex?

Run `npx skills add garrytan/gbrain --skill smoke-test -a codex`. Or copy the skill folder (skills/smoke-test in garrytan/gbrain) into .agents/skills/smoke-test in your project. Codex loads it when a task matches its description.

Can I use Smoke Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add garrytan/gbrain --skill smoke-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smoke-test, .gemini/skills/smoke-test, .github/skills/smoke-test and .opencode/skills/smoke-test in your project.

What does Smoke Test need to run?

Going by SKILL.md and its folder, Smoke Test needs the command-line tools its instructions call (bash, npm and redis-cli). Our summary lists: Node.js.

Does Smoke Test access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Smoke Test safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Smoke Test use?

Smoke Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smoke Test use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Smoke Test?

Skills that share tags, products or a category with Smoke Test: Smoke Test (inbrainfun/inbrain, 142 stars), Dogfood Exploratory QA (vercel-labs/agent-browser, 44k stars), DeerFlow Smoke Test (bytedance/deer-flow, 84k stars) and CodexBar Live QA (steipete/CodexBar, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smoke Test?

garrytan (a GitHub user) maintains it in garrytan/gbrain, which has 30,701 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 9, 2026.

Source: garrytan/gbrain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.