Back to guide/Developer Tools

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.

claude-code-tutorial
Edit View
Prompt
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.