Claude Code Diff Review
Four keyboard shortcuts gate every file change Claude Code proposes: y, n, d, and e.
Problem: Claude Code just told you it made changes and you have no idea which files moved, what the diff looks like, or how to ask for output in the shape you actually want.
Quick Win: The moment a proposed change appears, press d. The whole diff shows up on screen before a single byte hits disk:
# Claude shows a proposed edit
# Press these keys to control what happens:
y - accept the change
n - reject and continue
d - show full diff
e - edit the change before acceptingUnderstanding: Files get written by Claude Code itself through built-in tools. Every modification runs through an approval step that puts the exact change in front of you first.
How File Output Works in Claude Code
Copy-paste code is not what Claude Code does. It touches your filesystem directly, using two tools:
Write: Spins up new files or overwrites old ones from scratch Edit: Changes a targeted slice of an existing file
A proposed change always shows up as a preview before it fires:
Claude wants to edit src/utils/auth.ts:
- const TOKEN_EXPIRY = 3600;
+ const TOKEN_EXPIRY = 7200;Every line in the diff is explicit about what's happening to it. The - lines are being removed from the file. The + lines are going in where the old ones used to live.
Accept, Reject, and the Approval Loop
Nothing gets written without your yes. That approval step is the safety model:
# Claude proposes creating a new file
Claude wants to write to src/components/Button.tsx
# Your options:
y Accept this change
n Reject and tell Claude why
d View full diff (for edits)
e Edit before accepting
Esc Abort current operationFor changes you already trust, Shift+Tab flips on auto-accept mode. Claude stops asking per file and just keeps moving.
Multi-File Operations
One file at a time is the rhythm, but context carries from file to file. Ask for a whole feature and watch the sequence play out:
claude "create a user authentication system with login, register, and password reset"
# Claude will:
# 1. Create src/auth/login.ts
# 2. Create src/auth/register.ts
# 3. Create src/auth/password-reset.ts
# 4. Update src/routes/index.ts to include new routes
# Each file prompts for approval (unless auto-accept is on)Here's where the continuity pays off. What Claude wrote into file one stays in memory while it builds file two. Imports align. Type references match. Function signatures hold the same shape from one file to the next.
Asking for a Specific Output Format
Markdown is the default shape. Your prompt is what changes it:
# Get structured data
claude "list all API endpoints in this project as a markdown table"
# Get code blocks with syntax highlighting
claude "show me the database schema as SQL"
# Get step-by-step output
claude "explain the authentication flow as a numbered list"Need code to read without committing it to disk? Plan mode is the call. Claude thinks out loud and suggests, but never writes.
Handling Large Outputs
Big outputs stream straight into your terminal. For heavy codebases or long-running jobs, pipe the result somewhere useful:
# Redirect output to a file for later review
claude "analyze all TODO comments in this project" > todos.md
# Pipe to other tools
claude "list dependencies that need updates" | grep "security"Output Situations You'll Hit
Wrong file got touched: Hit n, then tell Claude what you actually meant. The fix lands inside the same session and the next attempt reflects the feedback.
Diff too big to scan: Hit d for the full view, or push the work into smaller chunks: "make this change in smaller steps."
Code without a write: Start the prompt with "show me" or "explain," not "create" or "add." Claude replies inline and the write workflow stays dormant.
Undo a change: Hit Esc twice to reach checkpoints. A snapshot gets taken before each edit, so rewinding is always on the table.
Verify the Change Worked
Acceptance is not the finish line. Verify that the change actually holds together:
# Check the file exists and looks right
cat src/components/Button.tsx
# Run your build to catch issues
npm run build
# Test the changes
npm testNext Steps
Round out the rest of the Claude Code workflow:
- Tune permissions so your accept/reject loop runs smoother
- Pick up planning modes to see changes before any commit
- Wire up feedback loops and tighten your iteration cycle
- Dig into context management for the heavier outputs
- Reach for troubleshooting when outputs come back broken
Remember: Claude Code does not hand you snippets to paste yourself. Think of it as a file-writing agent that answers to your approval on every edit. Once that clicks, the whole interaction pattern looks different. If you want formatting to ride along automatically, ClaudeFast's Code Kit ships a FormatterHook that runs Prettier after each Write or Edit. What Claude produces already lines up with your project style.
Stop configuring. Start building.