Skip to main content

CLAUDE.md examples by project type — ready to paste

Complete, ready-to-paste CLAUDE.md examples by project type — web app, data/ML, docs, and monorepo. Templates to copy, not just how-to.

ByUpdated

If how to write CLAUDE.md covers "what and how to write," this post is a set of ready-to-paste, complete examples by project type. Don't leave them as-is — always adapt them to your own project. (Official memory docs: code.claude.com/docs · re-checked September 2026)

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.

Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (

🟢 Model references match the current lineup · Claude Opus 5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
0/M input, $50/M output tokens). The one-time
🟢 Model references match the current lineup · Claude Opus 5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
00 credit applied only to the Fable 5 transition and is not offered for 5.1. Some coding and debugging requests may be answered by an Opus model due to a security classifier (both models). See the Fable 5.1 guide and the Fable 5 availability guide for details.

What to include, by typeWeb appstack, component rulesdev/build commandsData / MLdata paths, reproducibilityexperiment rulesDocs / contentstyle, terminologydo/don\u2019t wordingMonoreposhared rules at root, specifics in each subfolderExamples only — keep just project-specific rules, concise · as of 2026.6

Before you use these

  • Only what's unique — instead of generic advice like "write clean code," capture rules specific to this project.
  • Keep it concise — longer files consume more context and can reduce adherence (the official docs warn against overly long files).
  • Replace placeholders — every <...> below is a placeholder.

Web app project

# Project: <name>

## Overview
- Stack: <e.g. Next.js, TypeScript, Tailwind>
- Structure: <key directories>

## Rules
- Components: <e.g. functional + explicit prop types>
- State: <e.g. prefer server components, minimal global state>

## Commands
- Dev: <actual dev command>
- Build/test: <actual commands>

## Watch out
- Secrets via env vars only; never in code/commits
- <project-specific pitfall>

Data / ML project

# Project: <name>

## Overview
- Goal: <what you analyze/train>
- Data location: <path or store>

## Rules
- Reproducibility: fix seeds, pin env/versions
- Experiment logging: <where and how>
- Never commit large/sensitive data

## Commands
- Setup: <actual command>
- Train/eval: <actual command>

Docs / content project

# Project: <name>

## Style
- Tone: <e.g. friendly, polite>
- Length/format: <e.g. 2-3 sentence paragraphs, minimal bullets>

## Terminology
- Always: <e.g. "user" (yes) / "u" (no)>
- Avoid: <e.g. overstated/absolute claims>

## Process
- Pre-publish checks: <checklist>
How it loads in a monorepoRoot CLAUDE.md (ancestor)always loaded at startupSubfolder CLAUDE.mdloads when you touch that folder (lazy)Sibling CLAUDE.mdnot loaded if unrelated to your work→ shared at root, specifics in subfolders = cleaner contextLoading behavior may vary by version · as of 2026.6

Monorepo: root + subfolders

In a monorepo, put shared rules at the root and component-specific rules in subfolders. Per the official docs, Claude Code loads all CLAUDE.md files walking up from your location (ancestors) at startup, loads a subfolder's CLAUDE.md when you work with files there (lazy), and does not load sibling folders' files unrelated to your work.

monorepo/
├── CLAUDE.md          # shared (coding standards, commit rules) — always loaded
├── frontend/
│   └── CLAUDE.md      # frontend-only — loads when working in frontend
└── backend/
    └── CLAUDE.md      # backend-only — loads when working in backend

Refining further

To avoid duplication, import existing docs with @path (e.g. @README.md). Imported files also load at startup, so keep only what every session truly needs. The location hierarchy (project ./CLAUDE.md, user ~/.claude/CLAUDE.md, etc.) and mechanics are covered in how to write CLAUDE.md and the complete CLAUDE.md guide.

New to Claude Code itself? See what Claude Code is and how to use it.

These examples are only a starting point and must be adapted to your project. Loading behavior, locations, and syntax may change, so verify against the official docs (code.claude.com/docs). This site is not an official Anthropic site.

New here?: What Is CLAUDE.md? (beginner)

Was this helpful?

Keep reading