AI for Lawyers

What Is the CLAUDE.md File? A Lawyer's Guide to an AI That Knows Your Firm

June 20, 202619 min read
claude md fileclaude.mdai for lawyersclaude for legalclaude codelegal ailaw firm aiclaude projects
What Is the CLAUDE.md File? A Lawyer's Guide to an AI That Knows Your Firm - My Legal Academy Knowledge Base
Featured image for What Is the CLAUDE.md File? A Lawyer's Guide to an AI That Knows Your Firm - My Legal Academy Knowledge Base

By Rubab Asif, Growth Specialist at My Legal Academy


Here is a situation every lawyer who uses Claude has run into.

You open a new session. You start asking it to draft something. And within two or three exchanges, you realize you are typing the same things you typed last week. "We are a personal injury firm in Texas." "Always write demand letters in this format." "Never use bullet points in client correspondence." "Our standard fee is 33 percent."

You are not using Claude badly. You are running into a fundamental limitation: Claude starts every single session with zero memory of your last one. It does not know your firm. It does not know your practice area. It does not know your tone, your templates, your jurisdictional preferences, or your billing arrangements. Every session, you are meeting it for the first time.

The CLAUDE.md file solves this problem. It is a plain text document that Claude reads automatically before you type a single word — every session, every time. Write it once, and Claude knows your firm from the moment the session opens.

This article explains what the CLAUDE.md file is, how it works, and exactly what a law firm should put in one.

The numbers at a glance:

  • 40.8% of developers who use AI coding agents use Claude Code — the most popular AI coding agent (JetBrains, 2026)
  • 7M+ views on lawyer Zack Shapiro's post about using Claude custom instruction files in his practice (March 2026)
  • 0 lines of code needed to create a CLAUDE.md file — it is plain text anyone can write
  • ~80 lines the practical sweet spot for a high-signal CLAUDE.md file

What actually is the CLAUDE.md file?

The CLAUDE.md file is a plain text document written in a simple format called Markdown. Claude reads it automatically at the start of every Claude Code session — before you type anything, before you ask a single question. Whatever you put in it becomes part of Claude's working context for the entire session.

Think of it like an onboarding document for a new team member. When a new associate joins your firm, you do not make them discover your preferences by trial and error over six months. You sit down and brief them: here is what we do, here is how we do it, here is what we never do. The CLAUDE.md file is that briefing document — except it applies to Claude, and it applies every single time without anyone having to deliver it.

"The CLAUDE.md file is a plain Markdown document that Claude Code reads automatically at the start of every session. Write it once, and Claude reads it every time it opens your project. It's your permanent instruction manual." — MindStudio, March 2026

Here is what makes it powerful: the file is not a prompt. It is not something you send to Claude as part of a conversation. It is a configuration layer that loads into Claude's context before the conversation even begins. Your instructions are already there when the session starts.

For lawyers, this changes how useful Claude is on a day-to-day basis.

The problem it solves: why Claude keeps forgetting your firm

Large language models like Claude do not have persistent memory between sessions by default. When you close a Claude session and open a new one, the previous conversation is gone. Claude has no recollection of what you told it yesterday, last week, or last month.

For casual use, this is a minor inconvenience. For professional use — where consistency, accuracy, and firm-specific context matter — it is a real workflow problem.

"Three months into using Claude Code on a production codebase, I was still correcting the same mistakes every session. Then I created a CLAUDE.md file. Forty lines of project context. The corrections stopped overnight." — Medium, March 2026

Lawyers experience this as a specific set of repeated frustrations:

  • Every session, you re-explain which state you practice in and what court's local rules apply
  • Every draft comes back in a format you did not ask for, because Claude defaults to whatever it thinks looks good
  • You write the same opening context — "we are a personal injury firm, we represent plaintiffs, we operate on contingency" — before every substantive task
  • Staff members who use Claude produce inconsistent output because each person prompts differently
  • Junior staff forget to include critical context, and the output reflects that

The CLAUDE.md file eliminates these problems in one step. The context is loaded before anyone types anything. The instructions apply regardless of who is running the session. The firm's standards are encoded in the file, not in the memory of whoever happens to be prompting that day.

How it actually works, in plain English

You do not need to be technical to understand this. Here is the simple version.

When you start a Claude Code session inside a folder on your computer, Claude looks for a file named CLAUDE.md in that folder. If it finds one, it reads the whole thing — not a summary of it, not selected parts of it, the whole thing — and loads those instructions into its working memory before your first message.

