Copy-Paste CLAUDE.md Templates for 8 Project Types

David IyaDavid Iya June 26, 2026 9 min read
Architectural blueprints spread across a desk, representing reusable project templates
Photo via Pexels

What a CLAUDE.md template is and why it matters

A CLAUDE.md template is the instruction file you drop in the root of your project so Claude Code knows how your project works before it touches a single line. Claude Code reads CLAUDE.md at the start of every session. That makes it the memory and the house rules for the agent, and the single highest-leverage file you will ever write for a build.

I treat it like the brief I would hand a new contractor on day one. Without it, the agent guesses your stack, your naming, and your commands, and it guesses differently every session. With it, the agent shows up already knowing the project. The same prompt gets you a far better result, and you stop repeating yourself.

The CCC project-brief skeleton: anatomy of a great CLAUDE.md

Every strong CLAUDE.md follows the same five-part shape. We call it the CCC project-brief skeleton, and once you can see the five parts you can write one for any project in a couple of minutes. Each part answers a question the agent would otherwise have to guess.

  1. Project overview: one or two sentences on what this project is and who it is for. This anchors every decision the agent makes.
  2. Stack: the languages, frameworks, and key libraries in play, so the agent writes code that fits instead of importing something you do not use.
  3. Conventions: how you name things, structure folders, and format code, so output matches the rest of the repo.
  4. Commands: the exact commands to install, run, test, build, and deploy, so the agent can verify its own work.
  5. Do / don't rules: the short list of hard lines - what to always do and what to never touch.

Templates 1-4: web app, API, data/ML, mobile

Here are the first four CLAUDE.md templates. Each follows the CCC project-brief skeleton. Open Claude Code in the desktop app, create a CLAUDE.md in your project root, paste the one that fits, and swap the generic details for your real ones.

1) Web app: '# Project. A web app for [users] to [job]. Stack: React + TypeScript on the front end, Node on the back end, Postgres for data. Conventions: function components, hooks over classes, colocate tests next to source. Commands: npm install, npm run dev, npm test, npm run build. Do: keep components small and typed. Don't: add a new dependency without flagging it; never commit secrets.'

2) REST/GraphQL API: '# Project. A REST API serving [clients]. Stack: Node + Express, Postgres via an ORM, JWT auth. Conventions: one route file per resource, validate every input, return typed error shapes. Commands: npm install, npm run dev, npm test, npm run migrate. Do: write a test for every new endpoint. Don't: log secrets or tokens; never ship an endpoint without auth and rate limiting.'

3) Data/ML project: '# Project. A pipeline that [trains/scores] on [data]. Stack: Python, pandas, scikit-learn, notebooks for exploration and scripts for production. Conventions: raw data is read-only, every transform is a pure function, fix the random seed. Commands: pip install -r requirements.txt, python train.py, pytest. Do: log metrics for every run. Don't: edit files in data/raw; never commit datasets or model weights.'

4) Mobile app: '# Project. A mobile app for [platform] that [job]. Stack: React Native + TypeScript, REST API back end. Conventions: screens in /screens, shared UI in /components, no business logic in views. Commands: npm install, npm run ios, npm run android, npm test. Do: handle offline and loading states. Don't: hardcode API URLs; never block the main thread.'

Templates 5-8: landing site, automation, library, agency repo

Here are the last four CLAUDE.md templates, covering the project types most builders and agencies actually ship. Same skeleton, same paste-and-edit move.

5) Marketing/landing site: '# Project. A landing site for [product] built to convert. Stack: static site generator, plain CSS or Tailwind, deployed to a CDN. Conventions: one section per component, copy lives in content files, keep it fast. Commands: npm install, npm run dev, npm run build. Do: keep Lighthouse green and images optimized. Don't: add heavy JS for effects; never break the mobile layout.'

6) Automation + scripts: '# Project. A set of scripts that automate [task]. Stack: Python or Node, run on a schedule. Conventions: one script does one job, config in env vars, every script is idempotent. Commands: pip install -r requirements.txt, python run.py. Do: log what ran and what changed; make every run safe to repeat. Don't: hardcode credentials; never delete data without a dry-run flag.'

