From citadel
Generates documentation in three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads and matches existing project doc style.
How this skill is triggered — by the user, by Claude, or both
Slash command
/citadel:doc-genThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Add JSDoc/docstrings to functions in a file or set of files
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
---
npx claudepluginhub sethgammon/citadel --plugin citadelGenerates JSDoc for JS/TS, docstrings for Python, Rustdoc, Javadoc, GoDoc, READMEs, and API docs by analyzing code signatures, params, returns, and examples.
Generates systematic documentation for code files or modules via file-by-file analysis, progress tracking, and completeness checks using structured templates. Use for API docs, READMEs, or reference guides.
Generates and maintains README, API docs, changelogs, and architecture docs. Provides docstring and generator commands for JavaScript, Python, and Go projects.