AIUnlimited
🌳

Fondations IA

đŸŒ±
AI Seeds

Partez de zéro

🌿
AI Sprouts

Construisez les fondations

🌳
AI Branches

Mettez en pratique

đŸ•ïž
AI Canopy

Approfondissez

đŸŒČ
AI Forest

MaĂźtrisez l'IA

🔹

MaĂźtrise IA

✏
AI Sketch

Partez de zéro

đŸȘš
AI Chisel

Construisez les fondations

⚒
AI Craft

Mettez en pratique

💎
AI Polish

Approfondissez

🏆
AI Masterpiece

MaĂźtrisez l'IA

📘

Pratique IA

📖
Comprendre les modĂšles open-source

Fondamentaux et ressources pour les modĂšles open-source

🎯
Du problĂšme Ă  la tĂąche modĂšles

Transformer les problÚmes métier en tùches modÚles

⚡
Exécuter votre premier modÚle

Voyez vos premiers résultats en 30 minutes

🔧
Fine-tuning et évaluation

Affinez les modÚles et évaluez les performances

🚀
SystĂšmes d'application

Construisez des applications IA réelles

🎹
IA générative

Explorez les modĂšles AIGC open-source

đŸ€–
Agents

Apprenez les frameworks Agent et outils MCP

📐
Fondamentaux supplémentaires

Bases LLM et évaluation

🎓

Claude Académie

đŸ€–
Claude 101

Learn AI basics with Claude

đŸ’»
Claude Code 101

Code with Claude as your pair programmer

đŸ€
Introduction to Claude Cowork

Collaborate with Claude on complex projects

⚙
Claude Platform 101

Build apps with the Claude API

Labo

7 expériences chargées
🧬Bac Ă  sable neuronalđŸ€–IA ou Humain ?đŸ„‹Dojo d'ingĂ©nierie de prompts🏁Course d'algorithmes🧠Quiz IAđŸ—ïžCanevas de conception systĂšme
🎯Entretien simulĂ©Entrer dans le labo→
🚀

Développement de carriÚre

🚀
Rampe de lancement entretien

Commencez votre parcours

🌟
MaĂźtrise comportementale

Maßtrisez les compétences relationnelles

đŸ’»
Entretiens techniques

Réussissez l'épreuve de code

đŸ€–
Entretiens IA et ML

MaĂźtrisez l'entretien ML

🏆
Offre et au-delĂ 

Décrochez la meilleure offre

Commencer
AIUnlimited

Licence MIT

æČȘICP怇18025655ć·-11

Apprendre

  • Bases de l'IA
  • Pratique IA
  • Claude AcadĂ©mie
  • Labo
  • DĂ©veloppement de carriĂšre

Communauté

  • À propos
  • FAQ

Soutien

  • Conditions d'utilisation
  • Politique de confidentialitĂ©
  • Contact
Programmes d'IA et d'ingĂ©nierieâ€șđŸ’» Claude Code 101â€șLeçonsâ€șCode Review
🔍
Claude Code 101 ‱ IntermĂ©diaire⏱ 10 min de lecture

Code Review

Code review

When you give Claude Code a task to complete in your codebase, Claude will often report back in a succinct way. Underneath the description of what Claude changed, there can be a variety of files that were changed (from small to major changes). Oftentimes, the session that wrote the code changes themselves (and explained them) is not the highest-quality judge of those changes. It's a good practice to give every change a look yourself before you keep it, and then have Claude review it again from a clean context, without this session's history.

Review the actual changes

A diff is the before-and-after of a change: the lines removed and the lines added, file by file. The /diff command opens an interactive viewer of your uncommitted changes in that form, and it can also show what each of Claude's turns changed. Use the up and down arrows to move between files and Enter to open one.

/diff

The most important things that deserve a second look every time are:

  • Changes you didn't ask for. A config value that was edited while Claude was in the file or a rewritten helper method that you didn't mention.
  • Tests that got weaker. If the project you're working in contains tests, identify any that were skipped, deleted, or loosened until they passed.
  • New packages and hard-coded values. A dependency that was added for only one function, a URL or a key written straight into the code.

If the whole change is wrong, run /rewind (or press Esc twice on an empty prompt), pick the prompt that produced it, and choose Restore code and conversation. One limit worth knowing: files changed by shell commands Claude ran, such as a package install, aren't rolled back.

Ask for a second opinion

The Explore → Plan → Code → Commit lesson said to have a second reviewer on a change before you commit it. A long session carries everything it has read and decided. That's the context you learned to manage in the previous lesson, and it's exactly the history you don't want in a reviewer. /code-review is that second reviewer: it reviews the change in a clean context, with none of your session's history, and reports what it finds. It edits nothing unless you ask it to.

Leçon 7 sur 120% terminé
←Context Management

Discussion

Se connecter pour rejoindre la discussion

/code-review

The review runs in the background, anywhere from seconds to a few minutes, and counts against your usage like any other task, so save it for changes that deserve a second look. The findings arrive in your conversation when it finishes. You can also ask in plain words, and Claude can start the same review from the request. If Claude answers inline instead of starting a review, run the command yourself.

Review the changes you just made. Report problems; don't fix anything yet.

Decide what to do with each finding

Sort each finding into one of three piles:

  1. Fix now. This is a real problem, it matters, and it must be fixed.
  2. Ask why. This is the pile for findings you can't quite verify or that seem off. It's possible for reviewers that are reading code changes cold to also miss things.
  3. Leave it. This is a real problem but small or inconsequential. These can often be batched into a group of fixes that you'll cover in one future session.

To ask why, quote the finding back to Claude and ask Claude to check again. For the second finding above, you would type:

You reported that isValidEmail doesn't trim spaces, but line 4 calls trim(). Check again and tell me whether the finding stands.

Whenever you ask for a fix, it's good to ask for evidence with it:

Fix the first finding: don't skip the empty-email test and restore the original assertion. Then run the tests and show me the output.

If a fix eventually grows into a large change of its own, run the review again.

When it pays off to review things more closely

A simple, one-line change often needs a quick glance at the diff and nothing else. You should use a human review and a Claude review when a change is bigger than you could hold in your head, when it touches something sensitive or does something destructive, and before you hand the work to a teammate.

Recap

  • Read the actual diff of the file changes before you trust the summary alone. Run /diff and look for changes you didn't ask for, weaker tests, and new packages or hard-coded values.
  • Get a second opinion from a clean context with /code-review (or ask in plain words and let Claude start it). The reviewer reports, and Claude doesn't edit unless you ask.
  • Treat each finding as fix now, ask why, or leave it, and ask for evidence with every fix.