Project documentation guidelines. Use when asked to "write documentation", "create a CLAUDE.md", "write a README", "document this project", "improve documentation", or when creating/updating CLAUDE.md or README.md files.
80
—
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Write documentation that serves both humans and AI agents. Core principle: document only what cannot be discovered from code. Codebase structure matters more than documentation volume — a well-organized project with 10 lines of docs beats a messy one with 200.
Before writing any documentation line, ask: "Could an agent find this by reading code or config files?"
If yes, don't write it. Directory trees, exports, types, linter rules, commands, dependencies, test locations, env var names — all discoverable from code and config files. See references/anti-patterns.md for the full catalog.
Every line you add has a maintenance cost that compounds across every session. Stale docs cause worse decisions than no docs.
Purpose: non-obvious context that AI agents cannot discover from code.
Content that belongs:
Content that does NOT belong: anything that passes the discoverability rule — commands, directory trees, exports, types, config rules, dependency lists.
Structure:
CLAUDE.md — project-wide context applicable everywhereCLAUDE.md — that module's non-obvious constraints only, never repeat root contentSize: target <30 lines. If you're past 50 lines, it's bloated. Cut ruthlessly.
See references/claude-md-guide.md for templates and examples.
Purpose: human onboarding — get someone from zero to productive.
Content: project description, prerequisites, setup, how to run, how to test, how to contribute. Keep it executable — commands that copy-paste and work beat prose.
Root README.md = full overview + setup. Service-level = purpose + how to run independently. Don't duplicate CLAUDE.md content — different audiences, different purposes.
Every module is a grey box — clear public API, hidden internals. Documentation describes the interface (what it does, constraints, gotchas), NOT the implementation (file trees, data flow, internal functions).
Progressive disclosure: import from public API → read docs for context → read source only if needed.
You own the interface. AI owns the implementation. Tests keep it honest. If docs describe internal wiring, they couple consumers to implementation and break on every refactor.
Each document has exactly one job:
| Document | Job |
|---|---|
README.md | Human onboarding |
CLAUDE.md | AI agent context |
| Architecture docs | System design decisions |
| API docs | Endpoint contracts |
Never duplicate between them. If the same info is in two places, delete the copy in the wrong file.
Some things genuinely need docs because no amount of code reading reveals them:
If you're unsure whether something needs docs, apply the three-question test from references/anti-patterns.md.
| Topic | Reference |
|---|---|
| CLAUDE.md and README templates | references/claude-md-guide.md |
| Anti-patterns, bloat examples, the three-question test | references/anti-patterns.md |
70de68f
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.