Why you need it
AI doesn’t remember anything between conversations. Without CLAUDE.md you explain your folders, your style and your limits again every time. With it, you write it once and your AI gets it every time, even when a teammate is the one working with it.
It isn’t only for developers: it works just as well in a folder of proposals, web copy or one client’s documents.
Where to put it
Claude Code reads CLAUDE.md from several places and combines them:
| Where | What for |
|---|---|
in the project folder (./CLAUDE.md or ./.claude/CLAUDE.md) | project rules, shared by the whole team (belongs in git) |
| in a subfolder | rules for that part only, loaded when your AI reads or edits files in the subfolder |
in your home folder (~/.claude/CLAUDE.md) | your personal settings for all projects |
You can start with the /init command: Claude Code looks through the folder and suggests a first version. Then shorten and fix it, the suggestion tends to be more generic than you need.
What to write
- One sentence on what this is. What project or folder it is and who it’s for.
- A map. Where things are and which file is the source of truth. Your AI then doesn’t search around or pick up an old copy.
- How you work here. The process you want every time: language, tone, output format, how files are named.
- What it must not do. What your AI shouldn’t do without your approval (delete, send, change prices).
- Links instead of copies. Keep longer rules in separate files and link to them from CLAUDE.md. Claude Code can include a file with
@path/to/file.md. A process you only need now and then belongs in a skill.
A short example:
# Client proposals
Folder with proposals and the price list. We write in English and keep it friendly.
## Where things are
- Current price list: `pricing-2026.md`. Older price lists are in `archive/`, don't use them.
- Proposal template: `templates/proposal.md`.
## Process
1. First read the client's brief in the client's folder.
2. Take prices only from the current price list.
3. Save the finished proposal as `YYYY-MM-DD-client.md`.
## Not without my approval
- Don't send anything to the client.
- Don't change the price list.
What to leave out
- Passwords, keys and personal data. Anyone with access to the folder reads the file, and so does your AI.
- Everything at once. The longer the file, the harder it is for your AI to tell what matters. Keep it short and put the details in linked files.
- Things that go stale fast. “Discount valid until the end of the month” stays in the file next month too. Add a date, or put it somewhere else.
- Generic advice. “Write good code” or “be helpful” tells your AI nothing new. Write what applies only to you.
CLAUDE.md or AGENTS.md
Both files do the same thing, they differ only in who reads them. CLAUDE.md is the Claude Code file. AGENTS.md is an open format read by many other tools, such as Codex or Cursor. Cursor also has its own rules in the .cursor/rules folder.
Claude Code can read AGENTS.md too, but only when there’s no CLAUDE.md in the folder. When both are there, CLAUDE.md wins.
If your team uses several tools, don’t write the rules twice. Put the main text in AGENTS.md and add just one line to CLAUDE.md: @AGENTS.md. Your rules then live in one place and every tool reads them.
Checklist
- The file is under 200 lines, with one sentence at the top on what it’s about.
- Every rule applies to this project, not in general.
- It says what your AI must not do without approval.
- There are no passwords or personal data in it.
- Longer rules are in linked files.
- Anything that goes stale has a date.
Frequently asked questions
What is CLAUDE.md?
A Markdown text file that Claude Code loads at the start of every session. It holds the rules and information your AI should know every time.
What’s the difference between CLAUDE.md and AGENTS.md?
None in content. Claude Code reads CLAUDE.md, AGENTS.md is an open format for other tools, such as Codex or Cursor. Claude Code reads AGENTS.md only when CLAUDE.md is missing. So you can write the rules once in AGENTS.md and point to it from CLAUDE.md with the line @AGENTS.md.
How long should CLAUDE.md be?
As short as possible. Only what your AI needs every time belongs in the file. Put the details in separate files and link to them.
Where do I put CLAUDE.md?
In the project folder, so the whole team shares it. Personal settings for all projects go in ~/.claude/CLAUDE.md.
How rules, processes and data fit together: AI for business.
How Airine does it
In Airine every Markdown file has a card: what it’s about, which client and project it belongs to, what it replaces and who can read it. Your AI tool asks Airine what’s current instead of picking up an old version.
More: Knowledge