Skip to main content
Claude Code tips · Lesson 14 of 14 · 12 min

Claude Code Lab for a Reviewable Diff

Write a focused Claude Code brief, edit one bilingual label in a practice checkout, and verify the diff against real repository checks and both routes.

By Matthews WongReviewed on Checked against Claude Code v2.1.301

Key takeaway

A reviewable Claude Code diff changes one observable behaviour and gives a reviewer a short way to reproduce it. In this lab you update one bilingual UI label, verify message key parity and inspect the route in both languages. You finish with the exact file paths and a repeatable acceptance check.

You will be able to

  • Write an agent brief that ties one edit to visible outcomes.
  • Show the bilingual diff and the independent verification.
Watch it work

Step through the diagram

Press Play, or step with the arrows. Every step is written out below the diagram.

Claude Code Lab for a Reviewable Diff

A reviewable Claude Code diff changes one observable behaviour and gives a reviewer a short way to reproduce it. In this lab you update one bilingual UI label, verify message key parity and inspect the route in both languages. You finish with the exact file paths and a repeatable acceptance check.

Reviewed on 3 December 2026 · Claude Code v2.1.301

Step 1 of 5. Use an existing string shown on a named route. Record the exact before and after text in both languages.

Keys: ← → step · Home / End · K play or pause

  1. Use an existing string shown on a named route. Record the exact before and after text in both languages.

  2. Follow the key from the messages to the component. Identify shared uses before changing the string.

  3. The diff should explain one requested behaviour in both locale files. Check for edits outside the task.

    Predict the next step Which evidence proves both readers see the new copy? (An updated English file · The new labels visible in both routes · A green Git status)
  4. Use key parity for structure and the browser for the reader’s experience.

  5. Keep both route results and the command outcome beside the diff.

Make the behaviour observable

Ask for a copy change to the blog’s Key takeaway label. Keep the existing message key common.keyTakeawayLabel and identify at least one blog route that renders it. Record that the change affects every post using that label.

Read more (1)

Tell Claude Code to inspect references before editing. Keep both language edits in one patch so the reviewer sees how the new label translates.

Get evidence from the route

The message parity script verifies key structure. An unchanged key can pass even if one locale still displays its previous words. Open the same blog slug under /en and /id and inspect the callout at the start of each article.

How this site does it

The real config behind this lesson

Excerpts from the repository that builds and deploys this website, quoted as they are.

package.json
    "messages:check": "node scripts/check-message-keys.mjs",

This script provides independent key parity evidence. The experiment also verifies the actual words in each browser route.

What breaks

Mistakes that cost real time

  • Only one language changed

    Retain the existing key and update the actual Indonesian and English values. Reopen both routes even when the parity check passed.

  • A shared label changed more routes than expected

    Trace where the key is used and decide if the task calls for a global edit or a separate route-specific key.

Try it yourself

Do it on your own machine

Use a practice checkout where both language files are available.

  1. Start a lab branch and inspect its starting state.

    git switch -c lab/reviewable-diff
    git status --short
  2. In Claude Code, ask to set common.keyTakeawayLabel to “What to remember” and “Yang perlu diingat”. Have it report callers before editing.

  3. Check the key tree and the diff. Then open the linked Codex comparison under /en and /id and inspect the new label.

    npm run messages:check
    git diff -- messages/en.json messages/id.json
    npm run dev
Quick quiz

Three questions before you move on

Pick an answer to see why it is right or wrong. Nothing is graded, so guess freely; a miss is kept in this browser so the course can ask it again later.

  1. 1.Which evidence proves both readers see the new copy?
  2. 2.What should you check before a shared copy edit?
  3. 3.What does key parity establish?
From earlier lessons

Two questions from earlier lessons

Recalling an older lesson after a gap is what makes it stick. Answer from memory before you look anything up.

  1. 1.Which of these can a team rely on to stop pushes to main?
  2. 2.The project file lists one permissions.allow rule and your user file lists a different one. Which rules apply in that project?

From: 13. Claude Code Git Workflow: Safe Commits, PRs and Push Rules · 11. Claude Code Settings Scopes: Which File Wins, What Is Shared

Think it through

Answer in your head, then check

  1. 1.What should you check before a shared copy edit?Show the answer

    Answer:A shared key can change several routes, so use its callers to establish the scope.

  2. 2.What does key parity establish?Show the answer

    Answer:The structural check verifies the presence of keys. Browser evidence shows how the translated text renders.

Go deeper

Related deep dives on this site

Sources

Primary sources checked on the research date. Follow them for the current version.