[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXS873AD1Y6RTM6GV47F3E":3,"skill-same:01M6GXS873AD1Y6RTM6GV47F3E":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":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":61,"ownerDescription":63,"updatedAt":64,"install":65,"resources":77},"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",929,"MIT","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"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":44,"last-updated":48,"user-invocable":49,"trigger_keywords":50},1775433600000,true,[5,31,51,52,53,54,37,55,36],"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":66,"prompt":76,"zipAvailable":49},[67,70,73],{"tool":68,"command":69},"npx","npx skills add SethGammon\u002FCitadel --skill wiki",{"tool":71,"command":72},"bunx","bunx skills add SethGammon\u002FCitadel --skill wiki",{"tool":74,"command":75},"pnpm","pnpm dlx skills add SethGammon\u002FCitadel --skill wiki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[],[79,103,127,154,173,204],{"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":43},"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",[],[81,86,87,88,89,90,91,92,93,94,95,96,28,27,97,98,99,100,101,102],"repos","snowflake","multi-repo","work","context","campaign","coordinate","but","across","campaigns","shared","scope","add","unit","coordinator","fleet","claims",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":43},"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",[],[105,110,111,112,113,114,115,116,117,118,119,120,24,121,122,123,124,125,27,126],"directory","commit","tasks","git","batch","actions","start","sentinel","diff","auto","stop","do","scan","human","judgment","reactions","processing",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":136,"publishedAt":43},"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",[133],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[129,137,138,139,140,141,142,143,144,145,146,147,148,32,149,27,150,151,152,153],"citadel","telemetry","harness","pipeline","Bash","tool","read","write","edit","session","hooks","reports","live","hook","errors","calls","true",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":43},"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",[],[156,161,137,139,162,163,164,165,166,35,148,167,168,169,170,171,28,27,172,153],"uninstall","adoption","plan","archive","remove","only","Legacy","surfaces","clean","imported","active","material",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":187,"publishedAt":43},"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",[179,182],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":183,"categoryName":184,"taxonomyType":185,"taxonomyTypeDesc":186},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[175,188,189,190,191,192,193,194,195,196,197,198,199,200,121,27,201,202,203,153],"code review","review","review pr","pr","code","github issues","issues","open","use","unrelated","issue","general","references","line","investigator","reviews",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":211,"publishedAt":43},"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",[210],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},[212,213,214,215,216,217,129,144,218,219,30,220,221,98,222,153,223],"test","test gen","write tests","generate","framework","edge","generate tests","patterns","tests","paths","error","path"]