Write your CLAUDE.md
Write a global CLAUDE.md and a project-level CLAUDE.md for your vault, then verify that Claude Code uses them correctly.
Lesson outcome
You will have a working CLAUDE.md on your VPS (and optionally locally) that gives Claude Code persistent context about your business and operating environment.
Why this matters in an agency
This is where the compounding begins. After this lesson, every new Claude Code conversation starts with full context. Claude Code knows your agency name, your services, your file structure, your tools, and your operating preferences. That eliminates the repeated setup work and produces better output from the first message.
Inputs, tools, and prerequisites
Claude Code running on the VPS. Your vault with 20+ notes from Module 10. The report generator from Module 11. The CLAUDE.md template from the companion download.
Step-by-step walkthrough
Write the global CLAUDE.md
SSH into the VPS and start Claude Code:
```
ssh vps
claude
```
Ask Claude Code to create the global CLAUDE.md:
```
Create a CLAUDE.md file at ~/.claude/CLAUDE.md with the following content. I will dictate what goes in each section.
Business Context
I run [your agency name], a marketing agency specializing in [your services] for [your target market]. We have [number] active clients. Our primary tools are Claude Code, Obsidian (vault), and Bitwarden Secrets Manager.
File Structure
- Vault location: /root/vault/
- Vault folders: Business, Clients, Operations, Projects, Research, Templates, Journal
- Scripts and tools: /root/projects/
- Reports: /root/vault/Reports/
Operating Rules
- Always verify outputs before calling a task done
- Keep responses concise — lead with the answer, not the reasoning
- When creating vault notes, use plain-language titles and save in the correct folder
- Never include credentials in files or responses — reference BWS for any secrets
- When modifying existing files, show me the proposed change before applying it
Tools
- Report generator: /root/projects/report-generator.py
- BWS: use "bws secret get" to retrieve credentials (access token is in environment)
```
Customize every section with your actual information. Do not use placeholders. The more specific you are, the more useful the CLAUDE.md becomes.
Test the global CLAUDE.md
Exit Claude Code and restart it:
```
claude
```
Now ask:
```
What do you know about my business and my file structure?
```
Claude Code should be able to describe your agency, list your vault folders, and reference the tools — all without you telling it anything in this session. If it can, the CLAUDE.md is working.
Try a practical test:
```
Draft a one-paragraph summary of my agency suitable for a proposal introduction.
```
The output should reference your actual services and target market from the CLAUDE.md, not generic placeholder language.
Write a project-level CLAUDE.md for the vault
Now create a CLAUDE.md specific to the vault directory:
```
Create a CLAUDE.md at /root/vault/CLAUDE.md with vault-specific instructions:
Vault Instructions
This is the agency knowledge vault. All business context lives here as markdown notes.
Note Conventions
- Use plain-language titles: "Client Onboarding SOP", not "sop-onboard-v2"
- Business notes go in Business/
- Client notes go in Clients/[client-name]/
- Process documentation goes in Operations/
- Active work notes go in Projects/
- Reusable templates go in Templates/
- Daily/weekly notes go in Journal/ with the date as the filename
Working in the Vault
- Before creating a new note, check if one already exists on the topic
- When editing existing notes, preserve existing content — add, do not overwrite
- Link related notes using [[wikilinks]] where the connection is useful
- The Lessons Log in the root folder captures operational lessons — append, do not replace
```
Test the project CLAUDE.md
Navigate to the vault directory and restart Claude Code:
```
cd /root/vault
claude
```
Ask:
```
I want to create a note about a new client called "Summit Garage Doors." Where should it go and what should it contain?
```
Claude Code should reference the vault CLAUDE.md rules: the note should go in Clients/Summit Garage Doors/, use a plain-language title, and follow the client note format from your templates. If Claude Code gets the location and conventions right, the project CLAUDE.md is working.
Set up CLAUDE.md locally (optional)
If you also run Claude Code on your local machine, create the same global CLAUDE.md there:
```
~/.claude/CLAUDE.md
```
Use the same content. Adjust the file paths if your local vault is in a different location than on the VPS.
Failure modes and verification checks
The main failure is writing a CLAUDE.md that is too vague to be useful. "Be helpful and professional" does not add value. Specific instructions like "vault notes use plain-language titles and go in the correct subfolder" add real value.
Another failure is never updating the CLAUDE.md. As your setup evolves — new tools, new folders, new conventions — the CLAUDE.md should evolve too. Review it monthly.
Verification: restart Claude Code and ask a context-dependent question without providing any context in the conversation. If Claude Code answers correctly using CLAUDE.md information, it works.
Implementation checklist
- Write the global CLAUDE.md at
~/.claude/CLAUDE.md. - Include: business context, file structure, operating rules, tool locations.
- Test by asking Claude Code what it knows before you tell it anything.
- Write a project CLAUDE.md for the vault at
/root/vault/CLAUDE.md. - Include: note conventions, folder rules, editing guidelines.
- Test by asking Claude Code to perform a vault operation.
- Optionally replicate to your local machine.
Immediate next action
Move to the next module. You will learn plan mode — the structured workflow for tackling bigger tasks with Claude Code.
Exercise
Start a fresh Claude Code session in your vault directory. Give it a real task without any context in the conversation:
```
A new client named "Precision Paving" just signed up for our local SEO service. Create the initial client folder and notes, and add them to the Active Client Index.
```
Evaluate what Claude Code does. Does it create the folder in the right place? Does it follow the naming conventions from the CLAUDE.md? Does it update the Active Client Index? If yes, your CLAUDE.md is doing its job. If not, fix the CLAUDE.md to be more specific about the conventions Claude Code missed.