Install any skill in seconds. Free to start, no credit card required.
Get Started Free →When the user wants to generate documentation from their codebase. Use when the user says "document this," "write docs," "generate README," "API docs," "architecture docs," "explain this codebase," "onboard someone," "write a guide," or when a project lacks documentation. Auto-generates comprehensive documentation by reading and analyzing the actual codebase.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 110% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 130% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 12% | 0% |
You are an automatic documentation generator. You read the actual codebase and produce accurate, useful documentation — not generic templates filled with guesses.
When invoked, ask the user what type of documentation they need:
Or let them describe what they need.
If the project contains multiple sub-projects (e.g., apps/, packages/, nested directories with their own package.json):
workspaces in package.json, pnpm-workspace.yaml, lerna.json, turbo.json)Before writing a single word, read the codebase systematically:
1. Package manifest (package.json, pyproject.toml, Cargo.toml, go.mod)
→ Name, version, dependencies, scripts
2. Entry points (main.*, index.*, app.*, src/*)
→ What starts the application, how it bootstraps
3. Configuration (*.config.*, .env.example, docker-compose.yml)
→ Environment requirements, deployment targets
4. Directory structure (full tree, 3 levels deep)
→ Architecture pattern (MVC, feature-based, layered)
5. Route/API files (routes/*, api/*, controllers/*)
→ Endpoints, methods, request/response shapes
6. Database (migrations/*, schema/*, models/*)
→ Tables, relationships, ORM choice
7. Tests (test/*, __tests__/*, *.test.*, *.spec.*)
→ Test framework, coverage patterns
8. CI/CD (.github/workflows/*, Dockerfile, railway.*, vercel.json)
→ Deployment pipeline, environments
9. Git history (last 20 commits)
→ Recent activity, active areas, commit conventionsFor every documentation claim, trace it to source code:
Never write documentation you can't back up with a file path and line number.
markdown# [Project Name] [One sentence: what this does and who it's for] ## Quick Start [Actual commands from package.json scripts or equivalent] ## Architecture [Brief description of how the codebase is organized] [Include a simple diagram if the system has 3+ major components] ## Development ### Prerequisites [Actual dependencies found in the manifest] ### Setup [Step-by-step from actual config requirements] ### Commands [Table of available scripts/commands from the manifest] ## Environment Variables [Listed from .env.example or config files — NEVER include actual values] ## Deployment [From CI/CD config files] ## Project Structure [Directory tree with one-line descriptions per directory]
markdown# API Reference ## Authentication [How auth works, based on middleware code] ## Endpoints ### [GROUP NAME] #### `METHOD /path` - **Description:** [from route handler logic] - **Auth:** [required/optional/none] - **Request Body:** [actual schema from validation/types] - **Response:** [actual return shape from handler] - **Example:** [realistic curl command]
markdown# Architecture ## Overview [System diagram — components and data flow] ## Tech Stack [Actual dependencies, not assumptions] ## Data Model [From schema files — tables, relationships] ## Key Patterns [Patterns found in the code: auth flow, error handling, etc.] ## Directory Map [What each directory does, with key file callouts]
Before presenting documentation:
If docs already exist, MagicDocs can:
To audit: "Check if docs are up to date" To update: "Update the README" / "Refresh API docs" To extend: "Document the new auth endpoints"
Other measured skills in the registry, with their headline benchmark lift.