Workflows
Review a diff
Use Claude to review staged or recent git changes.
Goal
Catch bugs, style issues, and missing tests in a diff before it is merged.
Outcome: A structured review of your changes with concrete improvement suggestions.
Review
BasicSteps
1
Pipe the diff to Claude
Use print mode to review staged changes non-interactively.
git diff --staged | claude -p "review this diff for bugs, style issues, and missing tests"2
Or review interactively
Open a session and ask Claude to review the current diff.
claude "review my staged changes"3
Ask targeted follow-up questions
Dig into specific concerns.
claude "is the error handling in the auth module complete?"4
Review recent commit
Review the last commit instead of staged changes.
git diff HEAD~1 | claude -p "summarize and review these changes"Cautions
- ⚠Claude may miss context-specific requirements — treat output as a first-pass, not a final verdict.