CLAUDE.md Generator
Generate a project-aware CLAUDE.md in 30 seconds.
- $39 Free
- 30 sec
- No signup
Answer a few questions about your stack and conventions
Preview your generated CLAUDE.md live
Copy or download it - drop it in your repo and ship
You get: A tailored CLAUDE.md file, ready to drop into your repo root.
Project basics
Commands
Rules (pick what applies)
Style notes
Preferences (free text)
Your CLAUDE.md
# This Project This file is read automatically by Claude Code at the start of every session in this repo. Treat it as your operating manual for the project. ## Stack - **Language:** TypeScript - **Framework:** Next.js - **Package manager:** pnpm ## Commands - **Dev:** `pnpm dev` - **Build:** `pnpm build` - **Test:** `pnpm test` - **Lint / typecheck:** `pnpm typecheck && pnpm lint` ## Code style Match existing file structure. Use tabs only if the file already uses tabs. Prefer named exports. ## Rules - Run tests before declaring a task complete - Always use the existing component patterns - do not introduce new UI libraries - Never commit secrets, .env files, or generated build output - Prefer editing existing files over creating new ones ## Preferences Default to clear, boring code. Only abstract on the third repetition. Never silence type errors with `any`. ## Working agreement - Read this file in full before starting a task. - If a request conflicts with a rule above, ask before acting. - Prefer small, reviewable changes. One concern per commit. - When uncertain, check the closest existing file for the pattern before inventing a new one.
Save as CLAUDE.md at the root of your repo.
What CLAUDE.md actually does
CLAUDE.md is the single file that Claude Code reads first every time you open a session inside a project. Anything in it becomes background context for every prompt you write that day. If you tell it which test command to use, it will use that one. If you list rules, it will follow them. If you describe your code style, it will match it. Most of the friction people have with Claude Code - 'why does it keep adding unnecessary helpers' or 'why did it pick the wrong test command' - is downstream of an empty or generic CLAUDE.md. Five minutes of writing this file saves hours of correcting the model later.
Think of CLAUDE.md as the README you wish every new contributor had read before they touched the repo. It is not documentation in the formal sense. It is a working agreement: how you talk about the project, which scripts matter, what the conventions are, what you do not want changed. Claude Code is excellent at following written conventions when they are written down somewhere it can see. CLAUDE.md is that place.
Where to put it and how it gets loaded
Save the output of this generator as CLAUDE.md at the root of your repo - the same folder that contains your package.json, your pyproject.toml, or your Cargo.toml. That is the only location that gets auto-loaded into context. You can also put a CLAUDE.md inside a subfolder if you want different rules for one part of the codebase - the model walks up the tree and merges what it finds.
- Root level - global rules for the whole repo. Most projects only need this one.
- Per-package - for monorepos where each package has different scripts or conventions.
- Per-feature - for areas of the codebase with unusual constraints, like a legacy module you want left alone.
What goes inside (and what to leave out)
Good CLAUDE.md files are short, specific, and high-signal. Every sentence either describes a fact about the project, a script the model needs to run, or a rule it must follow. Leave out anything that is generic advice or that the model already knows - it does not need a tutorial on TypeScript or a paragraph about why testing matters. It needs to know which command you run, which folder houses your components, and what your team has agreed not to do.
- Project identity - one line so the model frames its output in your domain language.
- Stack - language, framework, package manager. The model uses these to pick the right syntax, the right command names, and the right defaults.
- Commands - the exact dev / build / test / lint commands. If you write `npm test` here, the model will not invent `yarn test` later.
- Rules - hard constraints that are non-negotiable. These read like 'never X' or 'always Y'.
- Preferences - softer guidance about style, tone, and tradeoffs. The model will follow these unless you override them in a specific prompt.
Keep it under 200 lines
CLAUDE.md is loaded into every session, which means every line costs tokens forever. A focused 50-line file beats a 500-line one. If you find yourself documenting individual files, those notes belong in code comments, not here.
Rules that actually move the needle
The rules section is where most of the value lives. The right rule kills an entire class of bad output. The most useful rules in real codebases tend to be variations of: 'use the existing pattern, not a new one', 'run tests before claiming done', 'do not touch generated files', and 'ask before doing X'. Those four families cover ninety percent of the corrections people end up giving Claude Code mid-session. Write them once here and you stop writing them every prompt.
- Pick four to six rules max. More than that and the model starts ignoring the back half.
- Phrase each one in plain English. 'Never commit .env files' beats a regex.
- Put the reason after the rule when it is non-obvious. 'Run tests before declaring done because our CI is slow and we cannot afford a broken main.'
- Update the file when you find yourself correcting the same mistake twice. That is the signal that the correction belongs in CLAUDE.md.
What a healthy iteration loop looks like
CLAUDE.md is not a one-time setup. Treat it like a living config file. Every time Claude Code does something that surprises you - good or bad - ask whether a sentence in CLAUDE.md would have prevented or encouraged that behavior. If yes, add the sentence. Over a few weeks the file evolves into a high-fidelity description of how your team actually wants the model to work. New teammates can read it and instantly understand the conventions.
Beyond the basics
Once you have a CLAUDE.md that holds up across a week of work, the next big upgrade is MCP servers - the protocol that lets Claude Code reach beyond your filesystem into your database, your design system, or your project tracker. The Claude Code Club curriculum walks through every layer of that workflow, from the first CLAUDE.md to your first agent. The generator above gets you the first layer in under a minute. Use it, ship something, and come back when you are ready for the rest.
Frequently asked questions
Will Claude Code actually read this file?
Yes. CLAUDE.md at the root of a repo is loaded automatically at the start of every Claude Code session in that folder. You do not need to reference it in your prompts - it is already there.
What is the difference between CLAUDE.md and a regular README?
A README is written for humans browsing your project. CLAUDE.md is written for Claude Code. It can be shorter, blunter, and more imperative - the audience is one model, not the open internet.
Can I have multiple CLAUDE.md files in one repo?
Yes. The model walks up the directory tree and merges what it finds, so you can have a root-level file with global rules and a subfolder file with rules that only apply to that area of the code.
Do I need a CLAUDE.md to use Claude Code?
No - Claude Code works fine without one. But every project that gets serious use ends up with one, because it removes the most common friction: telling the model the same thing every session.
How long should it be?
Aim for under 200 lines. Everything here is loaded into every session, so it costs tokens forever. Tight beats thorough.
Is the generator output safe to commit?
Yes - the output is generated entirely in your browser. Nothing is sent to a server. Save the file, commit it like any other config file, and iterate from there.
Liked this tool? The club is the next step.
Join Claude Code Club for $9/month. 400+ lessons, weekly updates, and the workflows behind every tool on this site.
- No experience needed
- Cancel anytime
- Updated weekly
