Prompts · Tes propres outils pour Claude Code
Le CLAUDE.md de ton projet
Claude lit ton projet, te pose les questions dont les réponses ne sont pas dans le code, puis écrit un CLAUDE.md court et vérifié : commandes, règles, interdits, pièges connus.
Le prompt, en français
3 cases sont vides : elles partiront entre crochets, et Claude te posera la question.
Voir la version anglaise, celle qui est copiée
Write this project's CLAUDE.md file. It will be read at the start of every session: it must be short, precise and true.
The project: [À quoi sert ton projet, en une phrase]
My rules: [Tes règles de travail]
What you must never do: [Ce que Claude ne doit jamais faire]
1. Explore first
Read the project before writing: README, configuration files (package.json, pyproject.toml or their equivalent), scripts, folder structure, tests, recent git history. If a CLAUDE.md, an AGENTS.md or a `.claude/rules/` folder already exists, read them and suggest improvements instead of rewriting everything. Never read secret files (`.env` and its variants).
2. Ask me questions
Ask me the questions whose answers are not in the code: who uses the project, what is fragile, what has already broken. Wait for my answers.
3. Write
Aim for fewer than 200 lines. For each line, ask yourself: "Without it, would Claude make a mistake?" If the answer is no, remove it. The sections:
- The project in three lines: what it is for, who it is for, the tech stack and its versions.
- The exact commands to install, run, test, type-check and build. Each one found in the project files, not guessed.
- Where things are: the important folders, one line each.
- My rules, written as precise, checkable instructions ("Run `npm test` before every commit", not "Test well").
- The forbidden actions, each with its reason in a few words.
- The pitfalls you noticed while reading the code.
Anything that only concerns part of the code goes into a file in `.claude/rules/`, so the main file stays light.
4. What CLAUDE.md does not guarantee
A CLAUDE.md is context, not an enforced rule. For each truly serious forbidden action (secrets, main branch, data), also propose a permission rule or a hook that blocks it. Do not install it without my approval.
Done when the file is written, every command it mentions has been checked (run the safe ones, such as tests or type-checking, and tell me the result), and you give me the line count and the list of forbidden actions for which you propose a hook. Talk to me in French.Comment t’en servir
Ouvre ton terminal à la racine du projet (le dossier qui contient package.json ou son équivalent), lance claude et colle le prompt. S'il existe déjà un CLAUDE.md, Claude propose des améliorations au lieu de tout réécrire.
Il lit le projet, te pose quelques questions, puis écrit le fichier. Relis-le ligne par ligne : chaque commande citée doit vraiment marcher chez toi, et chaque règle doit être assez précise pour qu'on puisse dire si elle est respectée.
Un CLAUDE.md est lu comme un conseil, pas comme une loi : pour tes interdits les plus graves, Claude te propose aussi un hook qui les bloque vraiment. La formation « CLAUDE.md : ne plus jamais tout réexpliquer » montre comment le garder court et utile.
Pour comprendre tout ce que fait ce prompt, et l’adapter : la formation CLAUDE.md : ne plus jamais tout réexpliquer.