CLAUDE.md
A simple text file where you describe the project rules and details to the Claude Code agent, which the agent reads at the start of every session.
In plain terms
Imagine a new colleague joining the company and receiving a house rulebook on the first day: where things are, how things are usually done, and what is forbidden. CLAUDE.md is the same for an AI agent. It is not a program, but a note written in everyday language that you put in the project folder.
This is necessary because the agent does not carry over previous conversations by default: it essentially starts every session with a clean slate. Without a file, you would have to repeatedly explain, for example, that it should write in Hungarian, where to save the results, or which commands can be used to test the program.
What makes it different from a simple request in the chat window is that it is persistent: you write it once, and from then on it applies every time. If you keep the file in the team's shared storage, everyone's agent receives the same rules.
How it works
- You create a file named CLAUDE.md in the project's root folder. You can write it manually, or the agent can generate a draft using the /init command after reviewing the project.
- You write into it what the agent needs to know: the folder structure, common commands, style rules, and prohibitions.
- When you launch the agent, it automatically loads the file content into its context, that is, into the text it 'holds in mind' while working.
- Multiple levels can exist simultaneously: a personal file valid for all your projects, one specific to the project, and in companies, a centrally issued one, as well as separate files for individual subfolders. The agent loads the higher levels together at startup, and the subfolder files only when working within that specific subfolder.
- You maintain the file over time: if the agent repeatedly makes a mistake, you add a new rule and remove lines that have become unnecessary.
An everyday example
A small online store developer writes into CLAUDE.md that prices must always be displayed in forints including VAT, and that the live database must not be touched. From then on, the agent generally adheres to these instructions during tasks without needing to be asked again; however, the live database should also be protected with permissions.
Who is affected
A common misconception
Limits and risks
- An overly long file harms the result because important rules get lost in the volume of text, and loading it each time consumes part of the context.
- Do not enter passwords, access keys, or other secrets, as the file is typically shared together with the project.
- If you download an external project, the CLAUDE.md inside also gives instructions to your agent, so it is worth reading before assigning work.
- An outdated rule is worse than a missing one: if the project changes, you must also update the file.
Similar, but not the same
- AGENTS.md – AGENTS.md serves this same purpose as a manufacturer-independent open format read by various coding agents, while CLAUDE.md is the proprietary file of Claude Code.
- Rendszerprompt – The system prompt is set by the application creator in the background, while you write and edit the CLAUDE.md file in your own project.
- README – The README introduces the project to humans, while CLAUDE.md is a work instruction for the agent.
Related concepts
Context engineering, AI-agent, Agent memory
–
AGENTS.md, Rendszerprompt, Claude Code, Kontextusablak, Agent skill
A brief history
CLAUDE.md appeared with Anthropic's Claude Code coding agent, which the company introduced in February 2025. Similar project-level instruction files existed in other tools before or alongside it (such as Cursor's rule files), and in summer 2025 the vendor-agnostic AGENTS.md format also emerged.
Where things stand
As of late 2026, Claude Code is considered a standard tool among developers who use it, and it is found in the folders of many open-source projects. Outside the developer community it is still little known, and a growing number of other tools also support the shared AGENTS.md format.
Also known as
CLAUDE.md · claude.md · Claude.md file · Claude memory file · project memory · agent instruction file · agent instruction file · Claude Code memory file
Sources
- Anthropic – Claude Code documentation: Manage Claude's memory
- Anthropic Engineering – Claude Code: Best practices for agentic coding
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.