skills/doc-gen/SKILL.md
Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.
npx skillsauth add SethGammon/Citadel doc-genInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Mode auto-detected from target:
/doc-gen --mode function|module|api [target]| Command | Behavior |
|---|---|
| /doc-gen [file] | Function-level docs for a file |
| /doc-gen [directory] | Module-level README for a directory |
| /doc-gen --api [target] | API reference for endpoints or exports |
| /doc-gen --mode [mode] [target] | Force a specific mode |
| /doc-gen --dry-run [target] | Show what would be documented without writing |
@param, @returns, @throws, @example) for TS/JS; Google-style for Python; idiomatic format for othersApply detected style consistently across all generated docs.
For each function:
@example when usage is non-obviousCore rule: every doc must add information beyond what the signature already says. If you cannot, skip it.
# {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)For HTTP endpoints: method + path, description, path/query/body params (with types), response shape and status codes, errors, auth level, and a curl/fetch example for non-trivial endpoints.
For exported libraries: name and kind (function/class/constant/type), description, parameters/properties with semantics, return type with guarantees, import and usage example.
Structure as a single reference document with a table of contents.
docs/api/ or adjacent to route filesRe-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/run.
Disclosure: "Generating documentation for [target]. Source files will be modified."
Reversibility: amber — adds JSDoc/docstrings to source files; undo with git checkout on modified files.
Trust gates:
@param name - The name filler; omit parameters when their name is self-explanatory=== Doc-Gen Report ===
Mode: {function-level | module-level | api-reference}
Target: {path}
Style: {detected style}
Documented: {N functions ({M} skipped as trivial) | README.md ({N} exports) | {N} endpoints}
Skipped: {item}: {reason}
---HANDOFF---
- Generated {mode} docs for {target}
- Matched existing {style} convention
- {what was skipped and why}
- Reversibility: amber — undo with `git checkout` on modified source files
---
development
GitHub issue and PR investigator. Pulls open issues/PRs, 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.
development
Unified telemetry hub. Shows current session cost, today's spend, all-time totals, hook activity, trust level, and a directory of every telemetry command available. Also the control surface to toggle telemetry on/off and tune thresholds. Single entry point for anyone asking "what does this cost" or "what telemetry does Citadel have".
devops
Manages recurring and one-off scheduled tasks. Session-scoped scheduling via CronCreate/CronDelete/CronList. Documents the cloud path for tasks that need to survive machine sleep or network drops.
tools
Browser-based QA verification. Launches a real browser, navigates the app, clicks buttons, fills forms, and tests user flows. Works as a standalone skill or as a phase end condition in campaigns. Requires Playwright (optional dependency, graceful skip if not installed).