TL;DR: CLAUDE.md is a plain text file Claude Code reads at the start of every session. Without it, Claude forgets your brand, your rules, and your context the moment the conversation ends. With it, you never repeat yourself. This guide explains exactly what to put in it and includes a ready-to-copy template for marketers.
Why Does Claude Keep Forgetting Everything?
If you have used Claude Code for more than a few sessions, you have already hit this wall. You spend 10 minutes explaining your brand voice, your project structure, your naming conventions. The next session: blank slate. You explain it again. Same thing happens. Again.
This is not a bug. It is how large language models work. Claude has no persistent memory between sessions by default. Everything it knew last time is gone. The context window resets, and you start from zero.
Andrej Karpathy, former Director of AI at Tesla and one of the most-followed AI researchers in the world, published 4 rules for working effectively with AI coding tools. Rule 1 is: give the model persistent context. Without a system-level instruction file, you are doing the same onboarding every single session. That compounds into a significant amount of wasted time across weeks of use.
CLAUDE.md is the fix. It is a plain markdown file that Claude Code automatically reads at the start of every session. Everything in it becomes permanent context. Your brand, your rules, your project layout, your tone guidelines, your inviolable safety rules. You write it once, and Claude carries it forward indefinitely.
What Is CLAUDE.md and Where Does It Live?
CLAUDE.md is a special file that Claude Code looks for automatically in three locations, in order of priority:
- Project root — loaded whenever you open that specific project
- ~/.claude/CLAUDE.md — your global file, loaded in every single session regardless of project
- Subdirectory — loaded when Claude is working inside that specific folder
The global file is the most powerful one for marketers. Everything you put there applies universally. Your personal brand rules, your tone preferences, your safety guardrails, your tool stack. It loads automatically without you doing anything.
As of May 2026, the Claude Code GitHub repository has over 109,000 stars, making it one of the fastest-growing developer tools on GitHub. Despite that adoption, the vast majority of marketers using Claude Code have never created a CLAUDE.md file. Most do not know it exists. The ones who do know about it have a significant productivity edge.
What Should Go in Your Global CLAUDE.md?
The global CLAUDE.md should contain anything that is true about you and your work regardless of which project you are in. Think of it as onboarding Claude into your world. Five categories that belong there:
1. Who You Are
Give Claude your role, your industry, your audience, and your goals. Not a bio — context. Claude should understand whether you are a solo founder, an agency operator, a growth marketer at a startup, or a content creator. This shapes every response it gives you, from how technical it goes to what kind of examples it reaches for.
2. Your Tone and Voice Rules
This is where most marketers would get the most immediate value. List your non-negotiable voice rules. Australian English or American English. No em dashes or yes em dashes. First person or second person. Short paragraphs or long-form. No corporate buzzwords. Every rule you list here means Claude stops violating it from session one, forever.
3. Safety Rules
If there are actions Claude should never take without explicit approval, list them here. Never push to git remotes. Never deploy to production. Never delete files without confirmation. These are not hypothetical. They prevent costly mistakes when Claude is running autonomously on a task and makes a judgment call you did not want it to make.
4. Tool Preferences
Tell Claude which tools you prefer and how you want it to use them. Prefer VS Code over terminal. Always use npm not yarn. Never create new files when editing an existing one would do. These small preferences eliminate a constant low-level friction across hundreds of interactions.
5. Pointers to Key Files
Your global CLAUDE.md does not need to contain everything. It can point to other files. "Read ~/Documents/Projects/brand.md for full brand context." Claude will follow those pointers. This keeps the global file lean while giving Claude access to as much context as you want to provide.
What Should Go in a Project-Level CLAUDE.md?
Project-level CLAUDE.md files sit in the root of a specific repo or folder. They load on top of your global file. Use them for scope restriction and project-specific rules.
Scope restriction is the most important use case. If you are using Claude to work on a specific website, you may want to prevent it from touching certain files. A project CLAUDE.md can explicitly list which files Claude is allowed to edit. This is not paranoia. When you run a background agent task, Claude will make judgment calls. Telling it exactly which files are in scope prevents those judgment calls from going wrong.
Project-level content that belongs here:
- Which files can and cannot be modified
- The tech stack and any version-specific notes
- Naming conventions specific to this codebase
- Which commands to run for builds, tests, and deploys
- Current project status and what is in progress
Ready-to-Copy CLAUDE.md Template for Marketers
This is a working template. Replace everything in brackets with your actual information. Drop it at ~/.claude/CLAUDE.md and it will load every session.
# Global Claude Configuration — [Your Name]
## Who You Are
- Name: [Your Name]
- Role: [e.g. Growth Marketing Manager / Solo Founder / Content Creator]
- Business: [Business name and one-line description]
- Audience: [Who you are creating content and doing work for]
- Goals: [Primary goal for using Claude — e.g. produce more content faster, manage a site, run research]
## Voice and Tone Rules
- [Australian / American / British] English
- Direct, clear, human tone — no corporate buzzwords
- No em dashes — use commas or rephrase
- Short paragraphs — max 3 sentences each
- Every performance claim needs a number attached
- No flattery, no unnecessary preamble, no filler phrases like "great question"
## Safety Rules (Inviolable)
- Never push to any git remote without my explicit approval
- Never deploy or rebuild production without my explicit approval
- Never delete files or data unless I explicitly ask
- Never merge to main without my approval
- Never send emails, messages, or post to external services without my approval
## Tool Preferences
- Prefer editing existing files over creating new ones
- Never create documentation files unless I ask for them
- Prefer direct file access over wrapping everything in scripts
- When running shell commands, use absolute paths
## Project Context
Read [~/path/to/your/brand-file.md] for full brand voice and content rules.
Read [~/path/to/your/projects-file.md] for active project status.
## Language
The user may write in [language]. Always respond in the language the user used.
All code, comments, file names, and documents must be in English.
This template is intentionally lean. Add sections as you identify recurring instructions you find yourself repeating. Every time you catch yourself re-explaining something to Claude, that thing belongs in CLAUDE.md.
The One Mistake Marketers Make With CLAUDE.md
The most common mistake is writing what you want Claude to do rather than what you want it to know. CLAUDE.md is context, not a task list. Do not write "help me with marketing." Write "I am a growth marketer at a B2B SaaS company targeting mid-market revenue operations teams."
The more specific and factual you are, the better Claude performs. Vague preferences produce vague output. Specific constraints produce consistent, branded output.
A second common mistake is treating CLAUDE.md as set-and-forget. It should evolve as your work evolves. When you start a new project, add a pointer. When you identify a pattern in Claude's mistakes, add a rule. When your brand voice shifts, update the tone section. Treat it like a living document, not a one-time configuration.
How CLAUDE.md Connects to Agents and Automation
If you are moving toward running Claude agents autonomously (background tasks, scheduled research, automated content pipelines), CLAUDE.md becomes even more critical. Agents make decisions independently. Without persistent context, they make those decisions with no understanding of your brand, your constraints, or your preferences.
Agents also inherit CLAUDE.md. A background agent writing a blog post for your site will follow your voice rules. A research agent will respect your language preferences. Your safety rules apply to agent actions too, which means the guardrails you write in CLAUDE.md protect you even when you are not watching.
For the complete setup guide covering Claude Code installation and first-use for non-technical marketers, start with the foundational walkthrough. For a broader picture of what Claude Code can do across a full marketing workflow, the complete guide for marketers covers every major use case.
Frequently Asked Questions
What is CLAUDE.md?
CLAUDE.md is a plain markdown file that Claude Code automatically reads at the start of every session. It gives Claude persistent context about who you are, your tone preferences, your safety rules, and your project structure so you do not have to re-explain these things every session.
Where should I put my CLAUDE.md file?
Your global file goes at ~/.claude/CLAUDE.md and loads in every session. Project-specific files go in the root of each project folder and load when you are working inside that project. Both can be used together.
Does CLAUDE.md work with the Claude web app?
No. CLAUDE.md is specific to Claude Code (the CLI tool). The Claude web interface at claude.ai does not read CLAUDE.md files. It is a Claude Code feature only.
How long can my CLAUDE.md be?
There is no hard limit, but longer files consume more of Claude's context window at the start of each session. A practical global file is usually between 200 and 800 words. Use pointers to external files rather than embedding everything directly in CLAUDE.md.
Will CLAUDE.md instructions override what I ask Claude in the session?
In-session instructions take priority over CLAUDE.md for that specific task. If your CLAUDE.md says "no em dashes" but you ask Claude to "write a dramatic headline with em dashes", it will follow your in-session instruction. CLAUDE.md sets defaults, not hard locks, except for explicitly inviolable safety rules.
Can I have different CLAUDE.md files for different clients?
Yes. Put a CLAUDE.md in each client project folder. It loads on top of your global file and adds project-specific context. You can use this to set a completely different tone, restrict which files Claude can touch, and point to that client's brand documentation.
Does CLAUDE.md affect Claude agents running in the background?
Yes. Agents inherit the CLAUDE.md files in scope for the project they are running in. Your safety rules, voice guidelines, and scope restrictions apply to agent actions, not just interactive sessions. This is one of the most important reasons to have a well-written CLAUDE.md before you start running autonomous agents.


