agentleFS
benshapyrobenshapyro/cadre-devkit-claude/skills/documentation-templates/SKILL.md

documentation-templates

Skill9 starsChanged 12 months agoMITView on GitHub

Generates README files, API documentation, and inline code comments following best practices. Use when creating project documentation, writing READMEs, documenting APIs, or explaining complex code.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, behavioral-modes and 10 more.

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.
  • tiendatworkSkill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 3 projects that use this

  • xfstudioSkill

    behavioral-modes

    AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.

    Also in 3 projects that use this

  • xfstudioSkill

    red-team-tactics

    Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.

    Also in 3 projects that use this

  • +9 more from xfstudio

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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:

    Create clear, maintainable documentation for projects and code.

    line 9
  2. Distinctive:

    Progressive Disclosure: - Start simple, provide details on demand

    line 22
  3. Distinctive:

    Start with clear, one-sentence description

    line 120
  4. Distinctive:

    Document "why" decisions were made

    line 122
  5. Distinctive:

    Keep documentation close to code

    line 123
  6. Distinctive:

    Update docs when code changes

    line 124
  7. Distinctive:

    Use jargon without explanation

    line 129
  8. Distinctive:

    Document implementation details that change often

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Documentation Templates Skill

Create clear, maintainable documentation for projects and code.

Resources

For full templates, see:

  • references/readme-template.md - Complete README template
  • references/api-docs-template.md - API documentation template

Core Principles

  1. Explain Why, Not What - Code shows what; docs explain why
  2. Keep it Updated - Outdated docs are worse than no docs
  3. Write for Humans - Clear, concise, jargon-free
  4. Progressive Disclosure - Start simple, provide details on demand
  5. Examples are King - Show, don't just tell

README Quick Structure

# Project Name
Brief description (1-2 sentences)

## Features
## Prerequisites
## Installation
## Configuration
## Usage
## Development
## Deployment
## Contributing
## License

Function Documentation

TypeScript (JSDoc)

/**
 * Fetches user data from the database.
 *
 * @param userId - The unique identifier of the user
 * @returns Promise resolving to the user object
 * @throws {NotFoundError} If user doesn't exist
 *
 * @example
 * const user = await fetchUserData('123');
 */
async function fetchUserData(userId: string): Promise<User> {
  // ...
}

Python (Docstring)

def fetch_user_data(user_id: str) -> User:
    """
    Fetch user data from the database.

    Args:
        user_id: The unique identifier of the user.

    Returns:
        User object containing user data.

    Raises:
        NotFoundError: If user doesn't exist.

    Example:
        >>> user = fetch_user_data('123')
    """

Inline Comments

// BAD: Obvious
// Increment counter
counter++;

// GOOD: Explain why
// Increment before checking because first request counts
counter++;

// Cache disabled for premium users after stale data issue (INC-5678)
if (!user.isPremium) {
  cache.set(key, value);
}

Architecture Decision Record (ADR)

# ADR-001: Use PostgreSQL for Primary Database

## Status
Accepted

## Context
We need ACID transactions, complex queries, strong consistency.

## Decision
Use PostgreSQL as the primary database.

## Consequences
**Positive:** ACID compliance, rich queries, strong ecosystem
**Negative:** Horizontal scaling requires more effort

Best Practices

Do

  • Start with clear, one-sentence description
  • Include practical examples
  • Document "why" decisions were made
  • Keep documentation close to code
  • Update docs when code changes

Don't

  • Write obvious comments
  • Let docs get out of sync
  • Use jargon without explanation
  • Skip examples
  • Document implementation details that change often

Documentation Checklist

  • Clear project description
  • Installation instructions work
  • Environment variables documented
  • API endpoints with examples
  • Common errors and solutions
  • Examples are runnable
  • No sensitive information exposed

Good documentation saves hours of debugging. Write for the developer who joins in 6 months.


Version

  • v1.1.0 (2025-12-05): Added allowed-tools restriction, enriched trigger keywords
  • v1.0.0 (2025-11-15): Initial version

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.