From citadel
Generates function-level JSDoc/docstrings, module-level READMEs, and API references matching existing project doc style. Skips trivial functions; adds info beyond signatures.
npx claudepluginhub sethgammon/citadel --plugin citadelThis skill uses the workspace's default tool permissions.
- Add JSDoc/docstrings to functions in a file or set of files
Generates READMEs, API references, inline comments, architecture docs with diagrams, changelogs, and developer guides for codebases, APIs, libraries, and projects.
Generates 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.
Share bugs, ideas, or general feedback.
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
---