You know that moment when you're reviewing a PR and you need to:
Yeah. Let's fix that.
Browser-based code review tools are slow for one simple reason: they're not built for developers who think in terminal commands. You're constantly switching context—reaching for the mouse, squinting at small diffs, waiting for pages to load.
What if your code review tool was just... bash?
There's a trick that changed how I review code. Instead of opening GitHub, I pipe the diff through Claude (or any LLM) and get instant feedback with actual reasoning.
Here's the real command I use:
git diff origin/main..HEAD | curl https://api.anthropic.com/v1/messages \\
-H "x-api-key: $ANTHROPIC_API_KEY" \\
-H "content-type: application/json" \\
-d @- | jq '.content[0].text'
Drop that in a function, add some formatting, and you get structural feedback in seconds instead of 10 minutes of alt-tabbing.
When I used this on a recent refactor, it caught:
Took Claude 3 seconds. I would've spent 15 minutes finding two of those.
Let's say your coworker just pushed this and asked you to review:
function fetchUserData(userId) {
return db.query(`SELECT * FROM users WHERE id = ${userId}`)
.then(data => JSON.stringify(data))
.catch(err => err.message)
}
Running it through the pipeline:
Critical issue: SQL injection vulnerability - userId is interpolated directly
Performance issue: Serializing with JSON.stringify adds latency
Error handling: catching errors as strings means you lose stack traces
Better approach: Use parameterized queries, let DB handle serialization
You can also ask it to explain the fix, not just flag problems. Takes 30 seconds for output that would take you 5 minutes to manually review.
Not hyperbole. I timed it.
Sometimes. The LLM doesn't know your specific codebase patterns without telling it. So add context:
cat ARCHITECTURE.md | cat - <(git diff origin/main) | send_to_claude
Now it understands your patterns first. Way better reviews.
Option 1: Use existing tools
Option 2: DIY (2 hours of work)
review
and call it with review HEAD~5
I went with DIY because my team has specific standards I wanted Claude to enforce.
It's not that the AI is smarter than you. It's that it's consistent and fast. You're not tired after reviewing your 50th PR that day. You're not missing obvious stuff because you've been context-switching for 6 hours.
And the feedback is usually just detailed enough without being overwhelming. Better than some humans I've worked with, not gonna lie.
The next level is semantic analysis—not just "this looks wrong" but "this contradicts the pattern you established in module-x". That's hard without buil them in, actually works.
For now, if you're drowning in PRs, try piping one through Claude. Spend 10 minutes setting it up. You'll save that back in a single review.
Want to stay sharp on AI tools and productivity tricks? Check out LearnAI Weekly—real strategies from people actually using this stuff, not hype.