[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXS873AD1Y6RTM6GV47F3E":3,"skill-same:01M6GXS873AD1Y6RTM6GV47F3E":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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":56,"ownerDescription":58,"updatedAt":59,"install":60,"resources":72},"01M6GXS873AD1Y6RTM6GV47F3E","wiki",null,"Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.","SethGammon\u002FCitadel","SethGammon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5523585?v=4","01M6GXJ90FD2CE9QF5GQERWN06","Seth Gammon","01M6GXJ94VXYGK5KAW14EYE901",931,"MIT","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"files","native","sources","false","as","db","project","knowledge base","self","maintain","vector","up","karpathy wiki","knowledge management","karpathy","knowledge","markdown","librarian","embeddings","2026-11-10 10:12:30",false,"---\nname: wiki\nlicense: MIT\ndescription: >-\n  Markdown-first knowledge base where the LLM acts as librarian. Ingests raw\n  sources, compiles and interlinks topic files, self-maintains an index. No\n  vector DB or embeddings required -- uses LLM-native navigation over structured\n  markdown up to ~400K words.\nuser-invocable: true\nauto-trigger: false\ntrigger_keywords:\n  - wiki\n  - knowledge base\n  - llm wiki\n  - project wiki\n  - build a wiki\n  - maintain knowledge\n  - knowledge management\n  - llm-wiki\n  - karpathy wiki\nlast-updated: 2026-04-06\n---\n\n# \u002Fwiki -- LLM-Native Knowledge Base\n\n## Orientation\n\n**Use when:** building and querying a markdown-first knowledge base -- ingests raw notes, deduplicates, surfaces answers.\n**Don't use when:** capturing session learnings into the evolve pipeline (use \u002Flearn); generating structured code documentation (use \u002Fdoc-gen).\n\n## Directory Structure\n\n```text\nwiki\u002F\n  index.md              # Master index\n  raw\u002F                  # Unprocessed sources (timestamped files)\n  topics\u002F               # Compiled topic files (one per topic, interlinked)\n  .wiki-meta.json       # Stats: topic count, source count, last compaction\n```\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fwiki` | Status overview: topic count, last update, pending raw sources |\n| `\u002Fwiki --add [source]` | Ingest a new source into the wiki |\n| `\u002Fwiki --query [question]` | Answer a question using wiki knowledge |\n| `\u002Fwiki --status` | Detailed wiki health: topic count, staleness, orphan detection |\n| `\u002Fwiki --compact` | Merge, deduplicate, and reorganize topics |\n| `\u002Fwiki --rebuild-index` | Regenerate index.md from current topic files |\n| `\u002Fwiki init [path]` | Initialize a new wiki at the specified path |\n\n## Protocol\n\n### Command: `\u002Fwiki init [path]`\n\nCreate `wiki\u002F`, `wiki\u002Fraw\u002F`, `wiki\u002Ftopics\u002F`, an empty `wiki\u002Findex.md`, and `wiki\u002F.wiki-meta.json` with fields: `created`, `lastUpdated`, `topicCount: 0`, `sourceCount: 0`, `totalWords: 0`, `lastCompaction: null`. Default path: `wiki\u002F` at project root.\n\n### Command: `\u002Fwiki --add [source]`\n\nIngest a new source into the wiki.\n\n**Step 1:** Determine source type — URL (fetch with WebFetch), file path (read), raw text (use directly), no argument (ask user).\n\n**Step 2:** Write raw content to `wiki\u002Fraw\u002Fsource-{timestamp}.md` with header: title\u002FURL, ingested date, type, original reference.\n\n**Step 3:** Identify 1-5 topics. For each: check if a topic file already exists — append to existing or create `wiki\u002Ftopics\u002F{slug}.md`.\n\n**Step 4:** Each topic file has: title, `> Last updated`, `> Sources`, compiled content, and `## Related Topics` with `[[slug]]` cross-links. Scan existing topics for cross-links when writing.\n\n**Step 5:** Regenerate `wiki\u002Findex.md` with stats header, Topics table (`[[slug]]` | summary | last updated), and Recent Sources table.\n\n**Step 6:** Update `wiki\u002F.wiki-meta.json` with new counts.\n\n**Step 7:** Output: source description, topics created, topics updated, index counts.\n\n### Command: `\u002Fwiki --query [question]`\n\n1. Read `wiki\u002Findex.md`, identify 1-5 relevant topic files, explain reasoning briefly\n2. Read those topics; follow `[[cross-links]]` up to 2 hops if relevant\n3. Produce a clear answer citing specific topic files used\n4. If the wiki lacks enough information: state what it knows, list gaps, suggest `\u002Fwiki --add` for missing areas\n\n### Command: `\u002Fwiki --status`\n\nRead meta, count topic files and raw sources, check for orphaned topics, broken cross-links, and stale topics (30+ days). Output: topic\u002Fsource\u002Fword counts, last updated\u002Fcompaction dates, and health issues with counts and lists.\n\n### Command: `\u002Fwiki --compact`\n\n1. Read `wiki\u002Findex.md` and all topic files\n2. Identify: merge candidates (overlapping subjects), split candidates (multiple distinct subjects), stale\u002Foutdated content, duplicates\n3. For each change: describe what and why, make the change, update all affected cross-links\n4. Rebuild `wiki\u002Findex.md` and update `wiki\u002F.wiki-meta.json` with `lastCompaction` and new counts\n5. Output: topics merged\u002Fsplit\u002Fremoved\u002Fresolved, final count, estimated words\n\n### Command: `\u002Fwiki --rebuild-index`\n\nRead all topic files, extract title\u002Fsummary\u002Fdate, write a fresh `wiki\u002Findex.md`. Output: \"Index rebuilt with {count} topics.\"\n\n## Fringe Cases\n\n- **`.planning\u002F` does not exist**: Run `\u002Fdo setup` first to initialize the harness state directory.\n- **No wiki directory**: Prompt to run `\u002Fwiki init`. Do not auto-create on query or status.\n- **Source >50K words**: Split into sections, warn the user.\n- **Topic name collision**: Merge into existing topic, do not overwrite.\n- **Empty wiki queried**: \"The wiki is empty. Add sources with `\u002Fwiki --add`.\"\n- **Broken cross-link**: During compaction\u002Frebuild — flag. During --add — create stub `[[missing-topic]] (stub -- needs content)` if no context.\n- **URL fetch fails**: Report failure, suggest pasting content directly.\n- **Wiki >~400K words**: Warn during --status, suggest archiving or `\u002Fwiki --compact`.\n\n## Contextual Gates\n\n**Disclosure:** \"Updating wiki at `.planning\u002Fwiki\u002F`. Files will be created or modified.\"\n**Reversibility:** amber — creates and modifies `.planning\u002Fwiki\u002F` files; undo by deleting or reverting changed files.\n**Trust gates:**\n- Any: all wiki commands (init, add, query, status, compact, rebuild-index).\n\n## Quality Gates\n\n- Every topic file must have a title, last-updated date, and sources list\n- Every topic file must have at least one cross-link to another topic (unless it is the only topic)\n- The index must accurately reflect all topic files (no orphans after --add or --compact)\n- No duplicate topic files (same slug = same file)\n- Raw sources are preserved in wiki\u002Fraw\u002F and never deleted\n- The --query command must cite specific topic files, not fabricate information\n\n## Exit Protocol\n\nOutput a summary appropriate to the command executed, then:\n\n```\n---HANDOFF---\n- Wiki: {command executed} at {wiki path}\n- Topics: {count} total, {new\u002Fupdated\u002Fmerged count} changed\n- Status: {healthy | needs compaction | has orphans\u002Fbroken links}\n---\n```\n","# \u002Fwiki -- LLM-Native Knowledge Base\n\n## Orientation\n\n**Use when:** building and querying a markdown-first knowledge base -- ingests raw notes, deduplicates, surfaces answers.\n**Don't use when:** capturing session learnings into the evolve pipeline (use \u002Flearn); generating structured code documentation (use \u002Fdoc-gen).\n\n## Directory Structure\n\n```text\nwiki\u002F\n  index.md              # Master index\n  raw\u002F                  # Unprocessed sources (timestamped files)\n  topics\u002F               # Compiled topic files (one per topic, interlinked)\n  .wiki-meta.json       # Stats: topic count, source count, last compaction\n```\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fwiki` | Status overview: topic count, last update, pending raw sources |\n| `\u002Fwiki --add [source]` | Ingest a new source into the wiki |\n| `\u002Fwiki --query [question]` | Answer a question using wiki knowledge |\n| `\u002Fwiki --status` | Detailed wiki health: topic count, staleness, orphan detection |\n| `\u002Fwiki --compact` | Merge, deduplicate, and reorganize topics |\n| `\u002Fwiki --rebuild-index` | Regenerate index.md from current topic files |\n| `\u002Fwiki init [path]` | Initialize a new wiki at the specified path |\n\n## Protocol\n\n### Command: `\u002Fwiki init [path]`\n\nCreate `wiki\u002F`, `wiki\u002Fraw\u002F`, `wiki\u002Ftopics\u002F`, an empty `wiki\u002Findex.md`, and `wiki\u002F.wiki-meta.json` with fields: `created`, `lastUpdated`, `topicCount: 0`, `sourceCount: 0`, `totalWords: 0`, `lastCompaction: null`. Default path: `wiki\u002F` at project root.\n\n### Command: `\u002Fwiki --add [source]`\n\nIngest a new source into the wiki.\n\n**Step 1:** Determine source type — URL (fetch with WebFetch), file path (read), raw text (use directly), no argument (ask user).\n\n**Step 2:** Write raw content to `wiki\u002Fraw\u002Fsource-{timestamp}.md` with header: title\u002FURL, ingested date, type, original reference.\n\n**Step 3:** Identify 1-5 topics. For each: check if a topic file already exists — append to existing or create `wiki\u002Ftopics\u002F{slug}.md`.\n\n**Step 4:** Each topic file has: title, `> Last updated`, `> Sources`, compiled content, and `## Related Topics` with `[[slug]]` cross-links. Scan existing topics for cross-links when writing.\n\n**Step 5:** Regenerate `wiki\u002Findex.md` with stats header, Topics table (`[[slug]]` | summary | last updated), and Recent Sources table.\n\n**Step 6:** Update `wiki\u002F.wiki-meta.json` with new counts.\n\n**Step 7:** Output: source description, topics created, topics updated, index counts.\n\n### Command: `\u002Fwiki --query [question]`\n\n1. Read `wiki\u002Findex.md`, identify 1-5 relevant topic files, explain reasoning briefly\n2. Read those topics; follow `[[cross-links]]` up to 2 hops if relevant\n3. Produce a clear answer citing specific topic files used\n4. If the wiki lacks enough information: state what it knows, list gaps, suggest `\u002Fwiki --add` for missing areas\n\n### Command: `\u002Fwiki --status`\n\nRead meta, count topic files and raw sources, check for orphaned topics, broken cross-links, and stale topics (30+ days). Output: topic\u002Fsource\u002Fword counts, last updated\u002Fcompaction dates, and health issues with counts and lists.\n\n### Command: `\u002Fwiki --compact`\n\n1. Read `wiki\u002Findex.md` and all topic files\n2. Identify: merge candidates (overlapping subjects), split candidates (multiple distinct subjects), stale\u002Foutdated content, duplicates\n3. For each change: describe what and why, make the change, update all affected cross-links\n4. Rebuild `wiki\u002Findex.md` and update `wiki\u002F.wiki-meta.json` with `lastCompaction` and new counts\n5. Output: topics merged\u002Fsplit\u002Fremoved\u002Fresolved, final count, estimated words\n\n### Command: `\u002Fwiki --rebuild-index`\n\nRead all topic files, extract title\u002Fsummary\u002Fdate, write a fresh `wiki\u002Findex.md`. Output: \"Index rebuilt with {count} topics.\"\n\n## Fringe Cases\n\n- **`.planning\u002F` does not exist**: Run `\u002Fdo setup` first to initialize the harness state directory.\n- **No wiki directory**: Prompt to run `\u002Fwiki init`. Do not auto-create on query or status.\n- **Source >50K words**: Split into sections, warn the user.\n- **Topic name collision**: Merge into existing topic, do not overwrite.\n- **Empty wiki queried**: \"The wiki is empty. Add sources with `\u002Fwiki --add`.\"\n- **Broken cross-link**: During compaction\u002Frebuild — flag. During --add — create stub `[[missing-topic]] (stub -- needs content)` if no context.\n- **URL fetch fails**: Report failure, suggest pasting content directly.\n- **Wiki >~400K words**: Warn during --status, suggest archiving or `\u002Fwiki --compact`.\n\n## Contextual Gates\n\n**Disclosure:** \"Updating wiki at `.planning\u002Fwiki\u002F`. Files will be created or modified.\"\n**Reversibility:** amber — creates and modifies `.planning\u002Fwiki\u002F` files; undo by deleting or reverting changed files.\n**Trust gates:**\n- Any: all wiki commands (init, add, query, status, compact, rebuild-index).\n\n## Quality Gates\n\n- Every topic file must have a title, last-updated date, and sources list\n- Every topic file must have at least one cross-link to another topic (unless it is the only topic)\n- The index must accurately reflect all topic files (no orphans after --add or --compact)\n- No duplicate topic files (same slug = same file)\n- Raw sources are preserved in wiki\u002Fraw\u002F and never deleted\n- The --query command must cite specific topic files, not fabricate information\n\n## Exit Protocol\n\nOutput a summary appropriate to the command executed, then:\n\n```\n---HANDOFF---\n- Wiki: {command executed} at {wiki path}\n- Topics: {count} total, {new\u002Fupdated\u002Fmerged count} changed\n- Status: {healthy | needs compaction | has orphans\u002Fbroken links}\n---\n```\n",{"name":5,"license":15,"description":7,"auto-trigger":39,"last-updated":43,"user-invocable":44,"trigger_keywords":45},1775433600000,true,[5,26,46,47,48,49,32,50,31],"llm wiki","project wiki","build a wiki","maintain knowledge","llm-wiki","main","e1a3d45697a0f323aaedcbea0ab6a0387b5fe722","skills\u002Fwiki",84,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel","https:\u002F\u002Fsethgammon.github.io\u002FCitadel\u002F","https:\u002F\u002Fgithub.com\u002FSethGammon","Building Citadel, the repo-local operating layer for Claude Code and Codex. Persistent work, routing, verification, and coordinated agent fleets.","2026-11-13 02:05:13",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":44},[62,65,68],{"tool":63,"command":64},"npx","npx skills add SethGammon\u002FCitadel --skill wiki",{"tool":66,"command":67},"bunx","bunx skills add SethGammon\u002FCitadel --skill wiki",{"tool":69,"command":70},"pnpm","pnpm dlx skills add SethGammon\u002FCitadel --skill wiki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[],[74,98,122,146,165,188],{"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":38},"01M6GXSBKE9A2HQWF8QRAZ4WJ5","workspace","Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims, discovery relay, wave-based execution -- but the unit of work is a repo, not a file. Coordinates campaigns across repositories with shared context.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fworkspace\u002FSKILL.md",[],[76,81,82,83,84,85,86,87,88,89,90,91,23,22,92,93,94,95,96,97],"repos","snowflake","multi-repo","work","context","campaign","coordinate","but","across","campaigns","shared","scope","add","unit","coordinator","fleet","claims",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M6GXS2840SJ61285SZ43EJC3","watch","File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through \u002Fdo. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwatch\u002FSKILL.md",[],[100,105,106,107,108,109,110,111,112,113,114,115,19,116,117,118,119,120,22,121],"directory","commit","tasks","git","batch","actions","start","sentinel","diff","auto","stop","do","scan","human","judgment","reactions","processing",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":38},"01M6GXRXHYJ5RD9RZP81S2VFSW","verify","Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[124,129,130,131,132,133,134,135,136,137,138,139,140,27,141,22,142,143,144,145],"citadel","telemetry","harness","pipeline","Bash","tool","read","write","edit","session","hooks","reports","live","hook","errors","calls","true",{"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":152,"publishedAt":38},"01M6GXRS9MCJFMQZ917H2XH3AC","unharness","Safely leave Citadel using the active adoption receipt. Produces a no-write, reviewable plan, preserves a portable archive, removes only exact owned material, and reports modified or externally registered surfaces as retained or unknown. Legacy installs must be imported before exact leave is claimed.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Funharness\u002FSKILL.md",[],[148,153,129,131,154,155,156,157,158,30,140,159,160,161,162,163,23,22,164,145],"uninstall","adoption","plan","archive","remove","only","Legacy","surfaces","clean","imported","active","material",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":38},"01M6GXRMEJ2VHD43R9FNPD4910","triage","GitHub issue and PR investigator. Pulls open issues\u002FPRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[167,172,173,174,175,176,177,178,179,180,181,182,183,184,116,22,185,186,187,145],"code review","review","review pr","pr","code","github issues","issues","open","use","unrelated","issue","general","references","line","investigator","reviews",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":194,"publishedAt":38},"01M6GXRG4QPGKHVCJPRCEWBW2S","test-gen","Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gen\u002FSKILL.md",[],[195,196,197,198,199,200,124,136,201,202,25,203,204,93,205,145,206],"test","test gen","write tests","generate","framework","edge","generate tests","patterns","tests","paths","error","path"]