CLAUDE.md examples. Four templates to copy, including one for a folder with no code
Ready CLAUDE.md files for a company website, a Laravel and Vue app, a folder of quotes and your personal settings. Plus rules in .claude/rules, imports and CLAUDE.local.md.
Part of the guideClaude Code, the complete guide. From installation to your own skills and plugins
In this article
In short
This page has four ready CLAUDE.md templates, for a company website, a Laravel and Vue app, a folder of quotes and your personal settings. It also shows a rule in the .claude/rules folder, an import with the @ sign and a CLAUDE.local.md file, all checked against the Anthropic docs.
A developer types /init and gets a first CLAUDE.md. It is long, it describes things Claude can see in the code anyway, and it misses the one sentence that would stop Claude repeating the same mistake every week. Starting from a ready CLAUDE.md example and cutting it down is easier.
What the file is and why it does not block anything is covered in our separate post about CLAUDE.md. Here you only get templates. Each one is far shorter than 200 lines, which the Anthropic documentation gives as the upper limit for one file. This page is part of our Claude Code guide, and every path was checked in the docs as of 10 November 2026.
Where each file goes
Claude Code reads several instruction files and joins them into one context. Nothing overrides anything. A file closer to the folder where you started Claude Code lands later in the context.
| File | Where it lives | Who sees it |
|---|---|---|
CLAUDE.md or .claude/CLAUDE.md | Project root | The whole team through the repository |
CLAUDE.local.md | Project root, added to .gitignore | Only you, in this project |
~/.claude/CLAUDE.md | Your home folder | Only you, in every project |
.claude/rules/*.md | Project folder | The team, always or for matching files |
After saving a file, run /context all in a session and look at the Memory files list. If the file is there, Claude loaded it.
CLAUDE.md example for a company website
A small Astro site with content in Markdown. The file tells Claude how to build the site and what to leave alone. It does not describe the business, because Claude will read that in the content itself.
# Nowak Renovations website
Static site built with Astro. Content in Markdown in `src/content/`.
## Commands
- `npm run dev` starts a local preview
- `npm run build` builds the site into `dist/`
- Before you hand over changes, run `npm run build` and check for errors
## Rules
- Customer-facing text in plain English, short sentences
- Take phone, address and opening hours from `src/data/company.json`, never hard-code them
- Save new images as WebP in `public/img/`, each with alt text
- Do not change the URLs of existing pages, Google already knows them
## Ask before touching
- `public/robots.txt`
- `src/data/company.json`The line about URLs does the most work here. Claude likes to tidy up file names, and on a company website renaming a file changes an address Google already has.
Example for a Laravel and Vue app
A bigger project with backend and frontend in separate folders. The main file holds commands and architecture rules. Rules for writing components go into a separate rule file.
# Order panel
Laravel in `backend/`, Vue 3 with TypeScript in `frontend/`. MySQL database.
## Commands
- `php artisan test` in `backend/` runs the PHP tests
- `npm run test` in `frontend/` runs the frontend tests
- `npm run lint` in `frontend/` checks style, run it before every commit
- `php artisan migrate` only against the local database
## Architecture
- Business logic in `backend/app/Services/`, controllers only take and return data
- Every database change goes through a new migration, never edit an old one
- Interface text in `frontend/src/i18n/`, in Polish and English
## Git
- One branch per task, named `feature/short-description`
API notes in @docs/api.mdThe last line is an import. Claude Code loads docs/api.md together with this file. An import keeps the file tidy, but it does not save context, because the imported file also loads at startup.
Rules for one part of the project are better kept in .claude/rules/. A rule with a paths field loads only when Claude reads or edits a matching file.
---
paths:
- "frontend/src/**/*.{ts,vue}"
---
# Frontend
- Components use the Composition API with `<script setup lang="ts">`
- Ask before adding any new library
- Colours only from variables in `frontend/src/styles/tokens.css`paths is the only field Claude Code reads from a rule's header. A rule without paths loads at startup, the same as CLAUDE.md.
Example for a folder with no code
Claude Code works on files, and they do not have to be code. A folder of quotes written in Markdown can have its own CLAUDE.md too. If nobody in the office uses a terminal, similar work can be done in Cowork, which we describe in Claude Cowork in practice.
# Client quotes
The company's quotes folder. No code.
## How we work
- A new quote is a copy of `templates/quote.md` saved in `quotes/2026/`
- File name is the date and the client, for example `2026-11-10-golden-bakery.md`
- Take company details from `data/company.md`
- Never invent prices. If a price is missing, write TO BE FILLED IN
- Keep it short and polite
## Never
- Do not delete or overwrite files in `quotes/`, only create new onesThe Never section is still a request. A real block is set with a rule in Claude Code permissions or with a hook that rejects edits to chosen files.
Personal file and CLAUDE.local.md
The file in your home folder applies to every project. It is the place for your own habits, not team rules.
# My rules
- Answer in English, write code comments and commits in English
- Before a larger change, show the plan and wait for my approval
- Do not install packages globallyCLAUDE.local.md in the project root holds notes only for you. Claude Code reads it right after the CLAUDE.md in the same folder. Add it to .gitignore so it never reaches the repository.
# Only on my machine
- The local copy runs at `http://localhost:8000`
- The test account is `test@example.com`, the password is in the password managerIf you work in several worktrees of the same repository, CLAUDE.local.md exists only in the one where you created it. The docs suggest importing a file from your home folder instead, for example @~/.claude/my-project.md. The first time Claude Code meets an import from outside the project folder, it asks for your approval.
Imports, comments and a file review
An import is a path after the @ sign. A relative path is resolved from the file that contains the import, not from the folder where you started Claude Code. An imported file can import others, up to four hops deep. A path written as code, inside backticks, is not imported.
If the repository already has an AGENTS.md for other tools, the simplest CLAUDE.md starts with the line @AGENTS.md and holds only Claude-specific rules below it. More on that in our post on AGENTS.md and CLAUDE.md.
Block HTML comments in CLAUDE.md are stripped before the content reaches the model. You can leave notes for people there without spending context on them.
As the files grow, /doctor prompt-audit helps. Claude looks for instructions that are outdated, point to files that do not exist or contradict each other, and proposes edits. Nothing changes until you ask it to apply them. The command needs Claude Code version 2.1.283 or later.
Copy one template, delete everything Claude can learn from the code itself, and add one sentence each time the same mistake comes back a second time. If you want to know where AI could take repetitive work off your team, ask for our free AI audit.
What would you like to change in your business?
Leave your number. We will talk about your process and see whether we can help. The first call is free.
The service this text is about
Automation and AI / OCRAutomation of document re-typing, OCR and checking rules, and your data stays with you.