How to create clear, multi-level, strictly structured documentation for any software project. You must use this skill whenever the user asks to write documentation, document code/a project, create a README, or describe architecture, backend, frontend, or scripts. Even if the user just drops a folder of code and asks to "describe this", apply this skill.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/generate-project-docs/SKILL.mdYou are a Senior Technical Writer and an experienced Software Architect. Your task is to analyze the provided code/project and create predictable, strictly structured documentation that leads the reader by the hand: first the essence and context, then gradually — the details.
README.md: The essence, high-level architecture (C4), quick start.features.md: Functionality, usage scenarios (User-Journey), access rights.technical_reference.md: Technical implementation, code structure, API, observability.The result must ALWAYS consist of exactly 3 Markdown files. All files must link to each other. Create a docs/ folder and write them there.
README.md (Entry point — "Speed-to-Insight")This file should provide an understanding of the system within 30 seconds. The order of sections is STRICTLY fixed:
1. The essence of the project — exactly three sentences:
VISION.md, or README. If there's no confirmed info — skip it.2. How it works — 3–5 sentences in plain language describing the path from a user action to a result.
3. High-level architecture (C4 Context): A Mermaid graph TD block showing the system in its environment (clients, external systems, DB).
graph TD
Client[Web Client]
Gateway[API Gateway]
Service[App Service]
DB[(Database)]
Client --> Gateway
Gateway --> Service
Service --> DB4. Glossary of key concepts — a mandatory block if the project has domain entities.
**Term** — one sentence, what it is.5. Table of contents: Links to features.md and technical_reference.md. The table of contents must explicitly point to the key
technical sections (Architecture, Project structure, External dependencies, Security, API contract) via anchor links of the form technical_reference.md#6-api-contract — so that from the first page the reader
sees the completeness of the documentation and can jump to the needed section in one click.
6. Quick Start: A step-by-step guide (1-2-3 steps) on how to run the project locally.
✓ Expected result: [a specific log line or server response].✓ Expected result: Server available at http://localhost:4000/graphqlcurl command or CLI call to check that it works.7. Configuration: A table of environment variables (.env) with an explanation of WHY each one is needed.
features.md (Functional level — "User value")This file describes the functionality from the perspective of the user or the system. File structure:
List of capabilities: What the system specifically does.
User-Journey map: For each role — a step-by-step sequence from entry to result. Unlike "How it works" in the README (3–5 sentences), here it's the full path with all the branches. If the project has a single role and a simple linear scenario — the section can be skipped.
Access matrix (Actor-Permissions): A table of roles and allowed actions. Extracted from guards, middleware, and decorators in the code. If the project has no role/access-control system — skip the section.
Known issues / Limitations: Optional. Read from TODO/FIXME in the code and explicit fallback branches in the logic. The goal: warn the reader about technical debt and unfinished features in advance.
technical_reference.md (Technical level — "The guts")This file describes the technical details for developers. The file consists of 8 sections. The order is fixed: the reader moves from the general (architecture + schema) to the specific (API, logs, tests).
1. Architecture
1.1 Data flow diagram — a Mermaid block showing the dynamics of a single request (happy path).
sequenceDiagram for request-response systems, flowchart TD for pipelines.Example:
sequenceDiagram
participant Client
participant API
participant Service
participant DB
Client->>API: POST /resource
API->>Service: validate & process
Service->>DB: INSERT
DB-->>Service: id
Service-->>API: result
API-->>Client: 201 Created1.2 Project structure — a directory tree with an explanation of each folder.
tree diagram (without node_modules, dist, .git)./prisma").project/
├── src/ — source code
├── prisma/ — DB schemas and migrations
├── docker/ — Dockerfile and docker-compose
└── tests/ — tests1.3 External dependencies — a table of services/systems the project depends on.
| Dependency | Purpose | If unavailable |
|---|---|---|
| PostgreSQL | Data storage | The application doesn't work |
| Redis | Session cache | Sessions reset on restart |
If there are no external dependencies — state explicitly: "No external dependencies."
2. Key modules: A description of the project's main parts (with a mandatory technical "WHY" explanation).
3. Specifics (MUST apply conditional logic):
If Frontend only:
## 3. Web application pages — a table of the main pages/screens with a description of their functionality.
If Backend only:
## 3. Database — the main entities/tables, how they're related, the schema of the key table.
If a script/DevOps only:
## 3. Execution pipeline — the sequence of commands or steps.
If Full-Stack (both frontend and backend):
## 3. Pages and database
### 3.1 Web application pages — a table of pages
### 3.2 Database — a table schema
Both subsections INSIDE one ## 3 section — to avoid conflicting with the numbering of sections 4–8.
4. Security and fault tolerance:
4.1 Protection mechanisms:
4.2 Behavior on failures:
5. Key architectural decisions (ADR Light):
A table of 1–3 entries. Only decisions affecting stability or security. Not the project's history, not the choice of development tools. If everything is by-the-book — skip it.
| Decision | Alternative | Reason for the choice |
|---|---|---|
| Redis for sessions | In-memory cache | Data isn't lost on container restart |
| ... | ... | ... |
6. API / CLI Contract:
/docs, /swagger, GraphQL playground): insert the link as the first line, then
describe only the 2–3 most critical endpoints.Example for REST:
POST /api/auth/login
Request: { "email": "user@example.com", "password": "secret" }
Response: { "token": "eyJ...", "expiresIn": 3600 }7. Observability and diagnostics:
7.1 Logs:
/var/log/app/app.log or "stdout, journald unit app.service".docker logs <container> or via fluentd/loki."7.2 Key metrics:
7.3 Error codes:
| Code | Meaning | What to do |
|---|---|---|
| 401 | Invalid / expired token | Refresh the token via /auth/refresh |
| 403 | Insufficient permissions | Check the user's role |
| 500 | ... | Check the ERROR level in the logs |
8. Testing and verification:
8.1 Running tests: Specific commands (not "see README").
8.2 Coverage:
8.3 Smoke test after deploy: 2–5 steps doable in 2–3 minutes without knowing the system's internals — a tool for the on-call engineer, not the author.
Example:
1. GET /health → expect 200 OK, { "status": "ok" }
2. POST /api/auth/login with test data → expect 200 + token
3. GET /api/resource with the obtained token → expect 200 + listPreparation before generation (STRICTLY):
0a. Determine the output language:
README.md or of the code comments → use the same language.0b. Check whether a docs/ folder exists:
> Updated: <date>.0c. Determine the size of the project to choose the documentation depth:
0d. Analyze the project thoroughly before generation. The documentation will be as complete and accurate as your understanding of the code is deep. Don't read files superficially. Go through every module, config, middleware, test, CI script, and Dockerfile — all of these are sources of facts for the documentation. Pay special attention to the non-obvious spots: fallback branches, error handling, TODO/FIXME, dependencies that don't catch the eye (devDependencies, the toolchain). If after the analysis you still have questions about the structure or logic — reread the file again. The goal: not a single significant detail of the project should remain undocumented because you skipped it.
Study all the provided project files, the directory structure, and the manifests (package.json, Dockerfile,
requirements.txt, Makefile, etc.).
Form an overall picture in your mind: what kind of project this is, who its users are, how it's launched. Determine the project type: frontend / backend / full-stack / script / library.
Generate README.md strictly in the order of sections 1–7:
graph TD in the README is mandatory.✓ Expected result:. Add a Verification point (curl/CLI).Generate features.md.
Generate technical_reference.md strictly in the order of sections 1–8:
Make sure the text style matches "Plain language" and that "WHY" is explained everywhere. Specifically check:
Final verification (MANDATORY): After generating or editing, CHECK all the documentation (README.md, features.md, technical_reference.md) for:
Run the self-check against the checklist in Section 4.
uxname/kodu
db733be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.