[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C1SDMH7NFFDY20HBJEKCF4":3,"skill-same:01M6C1SDMH7NFFDY20HBJEKCF4":84},{"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":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":65,"ownerHtmlUrl":66,"ownerBlogUrl":67,"ownerDescription":68,"updatedAt":69,"install":70,"resources":83},"01M6C1SDMH7NFFDY20HBJEKCF4","kb-health",null,"Lint and health-check the knowledge base. Finds orphan pages, missing cross-references, stale claims, broken wiki-links, and regenerates the index.","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Fskills\u002Fkb-health\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"health","kb health","kb","fix","claims","path","orphan","efficiency","knowledge-base","knowledge base","health-check","references","only","lint","write","read","broken","check","grep","haiku","knowledge","wiki","Bash","index","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nplatforms: [all]\nname: kb-health\ndescription: Lint and health-check the knowledge base. Finds orphan pages, missing cross-references, stale claims, broken wiki-links, and regenerates the index.\ncommandHint:\n  argumentHint: \"[--path \u003Csubtree>] [--kb \u003Cpath>] [--fix] [--index-only]\"\n  allowedTools: Read, Write, Glob, Grep, Bash\n  model: haiku\n  category: knowledge-base\n  modelRole: efficiency\n  modelTier: economy\n---\n\n# KB Health\n\nAudit the knowledge base for structural and content issues. Reports problems and, with `--fix`, repairs what can be fixed automatically (broken links, missing index entries). Human review is required for content issues (stale claims, empty sections).\n\n## Triggers\n\n- \"check KB health\" → full audit\n- \"find orphan pages\" → orphan check only\n- \"regenerate KB index\" → `--index-only`\n- `\u002Fkb-health` → direct invocation\n\n## Parameters\n\n### `--path \u003Csubtree>` (optional)\nScope the check to a subdirectory (e.g., `--path .aiwg\u002Fkb\u002Fentities\u002F`). Defaults to full KB root.\n\n### `--kb \u003Cpath>` (optional)\nRoot of the knowledge base. **Default**: resolved by `aiwg kb path` (#965), which reads `resolveStorage('kb')` and honors any `roots.kb` override in `.aiwg\u002Fstorage.config`. On the default `fs` backend this is `.aiwg\u002Fkb\u002F`.\n\n```bash\nKB_ROOT=$(aiwg kb path)\naiwg kb list --prefix entities\u002F\naiwg kb get entities\u002Ffoo.md\n```\n\nFortemi storage routing here is only a persistence backend choice. It is not the\nFortemi Core index\u002Fsearch backend used by `aiwg index ... --backend\nfortemi-core`; KB graph health remains local\u002Fstorage-routed, while Fortemi Core\ntraversal parity is exercised through `aiwg index neighbors --graph kb\n--backend fortemi-core` after an explicit sync.\n\n### `--fix` (optional)\nAutomatically repair issues that are safe to fix without human judgment:\n- Remove references to confirmed-missing pages from Sources tables\n- Add pages missing from the index\n- Normalize slug inconsistencies (spaces → hyphens in filenames)\n\nDoes NOT auto-fix: empty required sections, stale claim dates, ambiguous duplicates.\n\n### `--index-only` (optional)\nSkip all checks; only regenerate `index.md`.\n\n---\n\n## Checks\n\n### 1. Orphan Pages\n\nAn orphan is a page with no incoming `[[wiki-link]]` references from any other KB page.\n\nProcedure:\n1. Collect all `.md` files under `\u003Ckb>\u002F`.\n2. For each file, extract all `[[...]]` references.\n3. Build an inverted index: page → set of pages that link to it.\n4. Pages with zero incoming links are orphans.\n\nOrphans in `sources\u002F` are less critical (sources are often terminal nodes). Report them separately.\n\n### 2. Broken Wiki-Links\n\nFor every `[[link-target]]` found in any KB page:\n1. Derive the expected file path (slug → filename in each subdirectory).\n2. Check whether the file exists.\n3. If not: report as a broken link with the containing file and line number.\n\nWith `--fix`: remove confirmed-broken links from Sources tables. Flag broken links in prose sections for manual review (do not silently remove).\n\n### 3. Empty Required Sections\n\nTemplates define required sections (Overview, Definition, Key Takeaways, etc.).\nDetect pages where a required section header exists but the body is a placeholder (`_..._` or a single empty line).\n\nReport as warnings, not errors. Do not auto-fix content.\n\n### 4. Stale Pages\n\nA page is considered stale if:\n- Its `_Last updated:` date is more than 180 days ago, AND\n- At least one source it references was published after that date (detectable via source summary dates)\n\nReport stale pages as advisory — staleness is informational, not a structural error.\n\n### 5. Duplicate Slugs\n\nDetect files with the same normalized slug in different subdirectories (e.g., `entities\u002Fpython.md` and `concepts\u002Fpython.md`). These may be legitimate or accidental duplicates. Report all cases; do not auto-resolve.\n\n---\n\n## Index Regeneration\n\nAlways regenerate `\u003Ckb>\u002Findex.md` at the end of a health check run (or when `--index-only` is used).\n\nThe index lists all KB pages grouped by directory with their first-line description (the `>` blockquote line from templates):\n\n```markdown\n# Knowledge Base Index\n\n_Generated: YYYY-MM-DD — N pages_\n\n## Entities (N)\n- [Entity Name](entities\u002Fentity-name.md) — type · domain\n\n## Concepts (N)\n- [Concept Name](concepts\u002Fconcept-name.md) — category · domain\n\n## Sources (N)\n- [Source Title](sources\u002Fsource-slug.md) — type · author · date\n\n## Comparisons (N)\n- [A vs B](comparisons\u002Fa-vs-b.md) — purpose\n\n## Syntheses (N)\n- [Synthesis Title](syntheses\u002Fsynthesis-slug.md) — type · confidence\n```\n\n---\n\n## Report Format\n\n```\nKB Health Report — YYYY-MM-DD\nRoot: .aiwg\u002Fkb\u002F\nPages scanned: N\n\nERRORS (must fix)\n  Broken links: N\n    entities\u002Ffoo.md:12 — [[missing-page]] not found\n\nWARNINGS (review recommended)\n  Orphan pages: N\n    sources\u002Fold-article.md — no incoming links\n  Empty sections: N\n    concepts\u002Fbar.md — Definition section is placeholder\n  Stale pages: N\n    entities\u002Fbaz.md — last updated 2024-01-01 (>180 days)\n\nINFO\n  Duplicate slugs: N\n    entities\u002Fpython.md and concepts\u002Fpython.md share slug \"python\"\n\nIndex regenerated: .aiwg\u002Fkb\u002Findex.md (N entries)\n```\n\n---\n\n## Scope Limits\n\n- Read-only by default. `--fix` enables targeted writes; `--index-only` writes only `index.md`.\n- Do not delete any pages, even if they appear to be duplicates. Report and let the human decide.\n- Maximum pages scanned per run: 500. If KB exceeds this, use `--path` to scope.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fentity-page.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fconcept-page.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fsource-summary.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Fskills\u002Fkb-ingest\u002FSKILL.md\n","# KB Health\n\nAudit the knowledge base for structural and content issues. Reports problems and, with `--fix`, repairs what can be fixed automatically (broken links, missing index entries). Human review is required for content issues (stale claims, empty sections).\n\n## Triggers\n\n- \"check KB health\" → full audit\n- \"find orphan pages\" → orphan check only\n- \"regenerate KB index\" → `--index-only`\n- `\u002Fkb-health` → direct invocation\n\n## Parameters\n\n### `--path \u003Csubtree>` (optional)\nScope the check to a subdirectory (e.g., `--path .aiwg\u002Fkb\u002Fentities\u002F`). Defaults to full KB root.\n\n### `--kb \u003Cpath>` (optional)\nRoot of the knowledge base. **Default**: resolved by `aiwg kb path` (#965), which reads `resolveStorage('kb')` and honors any `roots.kb` override in `.aiwg\u002Fstorage.config`. On the default `fs` backend this is `.aiwg\u002Fkb\u002F`.\n\n```bash\nKB_ROOT=$(aiwg kb path)\naiwg kb list --prefix entities\u002F\naiwg kb get entities\u002Ffoo.md\n```\n\nFortemi storage routing here is only a persistence backend choice. It is not the\nFortemi Core index\u002Fsearch backend used by `aiwg index ... --backend\nfortemi-core`; KB graph health remains local\u002Fstorage-routed, while Fortemi Core\ntraversal parity is exercised through `aiwg index neighbors --graph kb\n--backend fortemi-core` after an explicit sync.\n\n### `--fix` (optional)\nAutomatically repair issues that are safe to fix without human judgment:\n- Remove references to confirmed-missing pages from Sources tables\n- Add pages missing from the index\n- Normalize slug inconsistencies (spaces → hyphens in filenames)\n\nDoes NOT auto-fix: empty required sections, stale claim dates, ambiguous duplicates.\n\n### `--index-only` (optional)\nSkip all checks; only regenerate `index.md`.\n\n---\n\n## Checks\n\n### 1. Orphan Pages\n\nAn orphan is a page with no incoming `[[wiki-link]]` references from any other KB page.\n\nProcedure:\n1. Collect all `.md` files under `\u003Ckb>\u002F`.\n2. For each file, extract all `[[...]]` references.\n3. Build an inverted index: page → set of pages that link to it.\n4. Pages with zero incoming links are orphans.\n\nOrphans in `sources\u002F` are less critical (sources are often terminal nodes). Report them separately.\n\n### 2. Broken Wiki-Links\n\nFor every `[[link-target]]` found in any KB page:\n1. Derive the expected file path (slug → filename in each subdirectory).\n2. Check whether the file exists.\n3. If not: report as a broken link with the containing file and line number.\n\nWith `--fix`: remove confirmed-broken links from Sources tables. Flag broken links in prose sections for manual review (do not silently remove).\n\n### 3. Empty Required Sections\n\nTemplates define required sections (Overview, Definition, Key Takeaways, etc.).\nDetect pages where a required section header exists but the body is a placeholder (`_..._` or a single empty line).\n\nReport as warnings, not errors. Do not auto-fix content.\n\n### 4. Stale Pages\n\nA page is considered stale if:\n- Its `_Last updated:` date is more than 180 days ago, AND\n- At least one source it references was published after that date (detectable via source summary dates)\n\nReport stale pages as advisory — staleness is informational, not a structural error.\n\n### 5. Duplicate Slugs\n\nDetect files with the same normalized slug in different subdirectories (e.g., `entities\u002Fpython.md` and `concepts\u002Fpython.md`). These may be legitimate or accidental duplicates. Report all cases; do not auto-resolve.\n\n---\n\n## Index Regeneration\n\nAlways regenerate `\u003Ckb>\u002Findex.md` at the end of a health check run (or when `--index-only` is used).\n\nThe index lists all KB pages grouped by directory with their first-line description (the `>` blockquote line from templates):\n\n```markdown\n# Knowledge Base Index\n\n_Generated: YYYY-MM-DD — N pages_\n\n## Entities (N)\n- [Entity Name](entities\u002Fentity-name.md) — type · domain\n\n## Concepts (N)\n- [Concept Name](concepts\u002Fconcept-name.md) — category · domain\n\n## Sources (N)\n- [Source Title](sources\u002Fsource-slug.md) — type · author · date\n\n## Comparisons (N)\n- [A vs B](comparisons\u002Fa-vs-b.md) — purpose\n\n## Syntheses (N)\n- [Synthesis Title](syntheses\u002Fsynthesis-slug.md) — type · confidence\n```\n\n---\n\n## Report Format\n\n```\nKB Health Report — YYYY-MM-DD\nRoot: .aiwg\u002Fkb\u002F\nPages scanned: N\n\nERRORS (must fix)\n  Broken links: N\n    entities\u002Ffoo.md:12 — [[missing-page]] not found\n\nWARNINGS (review recommended)\n  Orphan pages: N\n    sources\u002Fold-article.md — no incoming links\n  Empty sections: N\n    concepts\u002Fbar.md — Definition section is placeholder\n  Stale pages: N\n    entities\u002Fbaz.md — last updated 2024-01-01 (>180 days)\n\nINFO\n  Duplicate slugs: N\n    entities\u002Fpython.md and concepts\u002Fpython.md share slug \"python\"\n\nIndex regenerated: .aiwg\u002Fkb\u002Findex.md (N entries)\n```\n\n---\n\n## Scope Limits\n\n- Read-only by default. `--fix` enables targeted writes; `--index-only` writes only `index.md`.\n- Do not delete any pages, even if they appear to be duplicates. Report and let the human decide.\n- Maximum pages scanned per run: 500. If KB exceeds this, use `--path` to scope.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fentity-page.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fconcept-page.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Ftemplates\u002Fsource-summary.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Fskills\u002Fkb-ingest\u002FSKILL.md\n",{"name":5,"namespace":53,"platforms":54,"commandHint":56,"description":7},"aiwg",[55],"all",{"model":43,"category":32,"modelRole":31,"modelTier":57,"allowedTools":58,"argumentHint":59},"economy","Read, Write, Glob, Grep, Bash","[--path \u003Csubtree>] [--kb \u003Cpath>] [--fix] [--index-only]","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Fskills\u002Fkb-health",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":8,"skillName":5,"commands":71,"prompt":81,"zipAvailable":82},[72,75,78],{"tool":73,"command":74},"npx","npx skills add jmagly\u002Faiwg --skill kb-health",{"tool":76,"command":77},"bunx","bunx skills add jmagly\u002Faiwg --skill kb-health",{"tool":79,"command":80},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill kb-health","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fknowledge-base\u002Fskills\u002Fkb-health\u002FSKILL.md",true,[],[85,110,133,139,146,160],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":92,"publishedAt":48},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[91],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[93,94,95,39,96,97,98,99,100,101,46,102,36,103,104,105,106,107,108,109],"host","host hardening","hardening","re","recommendations","remediation","plan","port","verification","access","retention","audit","never","firewall","bind","secrets","request",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":120,"publishedAt":48},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[116,119],{"categoryNo":117,"categoryName":118,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[121,122,123,39,124,100,125,126,46,127,93,128,36,129,130,105,106,131,132,38],"exposure analysis","analysis","unknown","credentials","collection","ufw","ports","internet","local","scope","reconstruction","operator",{"skillNo":134,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":138,"publishedAt":48},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[137],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[95,93,94,102,39,109,98,97,104,99,100,101,46,108,36,103,96,105,106,107],{"skillNo":140,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":145,"publishedAt":48},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[143,144],{"categoryNo":117,"categoryName":118,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[122,121,105,124,100,125,46,123,93,128,36,129,130,39,106,127,126,131,132,38],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":153,"publishedAt":48},"01M6CB4DDR0B4NNCFK7ZK7449H","fixture-skill","Exercise rule delivery.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frule-delivery\u002Fskills\u002Ffixture-skill\u002FSKILL.md",[152],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[154,155,156,157,158,159],"fixture skill","fixture","rule","delivery","true","exercise",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":167,"publishedAt":48},"01M6CB4AVK1W76MFMPP0JP32CJ","pi-local","Pi-local duplicate-precedence fixture.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fproviders\u002Fpi\u002Fproject\u002F.pi\u002Fskills\u002Fpi-local\u002FSKILL.md",[166],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[168,169,129,170,155],"pi","pi local","duplicate"]