docgen
Skill0 starsChanged 4 months agoMITView on GitHub
Generate documentation for a codebase from actual code analysis — README, wiki, business rules, business overview, technical overview, C4 models, UML diagrams, project overview. Writes markdown to docgen-output/ in the target repo (path optional, defaults to cwd; output language optional via --lang, defaults to English). Use when the user asks to document a repository, generate project docs, produce architecture diagrams, or says "/docgen", "documenta esse repo", "gera a documentação".
5 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- AsiaOstrich/EngramGraphtheir own version, first seen Nov 8, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Nov 1, 2026
- prsolans/claude-skillstheir own version, first seen Oct 15, 2026
- zedarvates/botte-secretetheir own version, first seen Aug 8, 2026
Used with
Projects with it also use metrics.
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.
GoogleSkillmetrics
Expertise in analyzing time-series repository health metrics, investigating root causes, and proposing proactive workflow improvements.
Also in 3 projects that use this
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- AsiaOstrich/universal-dev-standards★ 84same name
- AsiaOstrich/EngramGraph★ 4same name
- zedarvates/botte-secrete★ 2same name
- zedarvates/frugal-skills★ 1same name
- prsolans/claude-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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- claude-code-memorySkill
- handoffSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- publish-npmSkill
- specd-apply-changeSkill
- specd-archive-changeSkill
- specd-exploreSkill
- specd-proposeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 21 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
If a token matches no doc type and is not an existing directory, list the valid types and stop rather than guessing.
- Distinctive: line 57
Ground every claim in the code you read: Never invent a feature, dependency, endpoint, or workflow that is not in the repository.
- Distinctive: line 67
Write all prose in the selected language (default English): body text, headings, table headers, diagram labels, list items.
- Distinctive: line 79
Never include secrets, credentials, tokens, or connection strings.
- Distinctive: line 84
All Mermaid diagrams MUST follow these rules strictly to avoid parse errors:
- Distinctive: line 87
Start with a valid diagram type on the FIRST line (graph, flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram, C4Context, …
- Distinctive: line 94
Use ->> for solid, -->> for dashed in sequence diagrams.
- Distinctive: line 95
NEVER use ( or ) inside node labels in [] brackets — it breaks parsing.
- Distinctive: line 96
NEVER use " (quotes) inside node labels — it breaks parsing.
- Distinctive: line 97
Keep labels SHORT and simple.
- Very specific: line 110
Every document starts with a single # Title H1.
- Distinctive: line 154
Document what you find honestly — if few rules exist, explain why.
- Distinctive: line 170
Write in accessible language without technical jargon.
- Distinctive: line 217
Use simple node IDs (letters/numbers only, no spaces)
- Distinctive: line 218
Use [] for rectangles, () for rounded, [()] for cylinders, {} for diamonds
- Distinctive: line 219
Use --> for arrows, -->|label| for labeled arrows
- Distinctive: line 220
Every opening bracket must have a matching close bracket
- Distinctive: line 221
NO quotes inside node labels — use <br/> for line breaks
- Distinctive: line 270
Use simple identifiers (no spaces, no special characters in IDs)
- Distinctive: line 273
Every opening bracket must have a matching close
- Distinctive: line 274
Use ->> for solid arrows, -->> for dashed arrows in sequence diagrams
- Distinctive: line 275
Use --> for associations in class diagrams
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
DocGen — code documentation generator
Generate one or more documentation artifacts for the repository in the current working directory, from real code analysis only.
Arguments
$ARGUMENTS is a space-separated list, all parts optional and order-free:
- repo path — a token that names an existing directory (contains
/, or is., or resolves to a directory). Defaults to the current working directory. This is the repository root: everything is read from it and output goes inside it. - language —
--lang <code>/--lang=<code>(e.g.pt-BR,es,en). Defaults to English. - doc types — everything else. Empty → produce all 8, in the order listed
below. Matched loosely:
c4,c4-modelsandc4_modelsall selectc4-models.md.
If a token matches no doc type and is not an existing directory, list the valid types and stop rather than guessing.
| doc type | output file |
readme | README.md |
wiki | wiki.md |
business-rules | business-rules.md |
business-overview | business-overview.md |
technical-overview | technical-overview.md |
c4-models | c4-models.md |
uml-diagrams | uml-diagrams.md |
project-overview | project-overview.md |
Procedure
- Scan. Build a picture of the repo before writing anything:
git -C <repo> ls-files(fall back tofind <repo>if not a git repo) for the file inventory; read the manifest (package.json,pyproject.toml,go.mod,pom.xml, …), the entrypoints, the config, and the modules that carry the domain logic. Read enough real code to write specifics — file names, function names, class names. Skip vendored trees (node_modules,.venv,vendor,dist,build) and anything.gitignored. - Write. For each selected doc type, compose the full markdown per the shared
rules and the per-document spec below, then
Writeit to<repo>/docgen-output/<output file>. Create the directory if missing. One complete document per file — never a stub, never a placeholder. - Report. List the files written with their sizes.
Shared rules (apply to every document)
Ground every claim in the code you read. Never invent a feature, dependency, endpoint, or workflow that is not in the repository. If the code does not support a required section, say so explicitly in that section and explain what the code does instead — an honest short section beats a fabricated long one.
Minimum depth. Each document is a real deliverable, not an outline: aim for 1000+ words, with concrete references to actual files and symbols.
Language
Write all prose in the selected language (default English): body text, headings, table headers, diagram labels, list items. The per-document specs below name their required sections in English — translate those headings into the output language, keeping the meaning. Never translate: code, identifiers, file and directory names, command lines, config keys, dependency names, and the Mermaid keywords themselves.
Style
- Clear, professional prose in the output language. Active voice.
- Be specific — reference actual file names, function names, class names.
- Tables for structured data, lists for enumerations.
- Include code examples where relevant.
- Never include secrets, credentials, tokens, or connection strings. If you read one, do not reproduce it — refer to the variable name only.
Mermaid rules
All Mermaid diagrams MUST follow these rules strictly to avoid parse errors:
- Be in ```mermaid code blocks
- Start with a valid diagram type on the FIRST line (graph, flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram, C4Context, C4Container, C4Component)
- Have balanced brackets: every ( must have ), every [ must have ], every { must have }
- Node IDs: ONLY letters, numbers, underscores. NO spaces, NO special characters.
- Node labels in brackets: NO quotes, NO parentheses, NO special chars that conflict
with Mermaid syntax. Use plain text or
<br/>for line breaks. - Arrows: use --> for solid, -.-> for dotted, ==> for thick in flowcharts. Use ->> for solid, -->> for dashed in sequence diagrams.
- NEVER use ( or ) inside node labels in [] brackets — it breaks parsing.
- NEVER use " (quotes) inside node labels — it breaks parsing.
- Keep labels SHORT and simple. If complex, use a separate note.
- Each diagram must have at least 3 nodes/participants and 2 connections.
- Subgraphs:
subgraph Title...end(Title has NO brackets).
Common errors to AVOID:
A[Label (with parens)]→ WRONG. UseA[Label with parens]orA[Label - detail]A["quoted label"]→ WRONG. UseA[Label]My Node[Label]→ WRONG (space in ID). UseMyNode[Label]A --> B[Label]→ WRONG. UseA -->|Label| Bfor edge labels.
Structure
Every document starts with a single # Title H1. Required sections are H2
headings whose text includes the listed keywords. Do not skip heading levels.
README.md
Required sections:
- Overview / Description — what the project does, its purpose
- Features — key features and capabilities
- Prerequisites / Requirements — what's needed to run it
- Installation / Getting Started — step-by-step setup
- Usage — how to use the project, with examples
- Project Structure — directory layout explanation
- Configuration — environment variables, config files
- Contributing — how to contribute
Target audience: Developers who need to understand, set up, and contribute to the project.
wiki.md
Required sections:
- Architecture — system architecture and design patterns
- Development Setup / Getting Started — detailed dev environment setup
- Code Organization / Project Structure — detailed directory and module explanation
- Key Components / Modules — deep dive into important parts
- Testing — how to run and write tests
- Deployment — deployment process and environments
- Troubleshooting — common issues and solutions
Target audience: New team members who need a thorough onboarding reference.
business-rules.md
Required sections:
- Validation Rules / Input Validation — data validation logic
- Authorization / Access Control — auth rules and permissions
- Business Logic / Workflow Rules — core business workflows
- Data Constraints — data integrity rules
- Error Handling — business error scenarios
Document what you find honestly — if few rules exist, explain why.
Target audience: Business analysts, QA engineers, product managers.
business-overview.md
Required sections:
- Executive Summary — high-level project summary in business terms
- Business Context / Purpose — why this project exists, what problem it solves
- Key Capabilities / Features — what the system does (non-technical language)
- Stakeholders / Users — who uses the system
- Value Proposition — business value delivered
- Future Considerations — potential improvements
Target audience: Non-technical stakeholders, executives, product owners. Write in accessible language without technical jargon.
technical-overview.md
Required sections:
- Architecture Overview — system architecture, patterns, design decisions
- Technology Stack — languages, frameworks, libraries with versions
- Key Components — detailed component descriptions
- Data Flow / Integration Points — how data moves, external integrations
- Security / Authentication — security measures, auth mechanisms
- Performance — performance considerations
- Infrastructure — deployment, CI/CD, environments
Target audience: Senior engineers, architects, DevOps.
c4-models.md
Required sections:
- Context Diagram — system context showing actors and external systems
- Container Diagram — containers (web app, API, database, etc.)
- Component Diagram (optional) — internal components of a container
CRITICAL: Valid Mermaid Diagrams Required
Each section MUST include a ```mermaid code block with a valid diagram.
For C4 diagrams, prefer using flowchart or graph with descriptive labels since
C4 Mermaid syntax can be fragile. Example of a valid C4-style diagram:
graph TB
User[User / Actor]
WebApp[Web Application<br/>Frontend]
API[API Server<br/>Backend]
DB[(Database<br/>Persistence)]
ExtSvc[External Service<br/>Integration]
User -->|HTTPS| WebApp
WebApp -->|API calls| API
API -->|Queries| DB
API -->|REST| ExtSvcRules for valid mermaid:
- Use simple node IDs (letters/numbers only, no spaces)
- Use [] for rectangles, () for rounded, [()] for cylinders, {} for diamonds
- Use --> for arrows, -->|label| for labeled arrows
- Every opening bracket must have a matching close bracket
- NO quotes inside node labels — use
<br/>for line breaks
Target audience: Architects and senior engineers.
uml-diagrams.md
Required: At least 3 Mermaid diagram blocks covering different UML views.
Choose from (include at least 3):
- Sequence Diagram — key user flows or API interactions
- Class Diagram — major classes/components and relationships
- Flowchart — activity or process flows
- State Diagram — state transitions for key entities
Example valid sequence diagram:
sequenceDiagram
actor User
participant App
participant API
participant DB
User->>App: Open page
App->>API: GET /data
API->>DB: SELECT query
DB-->>API: Results
API-->>App: JSON response
App-->>User: Render pageExample valid class diagram:
classDiagram
class Component {
+render()
+props: Props
}
class Service {
+getData()
+processRequest()
}
Component --> Service : usesRules for valid mermaid:
- Use simple identifiers (no spaces, no special characters in IDs)
- For sequence diagrams: participant/actor declarations first, then interactions
- For class diagrams: class definitions first, then relationships
- Every opening bracket must have a matching close
- Use ->> for solid arrows, -->> for dashed arrows in sequence diagrams
- Use --> for associations in class diagrams
Target audience: Developers and architects.
project-overview.md
Required sections:
- Project Summary / Overview — comprehensive project description
- Architecture — high-level architecture description
- Technology Stack — complete technology inventory
- Key Features / Capabilities — feature inventory
- Code Organization — how the code is structured
- Dependencies — key dependencies and their purposes
- Development Workflow — how the team works with this codebase
Target audience: AI systems and new developers who need a comprehensive single-document understanding of the entire project. This document should be self-contained and serve as the definitive reference for understanding the project.
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.