7) Open-source library: '# Project. A library that [does X] for other developers. Stack: TypeScript, zero runtime dependencies where possible. Conventions: semantic versioning, public API documented, breaking changes flagged. Commands: npm install, npm test, npm run build, npm run lint. Do: write a test for every public function and update the changelog. Don't: change the public API without a major version bump.'

8) Agency client repo: '# Project. Client work for [client]. Stack: [their stack, not ours]. Conventions: match the client's existing style exactly, branch per task, descriptive commits. Commands: [their install/run/test/deploy]. Do: ask before introducing a new tool; keep the handoff clean and documented. Don't: refactor outside the ticket; never push to main or deploy without sign-off.'

How CLAUDE.md fits the way Claude Code actually works

CLAUDE.md earns its keep because of how Claude Code runs. The agent works in a loop - it gathers context, acts, then verifies. CLAUDE.md is the context it gathers first, every single time, and the Commands section gives it the way to verify its own work. A good CLAUDE.md makes both ends of that loop sharper.

If you want to see that cycle in detail, read [what are agent loops in Claude Code](/blog/claude-code-agent-loops). For the broader habits that separate fast builders from frustrated ones, [how to use Claude Code like a pro](/blog/how-to-use-claude-code-like-a-pro) is the next step.

What each CLAUDE.md section does for the agent

SectionWhat it gives the agent
OverviewThe why, so its choices serve the project
StackThe tools to use, so it does not invent new ones
ConventionsThe style to match, so output fits the repo
CommandsA way to run and verify its own work
Do / don'tThe hard lines that stop repeat mistakes

How to keep your CLAUDE.md current

A CLAUDE.md is a living file, not a one-time setup. The fastest way to rot one is to write it on day one and never touch it again. Treat it like the project's running memory and it keeps paying off.

  • When the agent makes the same mistake twice, add a do/don't line that prevents it. That is the highest-value edit you can make.
  • When you change a command, a framework, or a folder structure, update CLAUDE.md in the same commit.
  • Keep it tight. If a section is no longer true or no longer changes the output, delete it.
  • Ask Claude Code to update its own CLAUDE.md after a big change - it knows what shifted and can draft the edit for you to approve.

Skipping the file entirely is one of the most common beginner errors, and it is covered in [Claude Code mistakes beginners make](/blog/claude-code-mistakes-beginners-make). A stale or missing CLAUDE.md is why two people get wildly different results from the same prompt.

Frequently asked questions

What is a CLAUDE.md template?

A CLAUDE.md template is a starter instruction file you place in the root of your project. Claude Code reads it at the start of every session, so it tells the agent your project overview, stack, conventions, commands, and hard rules before it does any work. It is the highest-leverage file in a Claude Code project.

Where do I put the CLAUDE.md file?

Put CLAUDE.md in the root of your repository. Claude Code reads it automatically when it starts a session in that folder, so the agent shows up already knowing how your project works.

What should a good CLAUDE.md include?

Follow the CCC project-brief skeleton: a one-line project overview, the stack, your conventions, the exact commands to install and test and build, and a short do/don't list. Keep it to about a page so the agent reads it cleanly every time.

How long should a CLAUDE.md be?

Short. Aim for roughly one page. The agent reads CLAUDE.md every session, so a tight file beats a long one. If a line does not change the agent's output, cut it.

Do I need a different CLAUDE.md for each project type?

Yes, tailor it. A web app, an API, a data project, and an agency client repo each need different stack, commands, and rules. Start from the matching template above, then swap the generic details for your real ones.

How do I keep my CLAUDE.md from going stale?

Update it in the same commit whenever you change a command, framework, or folder structure, and add a do/don't line every time the agent repeats a mistake. You can also ask Claude Code to draft the update for you after a big change.

Last reviewed by David Iya on June 26, 2026

David Iya

Written by

David Iya

Forbes 30 Under 30 · Y Combinator

Keep reading

Ready to build it yourself?

Join Claude Code Club, the #1 community for learning claude code, for $9/month.

← Back to the blog