From that point forward, for the rest of the session, Claude operates with those instructions already active. It is as if you had already sent a detailed briefing message at the start of every conversation, except you did not have to, because the file handled it.

Without CLAUDE.mdWith CLAUDE.md
Every session starts blankEvery session starts fully briefed
You re-explain the firm every timeClaude already knows your firm
Outputs vary by who is promptingOutputs are consistent across staff
Staff forget to include contextContext is automatic, not human-dependent
Formatting is different every timeFormatting follows your standard every time

There are three places a CLAUDE.md file can live, each with a different scope:

  • Global (~/.claude/CLAUDE.md) — applies to every Claude session on your computer, regardless of project. Good for personal preferences that never change.
  • Project root (./CLAUDE.md) — applies to all sessions within a specific folder or project. The most common and useful placement for law firms.
  • Subdirectory — a more specific CLAUDE.md that applies only when Claude is working in that subfolder. Useful if you have different rules for different practice areas or matter types.

If both a global and project-level file exist, Claude reads both, and the project-level instructions take priority when they conflict. This means you can set personal defaults globally and override them for specific matters or practice areas.

What a law firm should actually put in a CLAUDE.md file

This is where most people either do too little or too much. Too little means a vague one-liner that does not change Claude's behavior in any meaningful way. Too much means a 3,000-word document that eats into the context window Claude needs for actual work.

The practical sweet spot for a law firm CLAUDE.md file is 80 to 120 lines. Every line should earn its place by preventing a specific mistake or enforcing a specific standard. If you removed a line and Claude would still behave correctly, the line does not belong there.

Five things every law firm CLAUDE.md should include:

1. Firm identity and practice context. Who you are, what you do, and where you practice. This is not marketing copy. It is operational context that helps Claude make every decision correctly.

## Firm
Hernandez Family Law, Austin Texas, licensed in Texas only.
Practice areas: divorce, custody, child support, protective orders.
Clients are individuals, not corporations. Opposing parties are often
represented. Tone should be professional and compassionate — our clients
are going through difficult situations.

2. Jurisdictional and procedural rules. The specific rules that govern your work. Claude does not automatically know your local court's filing requirements, your state's child support calculation formula, or your jurisdiction's statute of limitations. Put them here and Claude will apply them without being asked.

## Jurisdiction
Texas Family Code governs all matters.
Child support calculated using Texas OAG guidelines.
Travis County District Court local rules apply to filings.
Always reference Tex. Fam. Code sections, not generic citations.
Statute of limitations for divorce: none (no time bar).
Protective orders: Chapter 85, Tex. Fam. Code.

3. Document and output format standards. Your firm has a way it does things. Demand letters follow a specific structure. Client emails open a certain way. Time entries use a specific format. Encode these once and every output follows them automatically.

## Output format
Demand letters: opening paragraph states the claim clearly, second paragraph
summarizes the facts, third paragraph states the demand with deadline.
No bullet points in letters or client communications.
Time entries: [Date] [Matter name] [Task description] [Time in tenths].
Headings use title case. Body text uses plain professional English.
Do not use phrases like "it is important to note" or "please be advised".

4. What Claude must always flag for attorney review. This is your ethical guardrail section. Specify the categories of output that must always be reviewed before leaving the office, and Claude will surface those flags instead of producing finished work product you might rely on without checking.

## Review requirements
Always flag: any case citation for independent Westlaw/Lexis verification.
Always flag: any statutory provision — confirm current version before use.
Always flag: any deadline or filing date — attorney must verify independently.
Never produce output framed as final — every document is a draft for review.
Do not calculate child support amounts — provide the formula and inputs only.

5. What Claude should never do. Specific prohibitions that reflect your firm's standards or risk posture. These are the lines that should never be crossed regardless of what a prompt asks for.

## Restrictions
Never give legal conclusions — provide analysis and flag for attorney review.
Never mention the firm's fee percentage in any client-facing document.
Never use the client's full Social Security number in any document.
Never cite cases by memory — only cite cases explicitly provided in this session.
Never draft communications that could be read as threatening or harassing.

The lawyer who went viral doing exactly this

In March 2026, a lawyer named Zack Shapiro published a post on X titled "The Claude-Native Law Firm." It was viewed over 7 million times and sparked a wave of discussion in legal tech about what it actually means to build a law firm that runs on Claude.

"I've created custom instruction files, called 'skills,' that encode my analytical frameworks, my preferred formats, my voice, and my judgment about how specific types of legal work should be done. It applies my framework — the one I've developed over a decade of practice — automatically." — Zack Shapiro, The Claude-Native Law Firm (March 2026, 7M+ views)

What Shapiro described is the same principle as the CLAUDE.md file: encoding a decade of professional judgment into a configuration that applies automatically, every time, without anyone having to remember to specify it.

The reaction was immediate. Artificial Lawyer called it the moment where "the legal world lost it" over Claude. The reason the post resonated is that it demonstrated something most lawyers had not yet internalized: Claude is not just a tool that responds to prompts. It is a tool that can be configured to carry your professional judgment automatically. The CLAUDE.md file is how you do that configuration.

What a CLAUDE.md file looks like for specific practice areas

Here are practical examples of what different firms would include. These are not templates to copy verbatim — they illustrate the kind of firm-specific content that makes the file genuinely useful.

Personal injury firm

## Firm
Okonkwo Law Group, Dallas Texas. Plaintiff-side personal injury only.
Cases: auto accidents, truck accidents, premises liability, slip and fall.
Contingency fee: do not mention percentage in any client document.

## Documents
Demand letters: always include three sections — liability, damages, demand.
Medical chronology format: date | provider | treatment | relevance to claim.
Always identify the insurance carrier if known.

## Jurisdiction
Texas modified comparative fault. Contributory negligence reduces recovery.
Two-year SOL for personal injury (Tex. Civ. Prac. & Rem. Code 16.003).

## Review flags
Flag every case citation for Westlaw verification.
Flag every damages calculation for attorney sign-off.
Flag any reference to prior injuries for attorney review.

Immigration firm

## Firm
Vargas Immigration Law, Miami Florida. Removal defense and family petitions.
Visa categories: I-130, I-485, I-589, VAWA, U-Visa, removal proceedings.
Clients speak primarily Spanish — client letters available in Spanish.

## Documents
I-589 declarations: first person, chronological, specific details, no legal conclusions.
Client questionnaires: plain English, not legal terminology.
Country condition memos: always cite UNHCR or State Department as primary sources.

## Review flags
Flag every filing deadline — consequences of error are severe.
Flag every country condition claim for source verification.
Flag any statement about client's travel history for attorney confirmation.

Estate planning firm

## Firm
Nakamura Estate Planning, Chicago Illinois. Wills, trusts, powers of attorney.
Clients range from young families to high-net-worth individuals.
Illinois law governs all documents unless client is domiciled elsewhere.

## Documents
Client letters: plain English explanations of legal concepts, no jargon.
Trust summaries: explain the purpose of each provision in one sentence.
Will drafts: 755 ILCS 5 governs — cite correctly.

## Review flags
Flag any testamentary capacity concern for attorney evaluation.
Flag any beneficiary designation that may conflict with the will.
Never calculate estate tax amounts — provide inputs for attorney calculation.

The mistakes lawyers make with CLAUDE.md, and how to avoid them

The CLAUDE.md file is powerful when it is focused. It becomes actively harmful when it is unfocused. Here are the four most common mistakes.

Mistake 1: Making it too long. The CLAUDE.md file counts against Claude's context window — the total space available for a conversation. A very long file eats into the space Claude needs for actual work. Research on how language models process long documents shows that content in the middle of very long files receives less attention than content at the beginning and end. Keep the file under 500 words. Every line that does not prevent a specific mistake competes with the lines that do.

Mistake 2: Writing vague instructions. Instructions like "be professional" or "write like a senior attorney" do not change Claude's behavior in any measurable way. Claude already tries to do those things. The instructions that work are specific and behavioral: "never use bullet points in client letters," "always include the file number in the subject line," "cite using Bluebook format with pinpoint citations."

Mistake 3: Front-loading speculative rules. Do not add rules for mistakes Claude has not made yet. Add rules reactively — only when Claude makes the same mistake twice. A rule that addresses a problem you anticipate but have not experienced wastes instruction budget and adds noise to the file.

Mistake 4: Never updating it. The CLAUDE.md file is a living document, not a one-time setup. When your firm's standards change, when you move to a new court's jurisdiction, when you add a practice area, when a rule stops being relevant — update the file. An outdated CLAUDE.md that references a deprecated workflow or an old fee structure is actively misleading Claude every session it runs.

Practical rule: every few months, ask Claude to review the CLAUDE.md file and flag any instructions that seem redundant, outdated, or contradictory. It takes two minutes and keeps the file clean.

