doc-gen
Skill4 starsChanged 4 months agoMITView on GitHub
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.
9 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- SethGammon/Citadeledited, first seen Nov 4, 2026
- allysgrandiose674/Armoryedited, first seen Oct 13, 2026
- tlzmw001/aitest-kittheir own version, first seen Aug 13, 2026
- neronain/ClaudeSkills-Neronaintheir own version, first seen Aug 9, 2026
- jpoindexter/theft-kittheir own version, first seen May 20, 2026
- 354685856-sn/claude-code-skillstheir own version, first seen Apr 8, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- SethGammon/Citadel★ 92798% same
- SethGammon/Armory★ 1918% same
- allysgrandiose674/Armory★ 118% same
Wrote their own version · 6
- tlzmw001/aitest-kit★ 13same name
- botlearn-ai/botlearn-skills★ 9same name
- neronain/ClaudeSkills-Neronain★ 3same name
- CodeWithBehnam/cc-docs★ 2same name
- jpoindexter/theft-kit★ 1same name
- 354685856-sn/claude-code-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- archonSkill
- ascii-diagramSkill
- autopilotSkill
- costSkill
- create-appSkill
- create-skillSkill
- daemonSkill
- dashboardSkill
- decision-mapSkill
- deploy-stewardSkill
- designSkill
- doSkill
- evolveSkill
- experimentSkill
- fleetSkill
- grillSkill
- housecleanSkill
- improveSkill
- infra-auditSkill
- learnSkill
- live-previewSkill
- loopSkill
- mapSkill
- marshalSkill
- merge-reviewSkill
- organizeSkill
- postmortemSkill
- prdSkill
- pr-watchSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- scaffoldSkill
- scheduleSkill
- session-handoffSkill
- setupSkill
- systematic-debuggingSkill
- telemetrySkill
- test-genSkill
- triageSkill
- unharnessSkill
- verifySkill
- watchSkill
- wikiSkill
- workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 5 are common, 7 are distinctive, and 2 are very specific to this project.
5
Common
Most of the 5 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 25
Add JSDoc/docstrings to functions in a file or set of files
- Common: line 26
Write a README for a module or directory
- Common: line 27
Document an HTTP API or exported library surface
- Distinctive: line 49
Read CLAUDE.md for doc conventions
- Distinctive: line 50
Search for existing doc comments in the target area — note density, tone, tags used, and line length
- Very specific: line 51
Default when no existing docs: JSDoc (@param, @returns, @throws, @example) for TS/JS.
- Common: line 61
Read the full body, not just the signature
- Very specific: line 64
Non-trivial: document purpose, parameter semantics (not types — TS has those), return guarantees, throws/errors, side effects, non-obvious …
- Distinctive: line 65
Write using detected style
- Distinctive: line 67
Core rule: every doc must add information beyond what the signature already says.
- Common: line 71
Read all files in the directory (one level deep)
- Distinctive: line 74
If a README already exists, update rather than replace — preserve sections not covered by your analysis
- Distinctive: line 90
Run typecheck after writing (malformed JSDoc can cause TS errors)
- Distinctive: line 106
Every doc comment adds information beyond the signature.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/doc-gen — Documentation Generator
When to Use
- Add JSDoc/docstrings to functions in a file or set of files
- Write a README for a module or directory
- Document an HTTP API or exported library surface
Mode auto-detected from target:
- File path → function-level mode
- Directory path → module-level mode
- Route file or API directory → API reference mode
- Explicit override:
/doc-gen --mode function|module|api [target]
Commands
| 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 |
Protocol
Phase 1: DETECT STYLE
- Read CLAUDE.md for doc conventions
- Search for existing doc comments in the target area — note density, tone, tags used, and line length
- Default when no existing docs: JSDoc (
@param,@returns,@throws,@example) for TS/JS; Google-style for Python; idiomatic format for others
Apply detected style consistently across all generated docs.
Phase 2: ANALYZE TARGET
Function-Level Mode
For each function:
- Read the full body, not just the signature
- Classify:
- Trivial: simple getters/setters, one-line wrappers with obvious names — SKIP
- Non-trivial: document purpose, parameter semantics (not types — TS has those), return guarantees, throws/errors, side effects, non-obvious edge cases, and
@examplewhen usage is non-obvious
- Write using detected style
Core rule: every doc must add information beyond what the signature already says. If you cannot, skip it.
Module-Level Mode
- Read all files in the directory (one level deep)
- Identify: problem space, key exports, internal files, external dependencies, and what imports this module
- README schema:
# {Module Name}| one-paragraph description |## Key Exportstable (name, description) |## Architecture(only if non-obvious internal structure) |## Usage(real import paths) |## Dependencies(non-obvious only) - If a README already exists, update rather than replace — preserve sections not covered by your analysis
API Reference Mode
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.
Phase 3: WRITE
- Apply detected style consistently
- Function-level: insert doc comments above each function
- Module-level: write or update README.md in the target directory
- API reference: write to
docs/api/or adjacent to route files - Run typecheck after writing (malformed JSDoc can cause TS errors)
Phase 4: VERIFY
Re-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.
Contextual Gates
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:
- Any: additive doc generation on undocumented functions.
- Familiar (5+ sessions): rewriting existing docstrings that may discard prior content.
Quality Gates
- Every doc comment adds information beyond the signature; if not, delete it
- Docs match actual code behavior — wrong docs are worse than no docs
- Style matches the project's existing convention throughout
- No
@param name - The namefiller; omit parameters when their name is self-explanatory - Typecheck passes after insertion
- At least some functions skipped as trivial — if every function was documented, you over-documented
Exit Protocol
=== 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
---Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

