[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GTKAPVGRBA5ABZW6KWRV8":3,"skill-same:01M71GTKAPVGRBA5ABZW6KWRV8":78},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":14,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":63,"updatedAt":64,"install":65,"resources":77},"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",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"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":49,"mutating":51,"triggers":52,"description":57},[50,34],"exec",true,[24,38,53,54,55,56],"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":66,"prompt":76,"zipAvailable":51},[67,70,73],{"tool":68,"command":69},"npx","npx skills add weareturnone\u002Fgbrain --skill smoke-test",{"tool":71,"command":72},"bunx","bunx skills add weareturnone\u002Fgbrain --skill smoke-test",{"tool":74,"command":75},"pnpm","pnpm dlx skills add weareturnone\u002Fgbrain --skill smoke-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fweareturnone\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[],[79,94,109,124,138,161],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":44},"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",[],[86,87,88,29,33,89,90,91,92,93],"signal","signal detector","detector","capture","reference","message","fixture","ambient",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":44},"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",[],[96,101,90,102,33,103,104,105,106,107,108,29,92],"do","lookup","look","pages","up","brain","search","about",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":44},"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",[],[116,117,118,119,120,33,29,121,90,92,122,123],"context","context now","now","time","how","discipline","sensitivity","long",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":44},"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",[],[131,106,132,133,102,33,134,90,28,29,34,135,136,92,137],"brain ops","ops","Citation","people","cycle","core","write",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":44},"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",[],[145,146,147,148,149,105,150,151,152,153,28,154,107,155,156,157,29,158,159,160],"webhook","transforms","webhook transforms","SET","register","meetings","signals","URL","define","social","event","pipeline","page","sms","generic","get",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":176,"publishedAt":44},"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",[167,168,171],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":169,"categoryName":170,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":172,"categoryName":173,"taxonomyType":174,"taxonomyTypeDesc":175},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[163,177,178,37,54,25,179,180,181,182,183,184,185,27,104,186,107,187,188,29],"test skills","validation","with","health","check","env","skill validation","false","contract","skill health","system","validate skills"]