git diff HEAD~1 | claude -p 'Review this diff for bugs and security issues'
Pipe a git diff into Claude for automated code review
Passes the diff of the last commit to Claude for review. Add to a pre-push Git hook to get AI review before every push. The agent reads the diff from stdin and outputs findings. Useful as a first-pass review before human review.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.