agentleFS
viknesh20-20viknesh20-20/claude-code-tool-kit/.claude/skills/generate-docs/SKILL.md

generate-docs

Skill7 starsChanged 6 months agoMITView on GitHub

Generates documentation matching the project's style — README files, API docs, inline documentation, or architecture docs. Auto-detects the documentation format in use.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use commit and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If "readme" is specified, generate a complete README.md with:

    line 24
  2. Distinctive:

    If "api" is specified:

    line 37
  3. Distinctive:

    Document each with: method, path, description, parameters, request body, response body, error codes

    line 39
  4. Distinctive:

    If a file or module is specified:

    line 43
  5. Distinctive:

    Read the code completely

    line 44
  6. Distinctive:

    Add inline documentation following the project's convention:

    line 45
  7. Distinctive:

    If "architecture" is specified:

    line 62
  8. Distinctive:

    Create ASCII or Mermaid diagrams

    line 64
  9. Distinctive:

    Document data flow between components

    line 65

“Common” is measured: kept by at least 6 in 10 of the 16 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generate Documentation

Detect Documentation Style

!find . -name "README*" -o -name "CONTRIBUTING*" -o -name "CHANGELOG*" -o -name "docs" -type d 2>/dev/null | grep -v node_modules | grep -v .git | head -10 !ls docs/ doc/ documentation/ wiki/ 2>/dev/null

Detect Code Documentation Format

!grep -r "\/\*\*" --include="*.ts" --include="*.js" --include="*.java" -l 2>/dev/null | head -3 !grep -r '"""' --include="*.py" -l 2>/dev/null | head -3 !grep -r "\/\/\/" --include="*.rs" --include="*.cs" --include="*.go" -l 2>/dev/null | head -3


Documentation Types

Type 1: README Generation

If "readme" is specified, generate a complete README.md with:

  • Project name and one-line description
  • Badges (build status, coverage, version — if CI is configured)
  • Table of contents
  • Features list
  • Prerequisites and installation
  • Quick start / usage examples
  • Configuration options
  • API reference (if applicable)
  • Contributing guidelines
  • License

Type 2: API Documentation

If "api" is specified:

  • Find all public endpoints/routes/handlers
  • Document each with: method, path, description, parameters, request body, response body, error codes
  • Generate in the format matching existing docs (OpenAPI, Markdown, or inline)

Type 3: Module/File Documentation

If a file or module is specified:

  • Read the code completely
  • Add inline documentation following the project's convention:
    • JavaScript/TypeScript: JSDoc (/** ... */)
    • Python: Docstrings ("""...""")
    • Go: GoDoc comments (// FunctionName ...)
    • Rust: Doc comments (/// ...)
    • Java: Javadoc (/** ... */)
    • C#: XML comments (/// <summary>)
    • Ruby: YARD (# @param, # @return)

For each public function/method/class, document:

  • Brief description of what it does
  • Parameters with types and descriptions
  • Return value with type and description
  • Exceptions/errors that can be thrown
  • Usage example (for complex APIs)

Type 4: Architecture Documentation

If "architecture" is specified:

  • Map the high-level system components
  • Create ASCII or Mermaid diagrams
  • Document data flow between components
  • List external dependencies and integrations
  • Note key design decisions and trade-offs

Rules

  • Match existing style — if the project uses JSDoc, don't add Python docstrings
  • Don't over-document — skip obvious getters/setters/constructors
  • Document the why — explain intent and gotchas, not just parameters
  • Keep it current — documentation that lies is worse than no documentation
  • Show don't tell — include usage examples for complex APIs

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.