smoke-test

Runs health smoke tests with auto-fixes for gbrain installs after restarts.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/AMC-JTC/gbrain-1 --skill smoke-test-amc-jtc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smoke-test
Source: https://github.com/AMC-JTC/gbrain-1/tree/main/plugin/skills/smoke-test
Command: npx skills add https://github.com/AMC-JTC/gbrain-1 --skill smoke-test-amc-jtc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After a machine or container restart, services like the gbrain worker, database connection, or OpenClaw gateway can silently break. This Skill verifies the health of a gbrain installation, automatically fixes known failure modes, and reports exactly what is still broken. ## Core Features & Use Cases - Eight built-in health checks: Verifies the Bun runtime, GBrain CLI, database connectivity, worker process, OpenClaw Codex plugin, gateway, embedding API key, and brain repo path. - Automatic remediation: Known failures are fixed before reporting, such as reinstalling Zod v4 for the Codex plugin or restarting the worker with correct environment variables. - User-extensible tests: Drop executable scripts into ~/.gbrain/smoke-tests.d/ to add custom checks that run alongside the built-in suite. - Use Case: After a container rebuild, run the smoke test once to confirm all services recovered; the exit code tells you how many failures remain unfixed, and results are logged to /tmp/gbrain-smoke-test.log. ## Quick Start Run the gbrain smoke test to verify all services recovered after the restart and auto-fix any known issues.

Frequently Asked Questions about smoke-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run smoke tests after a container restart?

Run gbrain smoke-test from the CLI, or add it to a startup script with output appended to a log file. The command resolves the test script from the installed package and works for all installs.

How do I add custom health checks to the smoke test suite?

Create executable bash scripts in ~/.gbrain/smoke-tests.d/ where exit code 0 means pass and non-zero means fail. The filename becomes the test name, tests run alphabetically, and each should complete in under 10 seconds.

Does the smoke test work without OpenClaw installed?

Yes, OpenClaw-specific tests like the Codex plugin and gateway checks are skipped gracefully when OpenClaw is absent. Skips do not count as failures in the exit code.

Why does the Codex plugin fail with core.cjs missing after restart?

The Zod v4 npm package sometimes ships without core.cjs, breaking OpenClaw's Codex ACP plugin. The smoke test auto-fixes this with npm install zod@4 --force, but the fix does not survive container restarts, so tests must rerun each time.

What does the smoke test exit code mean?

The exit code equals the number of unfixed failures, so 0 means all tests passed or were auto-fixed. A positive integer indicates how many checks remain broken after auto-fix attempts.