The foundation
Every project: a tidy CLAUDE.md, careful coding habits, and Claude calling you by name. Every starter kit installs it. Here is how to get the most from it, how to write the file Claude reads every time, and a prompt that sets it up in any project, new or existing, whatever you are building.
How to use it
- 01
Claude calls you by name
When: Every reply.
When it stops, the conversation has grown too long to keep track of: start a fresh one with
/clear. A rule of thumb, not a guarantee. - 02
Careful coding habits
When: Designed to switch on by themselves whenever Claude writes or changes code.
You'll see Claude state its assumptions, ask when something is unclear, keep changes small and say how you'll know it works. For a tiny change, say "this is a quick one, just do it".
- 03
/revise-claude-mdWhen: At the end of a session where you corrected Claude twice, explained something about the project, or found a command it didn't know.
It reviews the session, shows the lines it wants to add to
CLAUDE.md, and asks before saving any of them. - 04
"Audit my CLAUDE.md"
When: Every few weeks, or after a big change to the project.
It checks
CLAUDE.mdagainst the code as it is now, scores it, and proposes cuts and fixes. Nothing changes until you say yes.
Your CLAUDE.md
CLAUDE.md is a file in your project that Claude reads at the start of every conversation. It is the place for what you would otherwise re-explain. Every line costs attention, so the test for each one is: would removing this cause a mistake? If not, cut it.
Put in
- The exact commands to run, build and check the project
- Rules that differ from the usual defaults
- How you test, and the command for it
- Branch and commit habits
- Decisions specific to this project
- Setup quirks, like a required environment variable
- Gotchas you cannot see from the code
Leave out
- Anything Claude can work out by reading the code
- Standard conventions it already knows
- Long explanations, tutorials and full API docs (link to them instead)
- File-by-file descriptions
- Anything that changes often
- Vague advice like "write clean code"
Write rules Claude can check
- Instead of Test your changes write Run
npm testbefore committing - Instead of Keep files organised write API handlers live in
src/api/ - Instead of Format code properly write Use 2-space indentation
Add a line when
- Claude makes the same mistake a second time
- You type the same correction you typed last session
- A review catches something Claude should have known
- Someone new would need the same context
How long
Start under 40 lines; Anthropic suggests staying under 200. If Claude keeps ignoring a rule, the file is probably too long and the rule is getting lost. Mark one rule IMPORTANT if it keeps being skipped; if you mark many, none stands out. Type /context to see that it loaded, and /doctor prompt-audit to find stale or conflicting instructions.
An example for a new project
Call me Sam in every reply. # Project A booking site for my yoga classes. Next.js, deployed on Vercel. # Commands - Run: `npm run dev` - Check: `npm run build && npm test` (run before saying anything is done) # Rules - Prices come from `lib/prices.ts`; never hard-code one. - Ask before adding a dependency. # Gotchas - Booking emails only send when `RESEND_API_KEY` is set; locally they print to the console.
What goes where
- 01
CLAUDE.mdRules for this project, shared through git.
- 02
CLAUDE.local.mdYour own notes for this project. Add it to
.gitignore. - 03
~/.claude/CLAUDE.mdYour preferences for every project on this computer.
- 04
.claude/rules/Rules for one part of the code, loaded only when Claude works there.
- 05
A skill
A step-by-step procedure you only need sometimes.
- 06
A hook
Anything that must happen every time, no exceptions.
CLAUDE.mdis advice; a hook is enforced.
From Anthropic's guide to how Claude remembers your project.
Set up the foundation on its own
For a project no starter kit fits, or one you already have. Paste it into Claude Code in the project folder. It asks before installing anything and shows you any change to files you already have.
You are setting up the Vishwaclaudema foundation in this folder: version history, keys kept out of commits, a short `CLAUDE.md`, a check you can run, and two tools that keep Claude careful and `CLAUDE.md` current. It works for an empty folder or an existing project, whatever is being built. Work through the steps in order and explain each in a sentence of plain English, with no jargon. Ask before anything that installs software or changes files outside this folder. Where the project already has something a step sets up, show me what you would change and wait for my OK; never remove anything without showing me first.
1. **Check this computer.** Run `git --version`. If git is missing, tell me how to install it and wait.
2. **Understand the project.** Ask me my first name. Then, if the folder is empty, ask in one question what I want to build and who it is for, and wait for my answer. If there is code, read it and tell me in two sentences what it is and how it runs, and if the code doesn't say who it is for, ask me.
3. **Version history.** If this is not a git repository, run `git init` and explain that it lets us undo any change. If there are uncommitted changes, ask me what to do with them first. Check `git config user.name` and `git config user.email`; if either is empty, ask me for both and set them for this project only (no `--global`).
4. **Keep secrets out.** Make sure `.gitignore` covers `.env` and `.env.*` (but keeps `.env.example`), `CLAUDE.local.md`, and the project's dependency and build folders (add these common ones now: `node_modules/`, `.venv/`, `dist/`, `build/`; add any others when the first code lands). Make sure `.claude/settings.json` denies reading them, under `"permissions"`: `"deny": ["Read(./.env)", "Read(./.env.*)", "Read(./**/.env)", "Read(./**/.env.*)"]`. Add to these files rather than replacing them. If a key or password is already in the code or the git history, tell me to rotate it, because deleting it does not remove it from history.
5. **Write `CLAUDE.md`**, or improve the one that is there. Claude reads it at the start of every conversation, so every line costs attention: keep only what Claude would get wrong without it.
- First line: "Call me <my first name> in every reply."
- Then, in short sections: what the project is and who it is for (one or two lines); the exact commands to run, build and check it; rules that differ from the usual defaults; and gotchas you cannot see from the code.
- Leave out anything you can work out by reading the code, standard conventions, long explanations, file-by-file descriptions and anything that changes often.
- Write each rule so it can be checked: "Run `npm test` before committing", not "test your changes".
- Aim for under 40 lines. If a `CLAUDE.md` exists, show me what you would cut and add, with one line on why for each, and wait for my OK.
6. **A check you can run.** Find the one command that proves the project works: its tests, build or lint. If there is none, propose the simplest one this kind of project supports and ask before installing anything for it. If there is no code yet, write one exact planned command, for the setup you would recommend, in `CLAUDE.md` marked "set up when the first code lands, then allow it in `.claude/settings.json`", and do both then. Once it exists, put it in `CLAUDE.md`, allow it in `.claude/settings.json` (for example `"allow": ["Bash(npm test)"]`), and run it before saying anything is done.
7. **Install the tools**, switched on for this project only (the download itself is shared across your computer). First show me the list below and ask for one yes. Then run each line on its own, one after another, waiting for each to finish, never in parallel. Plugins install their current version.
- `claude plugin marketplace add https://github.com/multica-ai/andrej-karpathy-skills.git --scope project && claude plugin install andrej-karpathy-skills@karpathy-skills --scope project`: Coding habits from Andrej Karpathy: think before coding, keep changes small and simple, check your work.
- `claude plugin marketplace add https://github.com/anthropics/claude-plugins-official.git --scope project && claude plugin install claude-md-management@claude-plugins-official --scope project`: Keeps `CLAUDE.md` short and current, and saves what Claude learns each session.
If the first line says the `claude` command is not found (usual in the Claude desktop app), don't run the second or hunt for the command. Instead, with the same yes, add these entries to `.claude/settings.json`, keeping everything already there:
```json
{
"enabledPlugins": {
"andrej-karpathy-skills@karpathy-skills": true,
"claude-md-management@claude-plugins-official": true
},
"extraKnownMarketplaces": {
"karpathy-skills": {
"source": {
"source": "git",
"url": "https://github.com/multica-ai/andrej-karpathy-skills.git"
}
},
"claude-plugins-official": {
"source": {
"source": "git",
"url": "https://github.com/anthropics/claude-plugins-official.git"
}
}
}
}
```
Then, in step 9, tell me to start a new session in this folder, trust it if asked, and install each plugin from the **+** button → **Plugins** (or run the lines above in a terminal where Claude Code is installed). If Claude Code refuses a line for another reason, show me the line so I can run it myself. If a line fails, say why in one line and carry on. Never install anything that is not on this list.
8. **Commit** everything, including `.claude/settings.json`, with the message "Set up the Vishwaclaudema foundation". Never commit a `.env` file, `CLAUDE.local.md` or anything that looks like a key.
9. **Teach me to use it**, in at most twelve lines and in my project's terms:
- **My name:** you'll use it in every reply. When you stop using it, this conversation has grown too long to keep track of, so I should start a fresh one (`/clear`).
- **Careful habits** (the Karpathy skills): they are designed to switch on by themselves whenever you write or change code. I'll see you state your assumptions, ask when something is unclear, keep changes small and say how we'll know it works. For a tiny change, I can say "this is a quick one, just do it".
- **`/revise-claude-md`:** I type it at the end of a session where I corrected you twice, explained something about the project, or we found a command you didn't know. It shows the lines it wants to add and asks before saving.
- **"Audit my CLAUDE.md":** I ask this every few weeks or after a big change, to cut what is stale. It also asks before changing anything.
- **What goes where:** anything you must always do, no exceptions, belongs in a hook rather than `CLAUDE.md`; steps only needed sometimes belong in a skill; my personal notes go in `CLAUDE.local.md`, which stays out of git.
If a tool is switched on in settings but not installed yet, keep its line above but start it with "Once installed:", and tell me plainly how to finish installing it. Plugins switch on in the next session: tell me to start a new one (in a terminal, restart Claude Code) and check the two tools are listed under `/plugin` or the **+** button → **Plugins**. Finish with: "Tell me what you want to do first, and I'll plan it with you before writing any code."
How it was tested
A fresh Claude agent pasted the prompt into an empty or sample project and followed it to the letter, on a computer without Node.js. Tested in empty folders and on an existing project, where it cut a bloated CLAUDE.md from 21 to 15 lines without losing a fact. In the desktop app, where the claude command isn't available, it switches the plugins on in settings and tells you to install them from + → Plugins in a new session; that last click wasn't tested.
Did this prompt work? It worked · I got stuck Opens a public GitHub issue; never paste keys or personal details.
What it installs
- habit
Claude calls you by name
The setup asks your first name and tells Claude to use it in every reply. When it stops, the conversation has grown too long to keep track of: start a fresh one. A rule of thumb, not a guarantee.
- plugin
andrej-karpathy-skills ↗
Coding habits from Andrej Karpathy: think before coding, keep changes small and simple, check your work.
Safety-scanned 5 Oct 2026 at 2c60614 · reviewed: safePlain-English coding habits for Claude (think first, keep changes small and simple); nothing runs on your computer. No licence file, so we link to it rather than copy it.
Works in: Chat · Cowork · Claude Codeclaude plugin marketplace add https://github.com/multica-ai/andrej-karpathy-skills.git --scope project && claude plugin install andrej-karpathy-skills@karpathy-skills --scope project - plugin
claude-md-management ↗
Keeps
by AnthropicSafety-scanned 5 Oct 2026 at d182ca4 · scan cleanWorks in: Chat · Cowork · Claude CodeCLAUDE.mdshort and current, and saves what Claude learns each session.claude plugin marketplace add https://github.com/anthropics/claude-plugins-official.git --scope project && claude plugin install claude-md-management@claude-plugins-official --scope project