Claude Code in a Minute · beginner

Claude Code in a Minute: CLAUDE.md

CLAUDE.md is a project instruction file Claude Code reads so it follows your repo’s conventions without being reminded every session.

Last verified: 2026-09-06

In one sentence

CLAUDE.md is a markdown file in your repository that gives Claude Code durable project instructions.

Why it matters

Coding agents do not automatically know your stack, test commands, or review standards. Without written project rules, every session starts from guesses. That produces inconsistent commits, wrong tooling choices, and repeated corrections.

How it works

Place a CLAUDE.md at the repository root (or in a relevant package) and keep it short enough to stay useful. Typical contents:

  • build, lint, and test commands;
  • architecture boundaries;
  • naming and formatting rules;
  • files or directories the agent should avoid;
  • how you want commits and pull requests described.

Claude Code treats this as project context when it works in the repo. Prefer concrete rules over slogans. “Run npm test before claiming done” beats “write high-quality code.”

Update the file when process changes. Stale instructions are worse than missing ones.

Example

# Project notes for Claude

## Commands
- Install: `npm ci`
- Test: `npm test`
- Lint: `npm run lint`

## Rules
- Do not edit generated files under `out/`.
- Prefer App Router pages under `app/`.
- Keep marketing copy restrained; no unsupported product claims.

Agentic coding use

Persistent instructions move tribal knowledge out of chat and into the repo. That makes agent work reviewable by humans and reusable across sessions, machines, and teammates. It is the cheapest form of context engineering for Claude Code.

Watch out

A long CLAUDE.md that restates the entire architecture will drown the agent in noise. Keep it operational. Put deep design docs elsewhere and link to them only when needed.

Sources