Skip to content
Free and open to everyone. The lessons keep improving thanks to your feedback.
Language : EN

A short CLAUDE.md that works (and Markdown in 5 minutes)

In testingChecked on 24/10/2026 (French version)Translated on 27/10/2026

This lesson is still being tested: it improves with learners' feedback. If something is unclear, it is the lesson that needs fixing, not you.

Follow this lesson with Claude Code

With the course companion installed, open Claude Code in your working folder and type:

/formation-ia:suivre m05-l02 en

It reads the up-to-date lesson on this site and guides you step by step, without changing anything without your consent. Install the companion. Claude Code is not included in the free plan: an eligible Claude subscription, or a Console account billed by usage for the terminal.

By the end of this lesson, you will be able to

  • read and write a Markdown file, the text format Claude Code reads for its instructions;
  • write a one-page CLAUDE.md that really changes the way Claude Code works with you;
  • test it, then fix it when an instruction is not followed.

Why it matters to you

Without CLAUDE.md, you repeat the same instructions at every session: “keep it informal”, “ask before changing anything”, “keep it short”. With it, you write them once. It is the file that turns Claude Code from a generic assistant into your assistant.

Before you start

You needClaude Code, your mon-espace-ia folder in Manual mode, and lesson 1 of this module
Duration40 minutes
CostIncluded in your subscription

Understand it in 3 minutes

Markdown, the text format of your instructions

A file that ends in .md is a simple text file, readable by you as well as by the AI. A few symbols are enough to format it:

You writeYou get
# TitleA main heading
## SectionA section heading
- an ideaA bulleted list line
1. a stepA numbered list
**important**Text in bold

That is all you need for CLAUDE.md. You can open it with any text editor (TextEdit on Mac, Notepad on Windows), or directly in the Claude app.

CLAUDE.md

It is a file named exactly CLAUDE.md, placed at the root of your working folder. Claude Code reads it again at the start of each session. According to the documentation (24/10/2026):

  • it is better to aim for under 200 lines: the longer it is, the less well its instructions are followed. To start, one page is enough;
  • Claude reads it as instructions, not as a lock: your permissions in Manual mode remain your protection;
  • the /init command can suggest one automatically, designed mainly for coding projects. For your workspace, the template in this lesson is a better fit.

What goes in it

  1. About me: 5 lines maximum, nothing sensitive.
  2. How we work together: your rules (informal tone, one step at a time, ask before changing anything).
  3. Start and end of session: read the journal again, write today’s page.

Do it together

1Step 1: Download the template

Download the CLAUDE.md template (in the resources below) and read it: it is one page, with the three parts.

2Step 2: Have Claude Code install it

Warning: if you installed the module 4 kit, mon-espace-ia already contains a CLAUDE.md, with your “About me” part and the kit’s safety rules. Do not replace it without comparing it.

In mon-espace-ia, in Manual mode, paste the template into the conversation, preceded by:

Here is a CLAUDE.md template. If a CLAUDE.md already exists at the root of this folder, compare it with this template and suggest a version that keeps my "About me" lines, my support level, my safety rules and my start and end of session instructions; otherwise, create the file with this content. Show me the complete file before writing it.

Read the proposed file and the permission request, then approve.

3Step 3: Fill in “About me”

If your “About me” part is already filled in, read it again and move on to step 4. Otherwise:

Ask me 3 questions, one by one, to fill in the "About me" part of CLAUDE.md in 5 lines maximum. Show me the lines before writing them.

4Step 4: Test

Open a New session in the same folder, then simply write: “Hello”. If it follows your CLAUDE.md, it speaks to you in the informal tone you asked for, summarizes your last session if a journal exists, and suggests just one thing to do.

Your turn

Your own rule. Add to CLAUDE.md a rule that matters to you, for example “Answer in 10 lines maximum”, “Always suggest two options before choosing” or “Remind me to check the numbers”. Open a new session and check that it is followed. If it is not, make it more precise: “10 lines maximum” works better than “be concise”.

Resources to download

Check your work

It worked if:

  • CLAUDE.md exists at the root of mon-espace-ia, is less than a page long and contains nothing sensitive;
  • in a new session, Claude Code applies at least two of your instructions without you repeating them;
  • your personal rule is followed, after a correction if needed.

Common mistakes:

  • a three-page CLAUDE.md, with instructions that contradict each other: keep the essentials;
  • vague instructions (“be efficient”): prefer checkable instructions (“10 lines maximum”);
  • writing sensitive information in it: it is read again and sent at every session.

Keep it and pick it up later

  • Read your CLAUDE.md again once a month: remove what is no longer useful, make more precise what is not followed.

Going further

optional
  • The official documentation, in English: code.claude.com/docs/en/memory (personal CLAUDE.md files for all your projects, imports, per-folder rules).

New words

4 words explained
WordWhat it means
MarkdownA way of writing text with a few symbols (#, -, **) to make headings, lists and bold
.md fileA text file written in Markdown
Root of the folderThe main level of the folder, outside any subfolder
/initA Claude Code command that suggests a starter CLAUDE.md, mainly for coding projects

Check your understanding

3 questions, no grade. An explanation appears after each answer.

1In a Markdown file, what does a line that starts with "##" do?
2What length should you aim for in a CLAUDE.md, according to the documentation?
3What should you never write in CLAUDE.md?

What's next?

Lesson 3 · Journal, project sheets, decisions: keep your tracking going without it becoming a chore.

Module 5:

✏️ Do the exercises

My space: your progress, your exercises and your last lesson.

Still to verify: the full test with a real beginner, on Mac and on Windows.

Sources and checks

1 sources

Date, version, sources Written on 24/10/2026. Checks:

  • location and loading of CLAUDE.md, recommended length (under 200 lines), instructions and not enforced rules, /init command: code.claude.com/docs/en/memory, on 24/10/2026.

Sources checked: