Insight: Up to 80% of "bad" AI outputs aren't because the AI is "dumb," but because it's missing critical context—just like a human analyst on their first day.
You would never give a complex task to a new team member without briefing them first. You'd explain the client's goals, the required tone of voice, where to find the data, and critical compliance rules. Without this briefing, their work would be useless, no matter how smart they are.
Providing context to Claude works the same way.
Reflection Question: When you brief a human junior analyst, what 3-5 key details do you always emphasize? Those are the exact details that belong in your `CLAUDE.md` file.
The `CLAUDE.md` file is a special file that Claude Code can automatically load for context when present in your workspace. Let's break down what a good one looks like.
# Project: Q4 Portfolio Summary for Client A
## Goals
- Summarize client holdings from a CSV for our quarterly review email.
- Identify the top 3 performing assets.
## Tone
- Professional, confident, and reassuring. Avoid overly technical jargon.
## Data Sources
- All client data is in `Q4_financials.csv` (same folder as this project).
## Guardrails & Constraints
- CRITICAL: Never include specific dollar amounts in the summary email.
- All final output must be in Markdown format.
Click each card below to understand why these sections are so powerful.
Tells Claude the "why" behind your requests. It helps the AI make better decisions about what to include or exclude to achieve your objective.
Guides the writing style. Claude can be formal, casual, technical, or simple, but you have to tell it what you need for a specific audience.
Points Claude to the right files. This saves you from having to specify the file path in every prompt and prevents errors from using outdated data.
Sets the hard rules and constraints. This is the most important section for compliance and safety, preventing the AI from doing something it shouldn't.
Use this template to set up context for the ClientA case study. You can copy-paste it directly.
# Project: Q4 Portfolio Summary for Client A
## Goals
- Summarize client holdings from a CSV for our quarterly review email.
- Highlight key performance metrics (return %, allocation shifts).
## Tone
- Professional, confident, and reassuring.
- Avoid jargon; explain terms if used.
- Client-friendly language for non-experts.
## Data Sources
- Main file: `Q4_financials.csv` (located in same folder as HTML files)
- Fallback: Use placeholder values if file unavailable for template drafts.
## Guardrails & Constraints
- CRITICAL: Never include specific dollar amounts in the summary email.
- All final output must be in Markdown format.
Claude_Practice
folder: cd ~/Desktop/Claude_Practice
echo "paste-here" > CLAUDE.md
or use VS Code: File → New File → Save As → name it CLAUDE.md
✓ Pro tip: You can now test the case study example below with this exact CLAUDE.md
in place!
Let's see the practical impact of the `CLAUDE.md` file you just created. We'll give the exact same prompt in two different scenarios.
Here, we are in an empty folder with no `CLAUDE.md` file.
$ claude "Draft a brief Q4 portfolio summary email."
Subject: Your Q4 Portfolio Update
Dear Valued Client,
Here is the summary of your portfolio for the fourth quarter. Overall, the market showed trends and your investments performed accordingly. We have reviewed your assets and will continue to monitor them.
Please let us know if you have any questions.
Sincerely,
Your Advisor
Analysis: This is generic, unhelpful, and unprofessional. It doesn't know the goal, the tone, or where the data is. You can't send this to a client.
Now, we're in our project folder where our `CLAUDE.md` file exists. We run the *exact same prompt*.
$ claude "Draft a brief Q4 portfolio summary email."
Subject: A Confident Look at Your Q4 Portfolio Performance
Dear Client A,
I've completed the Q4 review of your portfolio based on the `Q4_financials.csv` data, and the results are encouraging. I'm pleased to report that your portfolio remains well-aligned with our long-term strategy.
The top-performing assets this quarter were [Asset 1], [Asset 2], and [Asset 3], which showed significant strength. We continue to maintain a diversified position to ensure stability.
I've prepared a full report for our upcoming meeting. I'm looking forward to discussing how we can build on this positive momentum in the new year.
Best regards,
Your Advisor
Analysis: This is a world of difference. The output is personalized, uses the correct reassuring tone, references the data file, and adheres to the goal. It's a client-ready first draft.
You might be wondering: "How does Claude find the right `CLAUDE.md` file?" It simply looks in the folder you are currently "in" within your terminal—your working directory.
Think back to the "filing cabinet" from Module 1. When you `cd` into the `ClientA` folder, you are telling your computer (and Claude) that this is your current workspace.
/Users/YourName/Projects/
└── ClientA/ <-- Your terminal is HERE (`pwd`)
├── Q4_financials.csv <-- Data file (same folder)
├── reports/
└── CLAUDE.md <-- Claude reads this automatically!
Before you start working, always `cd` into the correct project folder. This single habit ensures Claude has the right context and prevents it from getting confused by other projects on your computer.
Your first `CLAUDE.md` won't be perfect. The goal isn't to get it right the first time, but to refine it. When Claude's output isn't quite right, don't just fix the output—improve the instructions in `CLAUDE.md`. This is how you teach the AI and improve all future results.
Drag the steps into the correct sequence in the box below.
Let's apply this entire workflow to one realistic consulting task from start to finish.
We'll start with a structure-only folder. This exercise teaches how `CLAUDE.md` shapes writing even without input files.
# Navigate to your practice folder from Module 3
$ cd ~/Desktop/Claude_Practice
# Create ClientA subfolder and enter it
$ mkdir ClientA && cd ClientA
Note You don’t need CSVs yet. We’re asking Claude to write a template email using preferences from CLAUDE.md
. In Module 5 we’ll plug in real data.
Even with an empty folder, Claude will use your `CLAUDE.md` to produce a professional draft.
$ claude "Draft a 120-word summary email for Client A's Q4 portfolio and save it to summary_email.md"
Claude proposes creating a new file with the email content. You review it for accuracy, tone, and adherence to your guardrails.
The draft looks great. It follows the "reassuring" tone and correctly avoids specific dollar amounts as instructed by our `CLAUDE.md` guardrail. You approve the change, and the `summary_email.md` file is created.
Non-coders often forget this crucial step: confirming the file actually exists and seeing what's inside. Let's check!
⚡ Why Learn Terminal Commands?
You're already using terminal to run $ claude "..."
commands. Learning 3 simple navigation commands (ls
, cd
, pwd
) helps you understand where you are and where your files are — critical for debugging "Claude can't find my file" errors later. Recommendation: Try terminal first, use GUI as backup for visual confirmation.
Click folders/files to see tooltips. Use the command buttons to navigate and watch the current location update in real-time. The current location is displayed below the folder structure.
Current Location: ~/Desktop
Basic Navigation
View Contents
Advanced Shortcuts
💡 Key Concepts: cd
= change directory, ..
= parent folder, ~
= home, ls
= list files, pwd
= print working directory (where am I?)
💡 Two Ways to Verify
Option A: Using Terminal (Fast)
# You're already in ClientA folder. List files:
$ ls
summary_email.md
# View the contents
$ cat summary_email.md
# Want to see CLAUDE.md? It's in the parent folder:
$ ls ..
CLAUDE.md ClientA CompoundInterest index.html
In ClientA folder, you only see summary_email.md
. The CLAUDE.md
file lives in the parent Claude_Practice folder, where Claude can find it automatically.
Option B: Using File Explorer / Finder (Visual)
Desktop\Claude_Practice\ClientA
→ You'll see summary_email.md
Desktop/Claude_Practice/ClientA
→ You'll see summary_email.md
✓ What You Should See
A professional email that:
🎓 Learning Reinforcement
This verify step mirrors what you learned in Module 3: Approve → Verify → Iterate. Always check your output immediately after approval. If something's wrong, you know exactly which change caused it!
Track your mastery of CLAUDE.md! Click badges as you complete each milestone. Hover for details.
You've created summary_email.md
— great! But before you send it to a client, you need to understand what that .md
file actually is and how to use it professionally.
.md
(Markdown) File?
Markdown (.md
) is a plain text format with simple formatting marks. It's designed to be human-readable as-is, but can also be converted to beautifully formatted documents. Think of it as the "source code" for formatted text.
**bold**
, #
, etc.)Choose the format based on your client's needs:
summary_email.md
in VS Code (it shows formatted preview automatically).md
)✅ Best for: Quick emails, internal communication, informal updates
Use a free online converter like Pandoc or Dillinger.io:
.md
content or import the file✅ Best for: Formal reports, branded deliverables, client presentations
.md
file → "Markdown PDF: Export (pdf)"✅ Best for: Formal client deliverables, reports, archival documents
The easiest option — let Claude do the conversion:
$ claude "Convert summary_email.md to an HTML email template with professional styling. Include inline CSS so it displays properly in Gmail and Outlook."
Result: Claude creates summary_email.html
with full formatting, ready to copy-paste into any email client!
✅ Best for: HTML emails, newsletters, web-ready content
💡 Pro Workflow Tip
Keep .md
as your "source of truth" for easy edits with Claude. When ready to deliver, convert to the client's preferred format (Word/PDF/HTML). This way you get the best of both worlds: fast iteration + professional delivery.
Let's practice file transformation with Claude. You'll learn how to convert formats, add styling, and handle multiple output formats — essential skills for any consultant.
You'll ask Claude to transform your summary_email.md
into a professional HTML email that works in Gmail and Outlook.
Step 1: Make sure you're in the ClientA folder
$ cd ~/Desktop/Claude_Practice/ClientA
$ ls
summary_email.md
✅ You should see summary_email.md
in the output
Step 2: Give Claude a detailed conversion prompt
Copy this exact prompt (or customize it):
claude "Read summary_email.md and convert it to a professional HTML email template. Requirements:
- Use inline CSS (for email client compatibility)
- Professional color scheme (navy blue headers, black body text)
- Responsive design (mobile-friendly)
- Proper spacing and padding
- Save as summary_email.html
Make it look like it came from a financial consulting firm."
Step 3: Review the diff
Claude will show you the new HTML file it wants to create. You'll see:
<style>
tags with CSS for formatting<table>
structure (emails use tables for layout)💡 Don't worry if you don't understand HTML — you're learning to spot patterns!
Step 4: Approve and verify
# Select "1 Yes" to approve
# Then verify it was created:
$ ls
CLAUDE.md summary_email.html summary_email.md
You should now see 3 files! The HTML is ready to test.
Step 5: Test the HTML in your browser
Open the file to see how it looks:
summary_email.html
→ Open with → Chrome/Edgesummary_email.html
(opens in Safari)✅ Success: You should see a professionally formatted email with headers, spacing, and styling!
Now let's get advanced — ask Claude to create 3 formats in one command. This teaches you about batching related tasks.
The Multi-Format Prompt
claude "Read summary_email.md and create 3 versions:
1. summary_email_plain.txt - Plain text version (no formatting, email-friendly)
2. summary_email_rich.html - Rich HTML version with modern styling (colored headers, subtle shadows, rounded corners, generous spacing)
3. summary_email_print.html - Print-optimized version (black text, serif font, page breaks)
Keep content identical, only change formatting for each medium."
What happens?
Claude will show you a diff with 3 new files being created. Review the diff to see how the SAME content looks in 3 different formats:
📄 Plain Text (summary_email_plain.txt
)
No HTML tags, no colors, no styling — just raw text with line breaks. Looks like old-school email or Notepad. Perfect for email clients that strip HTML or accessibility readers.
✨ Rich HTML (summary_email_rich.html
)
Modern styling means:
Think: Modern website vs 1990s webpage
🖨️ Print HTML (summary_email_print.html
)
Optimized for physical paper: Black text (saves ink), serif fonts (easier to read on paper like Times New Roman), page breaks (sections don't split awkwardly), no background colors (prints clean). Uses @media print
CSS to automatically switch when you hit "Print."
Verify all 3 files
$ ls
CLAUDE.md summary_email_plain.txt
summary_email.html summary_email_print.html
summary_email.md summary_email_rich.html
💡 Learning moment: You just learned to batch related transformations in one request — saves time and tokens!
This is where it gets real — customize the output to match YOUR firm's style.
Step 1: Update your CLAUDE.md with branding
Add this section to ~/Desktop/Claude_Practice/CLAUDE.md
:
## Company Branding
- Primary color: #003366 (navy blue)
- Secondary color: #F5F5F5 (light gray)
- Font: Arial, sans-serif
- Logo: [Your company name] in bold at top
- Footer: "Confidential - For Client Use Only"
💡 Manual Edit vs Claude Command
While you could ask Claude to add this section (claude "Add a Company Branding section to CLAUDE.md with..."
), manually editing simple additions like this is often smarter:
Rule of thumb: Use Claude for complex generation, transformation, or analysis. Use manual editing for simple, structural changes you understand. This consciousness saves tokens for meaningful tasks where AI truly adds value.
🖥️ How to Edit CLAUDE.md in VS Code (GUI Method)
For non-coders: Using VS Code is easier than terminal and integrates better with your workflow. Here's how:
Step 1: Open Your Project Folder
✅ You'll now see your folder structure in the left sidebar (Explorer panel)
Step 2: Navigate the File Tree
After completing the exercises above, your VS Code sidebar will show:
Step 3: Open and Edit CLAUDE.md
CLAUDE.md
in the Explorer (left sidebar) → File opens in editor✅ The white dot next to filename disappears when saved
Step 4: Navigate to Subfolders
To work in ClientA folder:
💡 Pro tip: Right-clicking folders gives you quick access to terminal at that exact location — no more cd
commands needed!
Step 2: Regenerate with branding
cd ClientA
claude "Recreate summary_email_rich.html using the branding guidelines from CLAUDE.md. Apply our company colors, add the logo header, and include the confidential footer."
What you'll learn
CLAUDE.md
influences styling (not just content)🎯 Challenge: Can you get Claude to match your ACTUAL company's branding?
These are professional-grade skills that work for proposals, reports, newsletters, client updates — any document you create!
`CLAUDE.md` establishes durable guidance—tone, guardrails, and preferences—so you don't repeat yourself. Your prompt still drives the task at hand. When there's tension, Claude attempts to reconcile both, but specific, explicit instructions in the prompt typically take precedence.
Best practice: Place non‑negotiables (compliance, privacy, forbidden content) under a Guardrails section inside `CLAUDE.md`, and keep transient, task‑specific details in the prompt. This separation keeps outputs predictable and safe.
What are Guardrails? Non‑negotiable safety and compliance rules that constrain AI outputs. Examples: "Never include PII," "Don't show dollar amounts in summaries," "Avoid medical advice." Think of them as hard boundaries that should never be crossed, regardless of the prompt.
Never store credentials, client PII, or confidential figures in `CLAUDE.md`. Use your organization's secret manager or environment variables, and only pass minimal, sanitized context to Claude. Remember: context should guide style and process, not reveal sensitive data.
Reinforce safety by adding explicit guardrails in your `CLAUDE.md` file. Example:
## Guardrails
- CRITICAL: Never include client PII (names, SSNs, account numbers)
- Never display specific dollar amounts in summary emails
- Do not include passwords or API keys in any output
For more on AI safety and responsible use, see Anthropic's Prompt Engineering Guide and your firm's security policies.
Claude Code uses your current workspace context (project root). Multiple `CLAUDE.md` files can create ambiguity and conflicting instructions. Prefer one authoritative file per project for clarity and traceability.
If you need layers, separate a global profile (`~/.claude/CLAUDE.md`) for timeless preferences and a project‑specific file for client or repo details. Keep boundaries crisp to prevent accidental overrides. See ‘Working Directory’.
Treat `CLAUDE.md` like a living brief. Update it whenever you notice repetitive corrections (e.g., tone tweaks, recurring guardrails) or add a new data source. The cost of small edits pays back with faster, cleaner outputs across every future task in that project.
Establish a lightweight cadence—weekly or after each milestone—to fold learning back into the brief. Keep diffs small and scoped so changes remain reviewable. See ‘Approval Workflow’.
First, confirm you’re in the correct working directory and the filename is exactly `CLAUDE.md`. Next, simplify the file: move critical items to the top, clarify guardrails, and remove contradictory or redundant guidance. Then retry the same prompt to isolate the change.
If behavior persists, restate key constraints in your prompt, and consider splitting verbose sections into concise bullet points. Smaller, high‑signal briefs are easier for models to honor. See ‘Working Directory’.
Yes—short, representative examples are powerful anchors for tone, structure, and detail. Add a one‑paragraph sample email or a brief code snippet that demonstrates your preferred style. Keep examples concise to preserve the context window for the current task.
Label them clearly (e.g., “Example: client‑friendly summary”) and avoid confidential text. Rotate stale examples to prevent unintentional overfitting to outdated patterns. See ‘Context Window’.
Favor brevity and signal density. Long briefs can dilute key instructions and consume unnecessary context. Aim for one screenful per major section (Goals, Tone, Data, Guardrails). If you need more, split into modular docs and reference them explicitly in the prompt.
Periodically prune old or duplicative lines. A crisp, current brief drives better adherence than an exhaustive one. See ‘Context Window’.
Project briefing file with goals, tone, data sources, and guardrails that Claude Code can load when present to shape responses.
Your current project folder; Claude Code uses this to locate files like CLAUDE.md
and referenced assets.
Non‑negotiable safety and compliance rules (e.g., no PII, no dollar amounts) that constrain outputs.
Style and voice guidance (e.g., professional, reassuring). Put durable guidance in CLAUDE.md
, specifics in prompts.
Authoritative file paths or tables to use (e.g., Q4_financials.csv
) to minimize ambiguity.
Objectives that define success criteria (what the output must achieve) for focused results.
The amount of information the model can consider at once; concise, high‑signal context works best.
Side‑by‑side or inline preview of Claude’s proposed file edits, highlighting additions and removals for review.
Editor dialog where you approve or reject proposed changes before Claude writes to your files.
Unintended instructions in prompts or context that override your intent; mitigate with clear Guardrails and review.
A recorded snapshot of changes in your repository with a message explaining the intent.
Returning to a prior known‑good state. You can ask Claude to generate a revert diff if needed.
The human‑in‑the‑loop loop: Prompt → Diff → Approve → Apply, ensuring control and safety.
Access model where users are provisioned individual seats; billing and policies managed centrally.
Your OS’s list of folders it searches for commands like claude
; reopening the terminal refreshes changes.
You can create high-quality, personalized outputs by providing Claude with clear, persistent context using the `CLAUDE.md` file.
In Module 5, you’ll learn to scale these habits by chaining tasks, automating multi-step workflows, and turning AI insights into strategic consulting roadmaps.
Continue to 🚀 Module 5: Becoming an AI-Native Consultant