[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXMDCJ1H7QAF635502PHRD":3,"skill-same:01M6GXMDCJ1H7QAF635502PHRD":92},{"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":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":65,"ownerHtmlUrl":66,"ownerBlogUrl":65,"ownerDescription":67,"updatedAt":68,"install":69,"resources":81},"01M6GXMDCJ1H7QAF635502PHRD","doc-gen",null,"Documentation generator with three modes: function-level (JSDoc\u002Fdocstrings), module-level (directory READMEs), and API reference (endpoints\u002Fexports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.","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\u002Fdoc-gen\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"doc gen","doc","module","true","generator","docstring","with","documentation generator","restate","jsdoc","false","directory","project","three","document","never","README","just","api","documentation","2026-11-10 10:12:30",false,"---\nname: doc-gen\nlicense: MIT\ndescription: >-\n  Documentation generator with three modes: function-level (JSDoc\u002Fdocstrings),\n  module-level (directory READMEs), and API reference (endpoints\u002Fexports).\n  Reads existing project doc style and matches it. Never generates docs that\n  just restate what the signature already says.\nuser-invocable: true\nauto-trigger: false\ntrigger_keywords:\n  - document\n  - docs\n  - docstring\n  - jsdoc\n  - readme\n  - api docs\nlast-updated: 2026-03-20\n---\n\n# \u002Fdoc-gen — Documentation Generator\n\n## When to Use\n\n- Add JSDoc\u002Fdocstrings to functions in a file or set of files\n- Write a README for a module or directory\n- Document an HTTP API or exported library surface\n\nMode auto-detected from target:\n- **File path** → function-level mode\n- **Directory path** → module-level mode\n- **Route file or API directory** → API reference mode\n- **Explicit override**: `\u002Fdoc-gen --mode function|module|api [target]`\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fdoc-gen [file]` | Function-level docs for a file |\n| `\u002Fdoc-gen [directory]` | Module-level README for a directory |\n| `\u002Fdoc-gen --api [target]` | API reference for endpoints or exports |\n| `\u002Fdoc-gen --mode [mode] [target]` | Force a specific mode |\n| `\u002Fdoc-gen --dry-run [target]` | Show what would be documented without writing |\n\n## Protocol\n\n### Phase 1: DETECT STYLE\n\n1. Read AGENTS.md (then CLAUDE.md if present) for doc conventions\n2. Search for existing doc comments in the target area — note density, tone, tags used, and line length\n3. Default when no existing docs: JSDoc (`@param`, `@returns`, `@throws`, `@example`) for TS\u002FJS; Google-style for Python; idiomatic format for others\n\nApply detected style consistently across all generated docs.\n\n### Phase 2: ANALYZE TARGET\n\n#### Function-Level Mode\n\nFor each function:\n\n1. Read the full body, not just the signature\n2. Classify:\n   - **Trivial**: simple getters\u002Fsetters, one-line wrappers with obvious names — SKIP\n   - **Non-trivial**: document purpose, parameter semantics (not types — TS has those), return guarantees, throws\u002Ferrors, side effects, non-obvious edge cases, and `@example` when usage is non-obvious\n3. Write using detected style\n\n**Core rule:** every doc must add information beyond what the signature already says. If you cannot, skip it.\n\n#### Module-Level Mode\n\n1. Read all files in the directory (one level deep)\n2. Identify: problem space, key exports, internal files, external dependencies, and what imports this module\n3. README schema: `# {Module Name}` | one-paragraph description | `## Key Exports` table (name, description) | `## Architecture` (only if non-obvious internal structure) | `## Usage` (real import paths) | `## Dependencies` (non-obvious only)\n4. If a README already exists, update rather than replace — preserve sections not covered by your analysis\n\n#### API Reference Mode\n\nFor HTTP endpoints: method + path, description, path\u002Fquery\u002Fbody params (with types), response shape and status codes, errors, auth level, and a curl\u002Ffetch example for non-trivial endpoints.\n\nFor exported libraries: name and kind (function\u002Fclass\u002Fconstant\u002Ftype), description, parameters\u002Fproperties with semantics, return type with guarantees, import and usage example.\n\nStructure as a single reference document with a table of contents.\n\n### Phase 3: WRITE\n\n1. Apply detected style consistently\n2. Function-level: insert doc comments above each function\n3. Module-level: write or update README.md in the target directory\n4. API reference: write to `docs\u002Fapi\u002F` or adjacent to route files\n5. Run typecheck after writing (malformed JSDoc can cause TS errors)\n\n### Phase 4: VERIFY\n\nRe-read every doc comment. For each: \"Does this add information beyond the signature?\" If not, delete it. Check accuracy: parameter names, return types, side effects, and that examples would actually compile\u002Frun.\n\n## Contextual Gates\n\n**Disclosure:** \"Generating documentation for [target]. Source files will be modified.\"\n**Reversibility:** amber — adds JSDoc\u002Fdocstrings to source files; undo with `git checkout` on modified files.\n**Trust gates:**\n- Any: additive doc generation on undocumented functions.\n- Familiar (5+ sessions): rewriting existing docstrings that may discard prior content.\n\n## Quality Gates\n\n- Every doc comment adds information beyond the signature; if not, delete it\n- Docs match actual code behavior — wrong docs are worse than no docs\n- Style matches the project's existing convention throughout\n- No `@param name - The name` filler; omit parameters when their name is self-explanatory\n- Typecheck passes after insertion\n- At least some functions skipped as trivial — if every function was documented, you over-documented\n\n## Exit Protocol\n\n```\n=== Doc-Gen Report ===\nMode: {function-level | module-level | api-reference}\nTarget: {path}\nStyle: {detected style}\nDocumented: {N functions ({M} skipped as trivial) | README.md ({N} exports) | {N} endpoints}\nSkipped: {item}: {reason}\n```\n\n```\n---HANDOFF---\n- Generated {mode} docs for {target}\n- Matched existing {style} convention\n- {what was skipped and why}\n- Reversibility: amber — undo with `git checkout` on modified source files\n---\n```\n","# \u002Fdoc-gen — Documentation Generator\n\n## When to Use\n\n- Add JSDoc\u002Fdocstrings to functions in a file or set of files\n- Write a README for a module or directory\n- Document an HTTP API or exported library surface\n\nMode auto-detected from target:\n- **File path** → function-level mode\n- **Directory path** → module-level mode\n- **Route file or API directory** → API reference mode\n- **Explicit override**: `\u002Fdoc-gen --mode function|module|api [target]`\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fdoc-gen [file]` | Function-level docs for a file |\n| `\u002Fdoc-gen [directory]` | Module-level README for a directory |\n| `\u002Fdoc-gen --api [target]` | API reference for endpoints or exports |\n| `\u002Fdoc-gen --mode [mode] [target]` | Force a specific mode |\n| `\u002Fdoc-gen --dry-run [target]` | Show what would be documented without writing |\n\n## Protocol\n\n### Phase 1: DETECT STYLE\n\n1. Read AGENTS.md (then CLAUDE.md if present) for doc conventions\n2. Search for existing doc comments in the target area — note density, tone, tags used, and line length\n3. Default when no existing docs: JSDoc (`@param`, `@returns`, `@throws`, `@example`) for TS\u002FJS; Google-style for Python; idiomatic format for others\n\nApply detected style consistently across all generated docs.\n\n### Phase 2: ANALYZE TARGET\n\n#### Function-Level Mode\n\nFor each function:\n\n1. Read the full body, not just the signature\n2. Classify:\n   - **Trivial**: simple getters\u002Fsetters, one-line wrappers with obvious names — SKIP\n   - **Non-trivial**: document purpose, parameter semantics (not types — TS has those), return guarantees, throws\u002Ferrors, side effects, non-obvious edge cases, and `@example` when usage is non-obvious\n3. Write using detected style\n\n**Core rule:** every doc must add information beyond what the signature already says. If you cannot, skip it.\n\n#### Module-Level Mode\n\n1. Read all files in the directory (one level deep)\n2. Identify: problem space, key exports, internal files, external dependencies, and what imports this module\n3. README schema: `# {Module Name}` | one-paragraph description | `## Key Exports` table (name, description) | `## Architecture` (only if non-obvious internal structure) | `## Usage` (real import paths) | `## Dependencies` (non-obvious only)\n4. If a README already exists, update rather than replace — preserve sections not covered by your analysis\n\n#### API Reference Mode\n\nFor HTTP endpoints: method + path, description, path\u002Fquery\u002Fbody params (with types), response shape and status codes, errors, auth level, and a curl\u002Ffetch example for non-trivial endpoints.\n\nFor exported libraries: name and kind (function\u002Fclass\u002Fconstant\u002Ftype), description, parameters\u002Fproperties with semantics, return type with guarantees, import and usage example.\n\nStructure as a single reference document with a table of contents.\n\n### Phase 3: WRITE\n\n1. Apply detected style consistently\n2. Function-level: insert doc comments above each function\n3. Module-level: write or update README.md in the target directory\n4. API reference: write to `docs\u002Fapi\u002F` or adjacent to route files\n5. Run typecheck after writing (malformed JSDoc can cause TS errors)\n\n### Phase 4: VERIFY\n\nRe-read every doc comment. For each: \"Does this add information beyond the signature?\" If not, delete it. Check accuracy: parameter names, return types, side effects, and that examples would actually compile\u002Frun.\n\n## Contextual Gates\n\n**Disclosure:** \"Generating documentation for [target]. Source files will be modified.\"\n**Reversibility:** amber — adds JSDoc\u002Fdocstrings to source files; undo with `git checkout` on modified files.\n**Trust gates:**\n- Any: additive doc generation on undocumented functions.\n- Familiar (5+ sessions): rewriting existing docstrings that may discard prior content.\n\n## Quality Gates\n\n- Every doc comment adds information beyond the signature; if not, delete it\n- Docs match actual code behavior — wrong docs are worse than no docs\n- Style matches the project's existing convention throughout\n- No `@param name - The name` filler; omit parameters when their name is self-explanatory\n- Typecheck passes after insertion\n- At least some functions skipped as trivial — if every function was documented, you over-documented\n\n## Exit Protocol\n\n```\n=== Doc-Gen Report ===\nMode: {function-level | module-level | api-reference}\nTarget: {path}\nStyle: {detected style}\nDocumented: {N functions ({M} skipped as trivial) | README.md ({N} exports) | {N} endpoints}\nSkipped: {item}: {reason}\n```\n\n```\n---HANDOFF---\n- Generated {mode} docs for {target}\n- Matched existing {style} convention\n- {what was skipped and why}\n- Reversibility: amber — undo with `git checkout` on modified source files\n---\n```\n",{"name":5,"license":15,"description":7,"auto-trigger":50,"last-updated":54,"user-invocable":55,"trigger_keywords":56},1773964800000,true,[43,57,34,38,58,59],"docs","readme","api docs","main","e1a3d45697a0f323aaedcbea0ab6a0387b5fe722","skills\u002Fdoc-gen",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":70,"prompt":80,"zipAvailable":55},[71,74,77],{"tool":72,"command":73},"npx","npx skills add SethGammon\u002FCitadel --skill doc-gen",{"tool":75,"command":76},"bunx","bunx skills add SethGammon\u002FCitadel --skill doc-gen",{"tool":78,"command":79},"pnpm","pnpm dlx skills add SethGammon\u002FCitadel --skill doc-gen","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdoc-gen\u002FSKILL.md",[82,88],{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"__benchmarks__\u002Fgenerate-readme.md","REFERENCE","参考文档",783,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdoc-gen\u002F__benchmarks__\u002Fgenerate-readme.md",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"__benchmarks__\u002Fno-source-files.md",802,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdoc-gen\u002F__benchmarks__\u002Fno-source-files.md",[93,118,144,167,193,212],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":49},"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",[],[95,100,101,102,103,104,105,106,107,108,109,110,111,39,112,113,114,115,116,117],"repos","snowflake","multi-repo","work","context","campaign","coordinate","but","across","campaigns","shared","as","scope","add","unit","coordinator","fleet","claims",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":127,"publishedAt":49},"01M6GXS873AD1Y6RTM6GV47F3E","wiki","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.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[124],{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[120,128,129,130,131,132,133,134,135,136,137,138,139,140,41,141,111,39,142,143],"vector","embeddings","librarian","markdown","knowledge","karpathy","knowledge management","karpathy wiki","up","files","maintain","self","knowledge base","db","sources","native",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":49},"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",[],[146,40,151,152,153,154,155,156,157,158,159,160,137,161,162,163,164,165,39,166],"commit","tasks","git","batch","actions","start","sentinel","diff","auto","stop","do","scan","human","judgment","reactions","processing",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":176,"publishedAt":49},"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",[173],{"categoryNo":174,"categoryName":175,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[169,177,178,179,180,181,182,183,184,185,186,187,188,139,189,39,190,191,192,32],"citadel","telemetry","harness","pipeline","Bash","tool","read","write","edit","session","hooks","reports","live","hook","errors","calls",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":199,"publishedAt":49},"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",[],[195,200,177,179,201,202,203,204,205,136,188,206,207,208,209,210,111,39,211,32],"uninstall","adoption","plan","archive","remove","only","Legacy","surfaces","clean","imported","active","material",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":216,"categories":217,"keywords":222,"publishedAt":49},"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",[218,221],{"categoryNo":219,"categoryName":220,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[214,223,224,225,226,227,228,229,230,231,232,233,234,235,161,39,236,237,238,32],"code review","review","review pr","pr","code","github issues","issues","open","use","unrelated","issue","general","references","line","investigator","reviews"]