How this relates to Claude Projects, and which one to use

If you have used Claude's Projects feature inside claude.ai, you have already worked with a similar concept. Claude Projects lets you give Claude persistent context through a system prompt — instructions that apply to every conversation within that Project.

The CLAUDE.md file and Claude Projects serve the same fundamental purpose: giving Claude permanent knowledge of your firm's context. The difference is in where and how you use them.

Claude Projects (claude.ai)CLAUDE.md file
Where it livesInside claude.aiOn your computer
Who can use itAnyone on the teamUsers with Claude Code
Best forDay-to-day drafting and Q&AAgentic, multi-step workflows
Technical skill neededNone — works in browserVery low — plain text file
ScopePer-Project in claude.aiPer-folder or global

For most law firms, Claude Projects is the right starting point for day-to-day work. The CLAUDE.md file becomes the right tool when you move into Claude Code for more complex, automated, or agentic workflows — the kind of multi-step task automation that runs without you managing every prompt. If you are already using Claude Projects effectively, you already understand the concept. The CLAUDE.md file is the same idea applied to the more powerful end of Claude's capabilities.

When Anthropic launched Claude for Legal on May 12, 2026, one of the most important details was that every plugin in the suite runs a cold-start interview that learns your playbook and writes a practice profile that every skill reads from.

That practice profile is a CLAUDE.md file. Specifically, it is a CLAUDE.md file configured for legal workflows, automatically populated with your firm's standards the first time you run the plugin.

"Practice-area plugins, each one built around a cold-start interview that learns your playbook and a CLAUDE.md practice profile that every skill reads from." — Anthropic, Claude for Legal (June 2026)

This means understanding the CLAUDE.md file is not just useful for technical users experimenting with Claude Code. It is foundational to understanding how Claude for Legal works. The plugins, the agents, the connectors — they all read from a practice profile that is, at its core, a CLAUDE.md file. Lawyers who understand this are in a much better position to configure those tools effectively, to audit the practice profiles Claude generates, and to customize them when the defaults do not match their firm's actual standards.

How to create your first CLAUDE.md file, step by step

Creating a CLAUDE.md file requires no technical background. If you can type a document in Notepad or TextEdit, you can create one.

  1. Install Claude Code if you have not already. It is a command-line tool from Anthropic. Your firm's IT contact can handle this in under ten minutes.
  2. Open the folder on your computer where you do most of your Claude-assisted work — your main matters folder, your templates folder, or wherever you keep the files you work on.
  3. Create a new plain text file in that folder named CLAUDE.md. On a Mac, use TextEdit in plain text mode. On Windows, use Notepad. The filename must be exactly CLAUDE.md with that capitalization.
  4. Using the sections above as a guide, write your firm's context: who you are, what you practice, what jurisdictions you operate in, how your documents should be formatted, and what must always be flagged for review.
  5. Save the file. The next time you open a Claude Code session in that folder, Claude will read it automatically.
  6. Test it. Start a session, ask Claude to draft something routine, and check whether the output reflects your firm's standards. If something is off, update the file.

You do not need to announce the file to Claude or ask it to read the file. Claude reads it automatically at the start of every session. Your instructions are active before you type anything.

See it built live — for your exact practice area

Reading about the CLAUDE.md file is one thing. Building one for your firm in a live session, with guidance, is another. That is what happens every Wednesday in My Legal Academy's Intelligence Lab.

Hundreds of lawyers join live each week to learn how to use Claude for real legal work — and the CLAUDE.md file is one of the topics we walk through hands-on. In a recent session, the team built a complete CLAUDE.md file for a personal injury firm from scratch in under 20 minutes, and the lawyers on the call left with something they could use that afternoon. It is a membership: founding seats lock in $197/month for life.

What the Intelligence Lab covers:

  • Building a CLAUDE.md file for your specific practice area
  • Setting up Claude Projects so Claude knows your firm from the start
  • Using Claude's 1 million token context window for full-document analysis
  • Using Claude Cowork to delegate multi-step legal tasks autonomously
  • Practice-area sessions: personal injury, immigration, family law, criminal defense
  • Using Claude ethically and in compliance with your bar's AI guidance, with live Q&A every session

Join the MLA Intelligence Lab →

The bottom line

The CLAUDE.md file is the simplest, highest-impact thing a lawyer can do to make Claude genuinely useful for professional work rather than just functional.

Without it, every session with Claude is a fresh start. You carry the context. You supply the instructions. You manage the consistency. The burden is on you every time.

