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.

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: docs.claude.com · as of June 2026)

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 (docs.claude.com). This site is not an official Anthropic site.

Keep reading

Have a question or want to share how you use Claude?

Join the community to share tips with other users, or explore more guides.