Commands

How to Set Up a CLAUDE.md That Actually Helps

3 min read

CLAUDE.md is a file Claude Code reads automatically every session. Put your project’s rules in it and stop repeating yourself.

1. Create it

Easiest — let Claude write a first draft:

/init

Or make CLAUDE.md at your repo root by hand.

2. Put in the things it keeps getting wrong

Keep it to what actually matters:

# Project: my-app

## Commands
- Install: `pnpm i`
- Dev: `pnpm dev`
- Test: `pnpm test`
- Lint: `pnpm lint`

## Conventions
- TypeScript strict. No `any`.
- Components in `src/components`, one per file.
- Use the existing `db` helper in `src/lib/db.ts` — don't add a new client.

## Don't
- Don't edit anything in `src/generated/`.

3. Keep it short

A focused half-page beats a wall of text. If it’s long, Claude skims it. Update it when you catch Claude repeating a mistake.


Tips

Open the full interactive version (with copy buttons) ↗

← All guides