[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GTKAPVGRBA5ABZW6KWRV8":3,"skill-same:01M71GTKAPVGRBA5ABZW6KWRV8":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":14,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":72},"01M71GTKAPVGRBA5ABZW6KWRV8","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.","weareturnone\u002Fgbrain","weareturnone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106660686?v=4","01M71GRFW4YZ9DFYK6J17YXQNB","Roelof Stoelwinder ","01M71GRFWVQF5ASVB08TP5VKWG",0,"MIT","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"smoke test","test","smoke","tests","true","for","fixes","restart","environments","openclaw","read","scripts","break","run","run smoke tests","critical","auto","auto-fix","issues","fix","2026-11-10 10:12:30",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":44,"mutating":46,"triggers":47,"description":52},[45,29],"exec",true,[19,33,48,49,50,51],"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","master","1fd9e273fe234ffb8d2a7705955f087f861a5c3d","skills\u002Fsmoke-test","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain","https:\u002F\u002Fgithub.com\u002Fweareturnone","I have a passion for operations, systems and doing good for the world.","2026-07-08 23:38:19",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":46},[62,65,68],{"tool":63,"command":64},"npx","npx skills add weareturnone\u002Fgbrain --skill smoke-test",{"tool":66,"command":67},"bunx","bunx skills add weareturnone\u002Fgbrain --skill smoke-test",{"tool":69,"command":70},"pnpm","pnpm dlx skills add weareturnone\u002Fgbrain --skill smoke-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[],[74,89,104,119,133,156],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":39},"01M71GTZ2PH49PD2R6RR7MHJZP","signal-detector","Always-on ambient signal capture for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fsignal-detector\u002FSKILL.md",[],[81,82,83,24,28,84,85,86,87,88],"signal","signal detector","detector","capture","reference","message","fixture","ambient",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":39},"01M71GTY1250DC73PGRWDE82KW","query","Look up brain pages in the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fquery\u002FSKILL.md",[],[91,96,85,97,28,98,99,100,101,102,103,24,87],"do","lookup","look","pages","up","brain","search","about",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":39},"01M71GTX0T1T9224P29SD7CSG7","context-now","ALWAYS-ON time-sensitivity discipline for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fcontext-now\u002FSKILL.md",[],[111,112,113,114,115,28,24,116,85,87,117,118],"context","context now","now","time","how","discipline","sensitivity","long",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":39},"01M71GTVZJTSWXBM4ZRF4A7QVA","brain-ops","Core read\u002Fwrite cycle for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[126,101,127,128,97,28,129,85,23,24,29,130,131,87,132],"brain ops","ops","Citation","people","cycle","core","write",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M71GTT4F64V9RMNZ0WRTKWNG","webhook-transforms","Generic framework for converting external events (SMS, meetings, social mentions)\ninto brain-ingestible signals. Define a transform function, register a webhook URL,\nand incoming events get processed through the brain pipeline.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fwebhook-transforms\u002FSKILL.md",[],[140,141,142,143,144,100,145,146,147,148,23,149,102,150,151,152,24,153,154,155],"webhook","transforms","webhook transforms","SET","register","meetings","signals","URL","define","social","event","pipeline","page","sms","generic","get",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":39},"01M71GTRDKSM500PRZEXFNQHF9","testing","Skill validation framework. Validates every skill has SKILL.md with frontmatter,\nevery reference exists, every env var is declared. The testing contract for the\nskill system itself.","https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Ftesting\u002FSKILL.md",[],[158,163,164,32,49,20,165,166,167,168,169,170,171,22,99,172,102,173,174,24],"test skills","validation","with","health","check","env","skill validation","false","contract","skill health","system","validate skills"]