[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MS0JFDJV5YRYRZ9WJWC1C":3,"skill-same:01M75MS0JFDJV5YRYRZ9WJWC1C":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":13,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":54},"01M75MS0JFDJV5YRYRZ9WJWC1C","smoke-test",null,"Post-restart smoke tests + auto-fix for gbrain and OpenClaw environments.\nTests critical services, auto-fixes known issues, extensible via user-defined\ntest scripts in ~\u002F.gbrain\u002Fsmoke-tests.d\u002F*.sh.","Sigmacodeat\u002FSigmabrain","Sigmacodeat","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F220578687?v=4","01M75M8ZBH9439AFP2NTF8K98S","01M75M8ZC680S4377SFWSKP0D1",0,"MIT","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: smoke-test\ndescription: |\n  Post-restart smoke tests + auto-fix for gbrain and OpenClaw environments.\n  Tests critical services, auto-fixes known issues, extensible via user-defined\n  test scripts in ~\u002F.gbrain\u002Fsmoke-tests.d\u002F*.sh.\ntriggers:\n  - \"smoke test\"\n  - \"run smoke tests\"\n  - \"container restart check\"\n  - \"health check\"\n  - \"did the restart break anything\"\n  - \"did the container restart break anything\"\ntools:\n  - exec\n  - read\nmutating: true\n---\n\n# Smoke Test Skillpack\n\n> Run `gbrain smoke-test` or `bash scripts\u002Fsmoke-test.sh` after any container restart.\n\n## Contract\n\nThis skill guarantees:\n- 8 core tests verify gbrain + OpenClaw health after restart\n- Known failures are auto-fixed before reporting\n- User-extensible via `~\u002F.gbrain\u002Fsmoke-tests.d\u002F*.sh` drop-in scripts\n- Results logged to `\u002Ftmp\u002Fgbrain-smoke-test.log`\n- Exit code = number of unfixed failures (0 = all pass)\n\n## Built-in Tests\n\n| # | Test | Auto-Fix |\n|---|------|----------|\n| 1 | Bun runtime | Install from bun.sh |\n| 2 | GBrain CLI loads | Reinstall deps |\n| 3 | GBrain database (doctor) | — |\n| 4 | GBrain worker process | Start worker |\n| 5 | OpenClaw Codex plugin (Zod CJS) | `npm install zod@4 --force` |\n| 6 | OpenClaw gateway | — (may not be started yet) |\n| 7 | Embedding API key | — (check .env) |\n| 8 | Brain repo exists | — |\n\n## Usage\n\n### CLI\n```bash\ngbrain smoke-test\n```\n\n### Direct\n```bash\nbash scripts\u002Fsmoke-test.sh\n```\n\n### From OpenClaw bootstrap\nAdd to your `ensure-services.sh` or equivalent:\n```bash\nbash \u002Fpath\u002Fto\u002Fgbrain\u002Fscripts\u002Fsmoke-test.sh >> \u002Ftmp\u002Fbootstrap.log 2>&1\n```\n\n### From an agent\n```\nexec: bash \u002Fdata\u002Fgbrain\u002Fscripts\u002Fsmoke-test.sh\n```\n\n## Adding Custom Tests\n\nCreate executable scripts in `~\u002F.gbrain\u002Fsmoke-tests.d\u002F`:\n\n```bash\n# ~\u002F.gbrain\u002Fsmoke-tests.d\u002Fcheck-redis.sh\n#!\u002Fbin\u002Fbash\nredis-cli ping | grep -q PONG\n```\n\nRules:\n- Exit 0 = pass, non-zero = fail\n- Filename becomes the test name (e.g. `check-redis` from `check-redis.sh`)\n- Keep tests fast (\u003C 10s each)\n- Tests run in alphabetical order\n\n## Adding Built-in Tests\n\nEdit `scripts\u002Fsmoke-test.sh`. Follow this pattern:\n\n```bash\n# ── N. [Service Name] ──────────────────────────────────────\nif [test condition]; then\n  pass \"[Service Name]\"\nelse\n  # Auto-fix attempt\n  [fix command]\n  if [re-test condition]; then\n    fixed \"[What was fixed]\"\n    pass \"[Service Name] (after fix)\"\n  else\n    fail \"[Service Name] — [error detail]\"\n  fi\nfi\n```\n\n### Design rules:\n1. **Test first** — never fix without confirming broken\n2. **Re-test after fix** — verify the fix worked\n3. **Timeout everything** — `timeout N` on any command that could hang\n4. **Use helpers** — `pass()`, `fail()`, `fixed()`, `skip()`\n5. **Idempotent fixes** — safe to run repeatedly\n6. **Skip gracefully** — `skip()` when a prerequisite is missing, don't fail\n\n## Environment Variables\n\n| Var | Default | Description |\n|-----|---------|-------------|\n| `GBRAIN_SMOKE_LOG` | `\u002Ftmp\u002Fgbrain-smoke-test.log` | Log file path |\n| `GBRAIN_DIR_OVERRIDE` | (auto-detect) | Force gbrain install path |\n| `GBRAIN_DATABASE_URL` | (from .env) | Database connection URL |\n| `OPENCLAW_GATEWAY_PORT` | `18789` | Gateway port to test |\n| `GBRAIN_BRAIN_PATH` | `\u002Fdata\u002Fbrain` | Brain repo path |\n\n## Known Issues & Their Auto-Fixes\n\n### Codex Zod core.cjs Missing (discovered 2026-04-23)\n- **Symptom:** `Cannot find module '.\u002Fcore.cjs'` → all Codex ACP sessions fail\n- **Cause:** Zod v4 npm package ships without `core.cjs` in some installs\n- **Auto-fix:** `npm install zod@4 --force` in the codex extension's zod dir\n- **Persistence:** Does NOT survive container restart (gateway reinstalls deps)\n- This is why smoke tests must run on every restart\n\n### GBrain Worker Auth Failure\n- **Symptom:** Worker can't connect to DB\n- **Cause:** `GBRAIN_DATABASE_URL` not propagated to worker subprocess\n- **Auto-fix:** Script explicitly passes both `DATABASE_URL` and `GBRAIN_DATABASE_URL`\n\n## Anti-Patterns\n\n- ❌ Running smoke tests on every chat turn. Once per container restart (or\n  on user request) is plenty. The script is cheap but it's not free.\n- ❌ Writing a user drop-in without `timeout N` around any command that\n  could hang. A single hung drop-in stalls every subsequent run.\n- ❌ Auto-fixing without confirming the check is actually broken first.\n  The `pass → fail-detected → fix → re-test` loop is the contract; fixes\n  that skip the re-test can report success on a still-broken state.\n- ❌ Treating `skip` as `fail`. Missing prerequisites (no OpenClaw installed,\n  no brain repo configured) are skips, not failures. Exit code = count of\n  real failures, not skipped checks.\n- ❌ Hardcoding paths in a user drop-in. Read env vars\n  (`GBRAIN_DATABASE_URL`, `HOME`, etc.) so the script travels across\n  container rebuilds.\n\n## Output Format\n\nThe script writes a one-line status per check to stdout (✅\u002F❌\u002F🔧\u002F⏭️) plus a\nfinal summary line: `Results: N\u002FM passed, F auto-fixed, S skipped`. A\nstructured timestamped log appends to `$GBRAIN_SMOKE_LOG`\n(default `\u002Ftmp\u002Fgbrain-smoke-test.log`) for post-run forensics. Exit code\nequals the count of unfixed failures (0 = all pass, positive integer =\ncount of remaining failures).\n","# Smoke Test Skillpack\n\n> Run `gbrain smoke-test` or `bash scripts\u002Fsmoke-test.sh` after any container restart.\n\n## Contract\n\nThis skill guarantees:\n- 8 core tests verify gbrain + OpenClaw health after restart\n- Known failures are auto-fixed before reporting\n- User-extensible via `~\u002F.gbrain\u002Fsmoke-tests.d\u002F*.sh` drop-in scripts\n- Results logged to `\u002Ftmp\u002Fgbrain-smoke-test.log`\n- Exit code = number of unfixed failures (0 = all pass)\n\n## Built-in Tests\n\n| # | Test | Auto-Fix |\n|---|------|----------|\n| 1 | Bun runtime | Install from bun.sh |\n| 2 | GBrain CLI loads | Reinstall deps |\n| 3 | GBrain database (doctor) | — |\n| 4 | GBrain worker process | Start worker |\n| 5 | OpenClaw Codex plugin (Zod CJS) | `npm install zod@4 --force` |\n| 6 | OpenClaw gateway | — (may not be started yet) |\n| 7 | Embedding API key | — (check .env) |\n| 8 | Brain repo exists | — |\n\n## Usage\n\n### CLI\n```bash\ngbrain smoke-test\n```\n\n### Direct\n```bash\nbash scripts\u002Fsmoke-test.sh\n```\n\n### From OpenClaw bootstrap\nAdd to your `ensure-services.sh` or equivalent:\n```bash\nbash \u002Fpath\u002Fto\u002Fgbrain\u002Fscripts\u002Fsmoke-test.sh >> \u002Ftmp\u002Fbootstrap.log 2>&1\n```\n\n### From an agent\n```\nexec: bash \u002Fdata\u002Fgbrain\u002Fscripts\u002Fsmoke-test.sh\n```\n\n## Adding Custom Tests\n\nCreate executable scripts in `~\u002F.gbrain\u002Fsmoke-tests.d\u002F`:\n\n```bash\n# ~\u002F.gbrain\u002Fsmoke-tests.d\u002Fcheck-redis.sh\n#!\u002Fbin\u002Fbash\nredis-cli ping | grep -q PONG\n```\n\nRules:\n- Exit 0 = pass, non-zero = fail\n- Filename becomes the test name (e.g. `check-redis` from `check-redis.sh`)\n- Keep tests fast (\u003C 10s each)\n- Tests run in alphabetical order\n\n## Adding Built-in Tests\n\nEdit `scripts\u002Fsmoke-test.sh`. Follow this pattern:\n\n```bash\n# ── N. [Service Name] ──────────────────────────────────────\nif [test condition]; then\n  pass \"[Service Name]\"\nelse\n  # Auto-fix attempt\n  [fix command]\n  if [re-test condition]; then\n    fixed \"[What was fixed]\"\n    pass \"[Service Name] (after fix)\"\n  else\n    fail \"[Service Name] — [error detail]\"\n  fi\nfi\n```\n\n### Design rules:\n1. **Test first** — never fix without confirming broken\n2. **Re-test after fix** — verify the fix worked\n3. **Timeout everything** — `timeout N` on any command that could hang\n4. **Use helpers** — `pass()`, `fail()`, `fixed()`, `skip()`\n5. **Idempotent fixes** — safe to run repeatedly\n6. **Skip gracefully** — `skip()` when a prerequisite is missing, don't fail\n\n## Environment Variables\n\n| Var | Default | Description |\n|-----|---------|-------------|\n| `GBRAIN_SMOKE_LOG` | `\u002Ftmp\u002Fgbrain-smoke-test.log` | Log file path |\n| `GBRAIN_DIR_OVERRIDE` | (auto-detect) | Force gbrain install path |\n| `GBRAIN_DATABASE_URL` | (from .env) | Database connection URL |\n| `OPENCLAW_GATEWAY_PORT` | `18789` | Gateway port to test |\n| `GBRAIN_BRAIN_PATH` | `\u002Fdata\u002Fbrain` | Brain repo path |\n\n## Known Issues & Their Auto-Fixes\n\n### Codex Zod core.cjs Missing (discovered 2026-04-23)\n- **Symptom:** `Cannot find module '.\u002Fcore.cjs'` → all Codex ACP sessions fail\n- **Cause:** Zod v4 npm package ships without `core.cjs` in some installs\n- **Auto-fix:** `npm install zod@4 --force` in the codex extension's zod dir\n- **Persistence:** Does NOT survive container restart (gateway reinstalls deps)\n- This is why smoke tests must run on every restart\n\n### GBrain Worker Auth Failure\n- **Symptom:** Worker can't connect to DB\n- **Cause:** `GBRAIN_DATABASE_URL` not propagated to worker subprocess\n- **Auto-fix:** Script explicitly passes both `DATABASE_URL` and `GBRAIN_DATABASE_URL`\n\n## Anti-Patterns\n\n- ❌ Running smoke tests on every chat turn. Once per container restart (or\n  on user request) is plenty. The script is cheap but it's not free.\n- ❌ Writing a user drop-in without `timeout N` around any command that\n  could hang. A single hung drop-in stalls every subsequent run.\n- ❌ Auto-fixing without confirming the check is actually broken first.\n  The `pass → fail-detected → fix → re-test` loop is the contract; fixes\n  that skip the re-test can report success on a still-broken state.\n- ❌ Treating `skip` as `fail`. Missing prerequisites (no OpenClaw installed,\n  no brain repo configured) are skips, not failures. Exit code = count of\n  real failures, not skipped checks.\n- ❌ Hardcoding paths in a user drop-in. Read env vars\n  (`GBRAIN_DATABASE_URL`, `HOME`, etc.) so the script travels across\n  container rebuilds.\n\n## Output Format\n\nThe script writes a one-line status per check to stdout (✅\u002F❌\u002F🔧\u002F⏭️) plus a\nfinal summary line: `Results: N\u002FM passed, F auto-fixed, S skipped`. A\nstructured timestamped log appends to `$GBRAIN_SMOKE_LOG`\n(default `\u002Ftmp\u002Fgbrain-smoke-test.log`) for post-run forensics. Exit code\nequals the count of unfixed failures (0 = all pass, positive integer =\ncount of remaining failures).\n",{"name":5,"tools":23,"mutating":26,"triggers":27,"description":34},[24,25],"exec","read",true,[28,29,30,31,32,33],"smoke test","run smoke tests","container restart check","health check","did the restart break anything","did the container restart break anything","Post-restart smoke tests + auto-fix for gbrain and OpenClaw environments.\nTests critical services, auto-fixes known issues, extensible via user-defined\ntest scripts in ~\u002F.gbrain\u002Fsmoke-tests.d\u002F*.sh.\n","main","b8e699fc7cff8641b94a51ac9d4aa599fcc03ae5","server\u002Fskills\u002Fsmoke-test","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain","https:\u002F\u002Fsigmabrain.vercel.app","https:\u002F\u002Fgithub.com\u002FSigmacodeat","2026-07-09 09:21:55",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":26},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Sigmacodeat\u002FSigmabrain --skill smoke-test",{"tool":48,"command":49},"bunx","bunx skills add Sigmacodeat\u002FSigmabrain --skill smoke-test",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Sigmacodeat\u002FSigmabrain --skill smoke-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[],[56,62,68,75,82,89],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M75MW3405DES0348DPKVF20G","query-helper","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M75MW29T3N856QPT2SK467A3","broken","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M75MVZV51CX9W3Y602M0GJR9","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M75MVXQAQBVNQBZPKPEBPRHV","signal-detector","Always-on ambient signal capture for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fsignal-detector\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M75MVWJN0EV5EFW6JMMC73XC","query","Look up brain pages in the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fquery\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M75MVVA7Q6PMDBTPQGT49M6M","context-now","ALWAYS-ON time-sensitivity discipline for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FSigmacodeat\u002FSigmabrain\u002Fblob\u002Fmain\u002Fserver\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fcontext-now\u002FSKILL.md",[],[]]