CLAUDE.md Writing Prompt
A thorough CLAUDE.md is the single highest-leverage thing you can do for Claude Code productivity. This prompt ensures comprehensive coverage of every section that matters. The 'base on what you find' instruction prevents fabricated documentation.
Analyze this codebase and write a comprehensive CLAUDE.md file. Read the existing code, configs, and documentation first. Include these sections: ## Project Overview — what this project does, one paragraph ## Tech Stack — table with Layer | Technology format ## Commands — every npm script / make target with descriptions ## Directory Structure — tree view of important directories with descriptions ## Architecture — how the app is structured, key patterns, data flow ## Database — schema overview, ORM, migration workflow ## Key Components — table of the most important files and what they do ## Conventions — naming, file structure, import order, styling ## Important Rules — things Claude Code must never do (e.g., don't push to main, don't modify migrations directly) Base everything on what you actually find in the code. Do not make assumptions. If something is unclear, note it with a TODO.
Why this prompt works
A thorough CLAUDE.md is the single highest-leverage thing you can do for Claude Code productivity. This prompt ensures comprehensive coverage of every section that matters. The 'base on what you find' instruction prevents fabricated documentation.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Context-Aware Code CompletionProviding the surrounding code and project context lets the model match existing patterns exactly. The constraint against modifying existing code prevents unwanted side effects.
Inline Code SuggestionConstraining suggestions to match existing style and scope produces insertions that feel native to the codebase. The 'no explanation' rule mimics real inline completion behavior.
Code ExplanationThe audience level parameter adjusts complexity automatically. Requiring a usage example ensures the explanation is practical, not just theoretical.