Prompts · Tes propres outils pour Claude Code
Un sous-agent relecteur qui ne laisse rien passer
Claude crée un relecteur spécialisé, en lecture seule, avec sa liste de contrôle et son format de rapport. Tu l'appelles avant chaque commit pour un regard neuf sur tes changements.
Le prompt, en français
4 cases sont vides : elles partiront entre crochets, et Claude te posera la question.
Voir la version anglaise, celle qui est copiée
Create a Claude Code subagent named `[Le nom du relecteur (minuscules et tirets)]`, whose job is to review my changes from one specific angle.
What it checks: [Ce qu'il vérifie]
The project rules it enforces: [Les règles de ton projet qu'il fait respecter]
Model: [Le modèle (sonnet, opus, haiku…), ou « au choix »]
1. Check the documentation
Read https://code.claude.com/docs/en/sub-agents for the location and the exact header fields. Do not rely on your memory.
2. Write the file
- Location: `.claude/agents/[Le nom du relecteur (minuscules et tirets)].md` (project, to share with the team).
- Header: `name`; a `description` that says when to call it, with "use proactively" so that Claude calls it on its own after changes; read-only `tools` (`Read, Grep, Glob`); and `model` if I gave one (otherwise, propose the best fit and say why). No Edit or Write: it reviews, it does not fix. Only add Bash if the reviewer needs to run a specific command (such as `git diff`), and tell me, because Bash is not read-only.
- Body (its system prompt):
- its role, in two lines;
- how to find what changed (`git diff` and `git diff --staged`, or the files it is given);
- a precise checklist drawn from the angle and the rules above, each item checkable;
- the report format: for each problem, the file and line, what is wrong, why, the proposed fix, and a severity (blocking, important, minor); at the end, a one-line verdict;
- the instruction to report only what it actually saw in the code, with the exact line, and to write "rien à signaler" rather than invent anything;
- the report in French.
3. Try it
- Create a small test file that contains a real problem related to the angle, ask the reviewer to review it with `@"[Le nom du relecteur (minuscules et tirets)] (agent)"`, and show me its report.
- Check that it found the problem and did not modify any file, then delete the test file.
Done when the reviewer file exists, the test found the planted problem, and you explain to me in three lines how to call it (@-mention, or a request in French). Talk to me in French.Comment t’en servir
Colle ce prompt à la racine de ton projet. Le relecteur est enregistré dans .claude/agents/ : il fait partie du projet, et tes coéquipiers l'auront aussi s'ils récupèrent le dossier.
Il ne peut que lire : il signale, il ne corrige pas. C'est voulu. Il travaille dans son propre contexte, sans l'historique de ta conversation, donc il regarde ton code avec un œil neuf. Claude le teste sur un petit fichier piégé pour vérifier qu'il trouve bien le problème.
Ensuite, appelle-le avant chaque commit, par exemple en écrivant @ puis son nom. Tu peux en créer plusieurs, un par angle (sécurité, accessibilité, performances). La formation « Sous-agents : plusieurs Claude qui travaillent pour toi » explique les outils, les modèles et la délégation.
Pour comprendre tout ce que fait ce prompt, et l’adapter : la formation Sous-agents : plusieurs Claude qui travaillent pour toi.