With it, Claude already knows your firm. It already knows your practice area, your jurisdictions, your formatting standards, and your review requirements. You open a session and start working.

That shift — from a tool you have to brief every time to a tool that already knows your practice — is what separates lawyers who find Claude genuinely transformative from lawyers who find it useful but exhausting. The CLAUDE.md file is a single plain text document. It takes about an hour to write the first version. The return on that hour compounds across every Claude session you run for as long as you practice.


Sources and further reading: Anthropic, Claude for Legal (claude.com); Anthropic Claude Code documentation (code.claude.com); MindStudio, "What Is the CLAUDE.md File"; Builder.io, "How to Write a Good CLAUDE.md File"; Artificial Lawyer, "Lawyer Uses Claude Skills, Legal World Loses It" (March 2026); JetBrains Developer Ecosystem 2026.

Rubab Asif

Written by

Rubab Asif

Growth Specialist at My Legal Academy

Connect

Rubab Asif is a Growth Specialist at My Legal Academy, where she researches and writes about AI, marketing, and growth strategy for modern law firms.

Frequently Asked Questions

What is the CLAUDE.md file?

The CLAUDE.md file is a plain text document, written in Markdown, that Claude Code reads automatically at the start of every session — before you type anything. Whatever you put in it becomes part of Claude's working context for the whole session, so Claude knows your firm, practice area, jurisdiction, and formatting standards from the moment the session opens. It is not a prompt you send; it is a configuration layer that loads before the conversation begins.

Do I need to be technical to create a CLAUDE.md file?

No. The CLAUDE.md file contains no code and no programming syntax. If you can type a document in Notepad or TextEdit, you can write one. The only mildly technical step is saving the file with the exact name CLAUDE.md. Many solo practitioners set theirs up in under 30 minutes.

What should a law firm put in a CLAUDE.md file?

Five things: (1) firm identity and practice context — who you are, what you do, where you practice; (2) jurisdictional and procedural rules — local court requirements, statutes, citation formats; (3) document and output format standards — how your letters, emails, and time entries should look; (4) what Claude must always flag for attorney review, such as case citations and deadlines; and (5) what Claude must never do, such as giving legal conclusions or stating fee percentages in client documents.

How long should a CLAUDE.md file be?

Roughly 80 to 120 lines, or about 400 to 600 words. The file counts against Claude's context window — the working memory it uses for your actual tasks — so a sprawling file leaves less room for the documents you are analyzing. Studies of language models also show that content buried in the middle of very long files gets less attention. A focused 100-line file outperforms a 400-line one. Test each line: if removing it would not cause a specific, observable mistake, it does not belong.

Should I put client information in the CLAUDE.md file?

No. The CLAUDE.md file is for firm-level context — who you are, how you practice, your standards — not matter-specific client data. Client names, case facts, and privileged communications should never go into a standing configuration file. Keep firm configuration and client information entirely separate.

Is the CLAUDE.md file the same as Claude Projects?

They serve the same purpose — giving Claude persistent context about your firm — but they work differently. Claude Projects lives inside claude.ai and needs no technical setup; you write a system prompt and every conversation in that Project starts with it. The CLAUDE.md file lives on your computer and is read by Claude Code, the more powerful, agentic version of Claude used for complex multi-step work. Most lawyers should start with Claude Projects and adopt the CLAUDE.md file as their use becomes more advanced.

Do I have to tell Claude to read the CLAUDE.md file each session?

No. Claude reads it automatically before your first message — that is the entire point. You do not reference it, announce it, or ask Claude to apply it. One note: if you edit the file mid-session, the change takes effect the next time you open a new session in that folder.

How does the CLAUDE.md file relate to Claude for Legal?

When Anthropic launched Claude for Legal on May 12, 2026, each plugin was built around a cold-start interview that learns your playbook and writes a 'practice profile' every skill reads from. That practice profile is a CLAUDE.md file configured for legal workflows. So understanding the CLAUDE.md file is foundational to using Claude for Legal — the plugins, agents, and connectors all read from what is, at its core, a CLAUDE.md file.

Live Every Wednesday

Build Your Firm's CLAUDE.md File Live

MLA Intelligence Labs are 90-minute working sessions where you connect your firm's tools to Claude and build the workflows that win cases. Founding seats lock $197/mo for life.

Weekly live working sessions, not slides
Practice-area playbooks for your work
A private community of law firm owners

Join 1,400+ law firms that grew with My Legal Academy

Related Articles