// 44 tips tagged "documentation"
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.
Good comments explain why, not what. Tell Claude to read your complex code and add inline comments that explain the reasoning behind non-obvious decisions — why this algorithm was chosen, why this edge case exists, why the order matters — so the next developer (or future you) understands the intent without reverse-engineering the logic.
When it's time to cut a release, tell Claude to read your git log since the last tag and generate a human-readable changelog — organized by category (features, fixes, breaking changes), with clear descriptions that make sense to users, not just developers who read the commits.
Hand-maintained API docs always drift from reality. Tell Claude to read your routes, controllers, validation rules, and response shapes, then generate an OpenAPI specification that matches what the code actually does — accurate paths, parameters, request bodies, response schemas, and status codes.
Tell Claude to read your code and produce Mermaid diagrams — class relationships, request flows, database schemas, state machines, or sequence diagrams — so you can see your architecture visually without drawing anything by hand.
Tell Claude to read your git history between two tags or since the last release, then generate a formatted changelog — features, bug fixes, breaking changes, and improvements, grouped by category with human-readable descriptions, ready for release notes or CHANGELOG.md.
Tell Claude to read your routes, controllers, request validation, and response structures, then generate a complete OpenAPI (Swagger) specification — every endpoint, parameter, request body, response shape, and auth requirement, derived from the code itself.
Tell Claude to read your codebase and generate Mermaid diagrams — class diagrams, sequence diagrams, ER diagrams, or flowcharts — based on the real code structure, not imagined abstractions. Paste the output into any Mermaid renderer to visualize instantly.
Tell Claude to search your codebase for every environment variable reference, then generate a documentation table — variable name, where it's used, what it controls, whether it's required, and what the default is — so new developers know what to configure.
Point Claude at undocumented functions and it reads the implementation to write accurate JSDoc, PHPDoc, or docstring comments — including parameter descriptions, return types, thrown exceptions, and usage examples that actually match what the code does.
Tell Claude to scan your README, docs, comments, and config files for URLs and verify they still work — it finds 404s, redirects to deprecated pages, and outdated references, then updates them or flags the ones it can't resolve.
Use claude export to save a full conversation transcript as markdown or JSON — perfect for documenting decisions, sharing a debugging session with your team, or reviewing what Claude did before committing the changes.