Tooluck logoTooluck
SKILL.md

doc-gen

Agent skill fromSethGammon/Citadel

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.

How to install doc-gen

install doc-gen
# install the Citadel pack with the skills CLI
npx skills add SethGammon/Citadel

# or add only this skill to Claude Code: copy the folder

skills/doc-gen/

# into

~/.claude/skills/doc-gen/ (all projects)

.claude/skills/doc-gen/ (one project)

skills/doc-gen/SKILL.md

MITFull file
1# /doc-gen — Documentation Generator
2
3## When to Use
4
5- Add JSDoc/docstrings to functions in a file or set of files
6- Write a README for a module or directory
7- Document an HTTP API or exported library surface
8
9Mode auto-detected from target:
10- **File path** → function-level mode
11- **Directory path** → module-level mode
12- **Route file or API directory** → API reference mode
13- **Explicit override**: `/doc-gen --mode function|module|api [target]`
14
15## Commands
16
17| Command | Behavior |
18|---|---|
19| `/doc-gen [file]` | Function-level docs for a file |
20| `/doc-gen [directory]` | Module-level README for a directory |
21| `/doc-gen --api [target]` | API reference for endpoints or exports |
22| `/doc-gen --mode [mode] [target]` | Force a specific mode |
23| `/doc-gen --dry-run [target]` | Show what would be documented without writing |
24
25## Protocol
26
27### Phase 1: DETECT STYLE
28
291. Read AGENTS.md (then CLAUDE.md if present) for doc conventions
302. Search for existing doc comments in the target area — note density, tone, tags used, and line length
313. Default when no existing docs: JSDoc (`@param`, `@returns`, `@throws`, `@example`) for TS/JS; Google-style for Python; idiomatic format for others
32
33Apply detected style consistently across all generated docs.
34
35### Phase 2: ANALYZE TARGET
36
37#### Function-Level Mode
38
39For each function:
40
411. Read the full body, not just the signature
422. Classify:
43 - **Trivial**: simple getters/setters, one-line wrappers with obvious names — SKIP
44…

Excerpt shown under the repository's MIT license.

More skills in Citadel

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates