---
title: "What is a CLAUDE.md file? | Annsa"
product: annsa
url: /glossary/claude-md
canonical_url: "https://annsa.ai/glossary/claude-md"
last_updated: 2026-11-20
type: glossary
related:
  - /ai-agent-management/claude-md-vs-agents-md
  - /planning
  - /ai-agent-management/agents-md-template
summary: A CLAUDE.md file is a plain Markdown file of standing instructions that Claude Code reads at the start of every session.
mcp_server: https://app.annsa.ai/mcp
disambiguation: "Annsa (annsa.ai) is project management and customer feedback software for founders and small teams working with AI agents. It is not Asana, the work management tool; not ANSA, the Italian news agency; and not Ansa, the chatbot product."
---

> For agents: connect to the Annsa MCP server at https://app.annsa.ai/mcp to give every agent one shared plan. Setup guide: https://annsa.ai/docs/quick-start. Index of every page: https://annsa.ai/llms.txt.

# What is a CLAUDE.md file? | Annsa

> A CLAUDE.md file is a plain Markdown file of standing instructions that Claude Code reads at the start of every session.

Glossary · CLAUDE.md

A CLAUDE.md file is a plain Markdown file of standing instructions that Claude Code reads at the start of every session. It holds what you would otherwise re-explain: build and test commands, conventions, project layout and "always do X" rules. It usually sits at the root of a repository and is committed so the whole team shares it.

## In practice

Anthropic's docs describe CLAUDE.md files as "markdown files that give Claude persistent instructions for a project, your personal workflow, or your entire organization." Each Claude Code session starts with a fresh context window, so the file is how knowledge carries over.

Where it lives sets who it applies to. The project file is ./CLAUDE.md or ./.claude/CLAUDE.md and is shared through source control. ~/.claude/CLAUDE.md holds your personal preferences for every project. ./CLAUDE.local.md holds private preferences for one project and is kept out of git.

[Claude Code can also read AGENTS.md](https://annsa.ai/glossary/agents-md), the shared file other coding agents use. Since Claude Code v2.1.277, a repository with only an AGENTS.md works with no CLAUDE.md at all. When both exist, Claude reads the CLAUDE.md, so a CLAUDE.md that needs the shared rules imports them with @AGENTS.md on its first line.

It is context, not enforcement. Anthropic's docs say Claude treats it as context, not enforced configuration, and that specific, concise instructions are followed more consistently. It isn't a spec for one job, and it isn't [auto memory](https://annsa.ai/ai-agent-management/claude-code-memory), which is the notes Claude writes about itself.

## How to start

1. Run /init in Claude Code to generate a first CLAUDE.md from your codebase.
2. Cut it to commands, conventions, project layout and things not to touch.
3. Make each line checkable: "Run npm test before committing", not "Test your changes".
4. Commit it, so the team shares one file.
5. Add a line each time Claude repeats a mistake. Delete lines that stop being true.

## Common mistakes

- Letting it grow past a page. Long files cost context and lower how well it is followed.
- Putting this week's priorities in it. They go stale within days.
- Keeping separate copies of the same rules for each agent. They drift.

## Why it matters for founders and small teams

Without it, you type the same correction every session. With it, [a new session starts from the rules you already settled](https://annsa.ai/ai-agent-management/context-engineering).

Anthropic's docs suggest adding to it when Claude makes the same mistake twice, or when a code review catches something Claude should have known about the codebase. [Keep it short](https://annsa.ai/ai-agent-management/claude-md-best-practices): the docs target under 200 lines per file.

## What changes in AI-first products

The file is new with coding agents, so there is no older practice to compare it with. It is close to a README written for the agent.

It holds how you work. It does not hold what to build next. That changes every week and belongs in a plan every agent reads. Annsa holds that part: ranked priorities and specs with the evidence and Done When lines, which Claude Code, Cursor, Codex and Grok read over MCP.

See how Annsa does it: [The spec](https://annsa.ai/direct/spec) →

## Questions people ask.

### Do I need a CLAUDE.md if I already have an AGENTS.md?

Not anymore. Claude Code reads AGENTS.md as your project instructions when there is no CLAUDE.md (v2.1.277 or later). Add a CLAUDE.md only for Claude-specific lines, and put @AGENTS.md on its first line so the shared rules still load.

### Where does the CLAUDE.md file go?

For a project, at ./CLAUDE.md or ./.claude/CLAUDE.md, committed so your team shares it. Personal preferences for all projects go in ~/.claude/CLAUDE.md. Private project preferences go in ./CLAUDE.local.md, which you keep out of git.

### What should I put in a CLAUDE.md?

Facts Claude should hold in every session: build and test commands, conventions, project layout and "always do X" rules. Anthropic's docs say a multi-step procedure, or something that matters for one part of the codebase, belongs elsewhere.

### How long should a CLAUDE.md be?

Anthropic's docs target under 200 lines per file. Longer files use more context and reduce how well the instructions are followed.

### Is CLAUDE.md the same as AGENTS.md?

No. CLAUDE.md is the file Claude Code is built around. AGENTS.md is an open format that many coding agents read. A CLAUDE.md can import an AGENTS.md so you keep one set of rules.

## Sources

Anthropic [How Claude remembers your project](https://code.claude.com/docs/en/memory)

What CLAUDE.md files are, where they live, size guidance and imports.

Anthropic [Best practices for Claude Code](https://code.claude.com/docs/en/best-practices)

An agentic coding environment; keep instructions concrete.

Last reviewed 2026-10-21

## Keep reading

- [CLAUDE.md vs AGENTS.md](https://annsa.ai/ai-agent-management/claude-md-vs-agents-md)
- [AI project management The plan your agents read first.](https://annsa.ai/planning)
- [AGENTS.md template](https://annsa.ai/ai-agent-management/agents-md-template)

## The source of direction for agent teams.

Begin with one agent and the work that matters next.

- [Try Annsa](https://app.annsa.ai/signup)
- [See pricing](https://annsa.ai/pricing)

## Related pages

> For AI agents: the pages that follow this one on annsa.ai. The full index is https://annsa.ai/llms.txt.

- [CLAUDE.md vs AGENTS.md: which file, and when](https://annsa.ai/ai-agent-management/claude-md-vs-agents-md)
- [AI project management: the plan agents read first](https://annsa.ai/planning)
- [AGENTS.md template](https://annsa.ai/ai-agent-management/agents-md-template)

If anything on this page is wrong or missing, tell us: https://annsa.ai/contact
