agentleFS
aToy0m0aToy0m0/skills/generate-docs/SKILL.md

generate-docs

Skill2 starsChanged 2 months agoMITView on GitHub

Analyze a project's codebase and automatically generate comprehensive technical documentation (overview, API reference, setup guide). Use when asked to "generate docs", "create documentation", or "explain this project".

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

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 3

    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
  1. Very specific:

    If omitted, output defaults to docs/.

    line 30
  2. Very specific:

    Read key files (e.g., README.md, docker-compose.yml, requirements.txt, package.json)

    line 37
  3. Distinctive:

    Include runnable examples: when possible (requests, responses, config)

    line 181
  4. Distinctive:

    Do not overwrite existing docs (e.g., README.md)

    line 186
  5. Distinctive:

    Ensure the output directory exists (create if missing)

    line 187

“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

Project Documentation Auto-Generation Skill

Overview

This skill analyzes a project's source code and generates the following documents:

  1. Project Overview (overview.md) - what the project does, architecture diagram, core flows
  2. API Reference (api-reference.md) - endpoints list, request/response examples
  3. Setup Guide (setup-guide.md) - prerequisites, setup steps, operational commands, troubleshooting
  4. Index (index.md) - document index and quick start

Usage

/generate-docs [output-directory]

If omitted, output defaults to docs/.

Workflow

Step 1: Understand the project structure

  1. Inspect the directory structure
  2. Read key files (e.g., README.md, docker-compose.yml, requirements.txt, package.json)
  3. Identify entry points (e.g., main.py, app.py, src/index.ts)

Step 2: Analyze the code

  1. Extract symbol/structure summaries for major modules
  2. Identify integrations (APIs, databases, external services)
  3. Collect configuration files and environment variables

Step 3: Generate documentation

Generate each document following the templates below (full templates: TEMPLATES.md).

overview.md template

# {Project Name} - Technical Overview

## 1. Project Overview
### 1.1 Purpose
### 1.2 Key Features
### 1.3 Intended Users

## 2. System Architecture
### 2.1 Architecture Diagram (Mermaid)
### 2.2 Components

## 3. Core Flows
### 3.1 Main Flow (Mermaid sequence diagram)

## 4. Data Model
### 4.1 ER Diagram (Mermaid)
### 4.2 Table/Entity Notes

## 5. Repository Structure
### Directory Tree

## 6. Key Modules
### Responsibilities and important functions/classes

## 7. Environment Variables
### Table format

## 8. Security
### Auth, authorization, encryption

## 9. Operational Notes

## 10. Future Improvements

api-reference.md template

# API Reference

## Authentication
### Login / Logout

## Endpoints
### Each endpoint
- method + path
- parameters (table)
- request example
- response example

## Error Responses
### HTTP status codes

setup-guide.md template

# Setup & Operations Guide

## 1. Prerequisites
### Required software

## 2. First-time Setup
### Environment variables
### Run commands

## 3. Docker Notes (if applicable)

## 4. Operations
### Container commands
### Database commands

## 5. Troubleshooting
### Common issues and fixes

## 6. Backups

## 7. Production Configuration
### Security checklist

Mermaid diagram rules

Architecture diagram

graph TB
    subgraph Users
        Browser[Browser]
    end
    subgraph Server
        App[Application]
        DB[(Database)]
    end
    Browser --> App
    App --> DB

Sequence diagram

sequenceDiagram
    participant U as User
    participant S as Server
    participant D as Database
    U->>S: Request
    S->>D: Query
    D-->>S: Result
    S-->>U: Response

ER diagram

erDiagram
    User ||--o{ Order : has
    User {
        int id PK
        string name
    }
    Order {
        int id PK
        int user_id FK
    }

Output quality rules

  1. Write in English (keep proper nouns as-is; add Japanese only if explicitly requested)
  2. Use Mermaid diagrams proactively for visual understanding
  3. Prefer tables for parameters, env vars, endpoints, etc.
  4. Include runnable examples when possible (requests, responses, config)
  5. Make it approachable (explain terms briefly; step-by-step where helpful)

Notes

  • Do not overwrite existing docs (e.g., README.md)
  • Ensure the output directory exists (create if missing)
  • Mask secrets (API keys, tokens) using placeholders like your-api-key-here

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.