Review Your Branch Before Pushing
Two hours heads-down? Before you push, give Claude Code your diff for a second opinion. It reads the whole branch and surfaces what you missed.
how it works
01 / 06
You think you're done.
Two hours of focused work. Thirty lines of diff. It compiles.
02 / 06
You ask Claude to look at it before you push.
Two minutes of someone else's eyes. Free.
03 / 06
Claude reads the full diff against main.
Every changed file, every removed line, every signature change.
04 / 06
Claude flags what you missed.
A leftover console.log. An edge case you skipped. A function whose callers didn't get updated.
05 / 06
You fix what's worth fixing.
Some flags you accept. Some you push back on. Quick.
06 / 06
Clean push.
No 'fix typo' commit five minutes after the PR opens.
The prompt
Use this right before you push. Not after.
What you get back
Read the branch (8 files, 142 lines added, 31 removed). Three things worth your attention, one nit.
Worth fixing
-
services/order/checkout.ts:88— you handlepayment.status === "succeeded"but not"requires_action". Stripe returns that for 3DS flows. Will silently fail for any EU card needing SCA. -
services/order/checkout.ts:142— you renamedprocessRefundtoissueRefundbutapi/webhooks/stripe.ts:67still calls the old name. TypeScript caught it for me but only because I read both files. If callers are dynamic anywhere, this breaks at runtime. -
lib/email/templates.ts:23— leftoverconsole.log("EMAIL DEBUG", payload). I assume that's not meant to ship.
Nit, your call
utils/format.ts:14 — new formatCurrency helper has no test. The logic looks right by inspection but currency formatting has nasty locale edge cases (CHF, JPY without decimals). Worth a one-line test.
Nothing else jumped out. The Stripe webhook simplification looks intentional and clean. Push when you're ready.
Variations
Same shape, small twists.
Click a violet field and type your own details, then copy.
Tips and gotchas
Give it the PR description if you have one. Context changes what counts as missing. A "fix typo" PR shouldn't get the full edge-case treatment.
Demand line numbers. "There might be a race condition somewhere" is noise. "Race condition at checkout.ts:88 because X" is signal.
Don't ask it to write the missing tests in this pass. Review first, fix second. Mixing the two phases makes the review messier and the fixes sloppier.
Ready to try?
New guides, when they ship
One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.
Or read Product Field Notes, the Substack
