Skip to content

Claude Code

CLAUDE.md: your project's memory for Claude Code

What Claude Code reads from CLAUDE.md every session, where to put it, what to write in it and what to leave out, with a short useful example whose every rule can be checked.

Talqeen wrote this article and no editor has reviewed it yet. Search engines do not see this page until it is reviewed.

Every new Claude Code session starts with no memory of the last one. What carries over is what you write in CLAUDE.md, which Claude Code reads at the start of every session: the onboarding note you would give a new colleague.

Where it goes

  • At the repository root: committed and shared with the team. The most important one.
  • In a subfolder such as apps/web/: read when Claude Code works there.
  • For you only: ~/.claude/CLAUDE.md, for preferences across all projects.

/init reads the repository and writes a first draft for you to review.

What to write

How the project is built and tested (the exact commands), where things live, the rules that are never broken, and conventions such as commit format and the default UI language.

What to leave out

What the code already says, generic advice like "write clean code", secrets, and long details: the file is read in full every session and every line takes context. Put long references elsewhere and point to them, or import them with an @path reference.

The test: can the rule be checked?

Weak: "care about security". Useful: "every new table enables RLS in the same migration, and pnpm audit:rls passes before every commit".

A short example

# Book shop

## Commands
- Run: `pnpm dev`
- Before every commit: `pnpm typecheck && pnpm lint && pnpm test`

## Layout
- Pages in `src/app/`, logic in `src/lib/`, migrations in `supabase/migrations/`.

## Rules never broken
- No API key in code or in a variable starting with NEXT_PUBLIC_.
- Every UI string goes through the translation files, Arabic first.

CLAUDE.md in the Talqeen kit

The kit's CLAUDE.md is written from your plan: destination, platforms, rules, and a "Working with Talqeen" section on the server, commands and agents, with the plan version and date in its header. It is yours to edit. Review it every two weeks: each note you keep repeating to Claude Code is a missing rule.