If you're still copy-pasting code snippets one at a time into Claude or ChatGPT for reviews, you're leaving massive productivity on the table.

Last month, I started throwing entire pull requests—full diffs, test files, related modules—into a single prompt. The difference? I stopped getting generic advice about "code quality" and started getting specific, actionable feedback on actual architectural problems in my codebase.

This isn't rocket science. It's just using the tools we have better.

The Old Way (And Why It Sucked)

You'd ask: "Review this function."

AI would say: "Consider adding error handling and type safety."

You'd think: "Cool, thanks, totally unhelpful."

Why? Context. Without seeing:

  • What this function is actually used for
  • What the error cases look like
  • How the surrounding code handles similar problems

...an AI is just following a checklist. It's not reviewing your code. It's reviewing a snippet.

The New Way: Dump Everything

Here's what I started doing:

  1. Pull the full PR diff
   git diff main..feature/my-branch > /tmp/pr.diff

Enter fullscreen mode Exit fullscreen mode

  1. Include related files

    • The test file for this feature
    • Any module imports
    • The types/interfaces being used
  2. Dump it all in one prompt

   Here's a PR for a new authentication system. 

   Context:
   - We're replacing JWT with session-based auth
   - The old code used Redis
   - We're keeping backward compatibility for 30 days

   [full diff here]
   [test file here]
   [schema file here]

   What am I missing? What breaks in production?

Enter fullscreen mode Exit fullscreen mode

  1. Get actual feedback
    • "Your session timeout doesn't account for timezone changes in DST"
    • "You're not invalidating related sessions when a user changes their password"
    • "This migration path will cause issues with concurrent requests"

Real problems. Not templates.

Why Modern LLMs Finally Make This Work

A year ago, context windows were small. Now? Claude has 200K tokens. GPT-4 has 128K. You can fit:

  • A full microservice (10-15 files)
  • Complete test suite
  • Related API endpoints
  • Database schema
  • Architecture diagrams as text

All in one shot.

Plus, models got better at reading code. They're not just pattern-matching against StackOverflow. They understand data flow, state management, and edge cases.

Concrete Example: The Database Migration That Almost Broke

Last week I had a schema migration that dropped a column but kept using it in a view. I almost shipped it.

Instead, I threw at Claude:

  • Current schema
  • New migration
  • The 12 queries that use this view
  • The ORM mapping file
  • Last 6 months of git history for that table

Single prompt: "What breaks if I run this migration on production with 50K active sessions?"

Response: Three specific queries fail. Here's why. Here's how to fix it. Here's the deploy order that doesn't break anything.

I literally prevented an outage. Saved maybe 4 hours of debugging.

How to Set This Up (No Magic)

You don't need special tools. Just:

  1. Get a decent LLM with large context

    • Claude 3.5 (200K tokens) ✅
    • GPT-4o (128K tokens) ✅
    • Llama 2 local (8K tokens) ❌ (too small)
  2. Build a simple script to gather context (optional but useful)

   #!/bin/bash
   # collect-context.sh
   echo "=== Changed Files ===" > /tmp/context.txt
   git diff --name-only main >> /tmp/context.txt

   echo -e "\n=== Full Diff ===" >> /tmp/context.txt
   git diff main >> /tmp/context.txt

   echo -e "\n=== Test Changes ===" >> /tmp/context.txt
   git diff main -- "*.test.ts" >> /tmp/context.txt

   wc -w /tmp/context.txt

Enter fullscreen mode Exit fullscreen mode

  1. Ask better questions
    • Not: "Is this good?"
    • But: "What breaks this? What's the worst case?"

The Gotchas (Real Ones)

Garbage in, garbage out. If your code is messy, the feedback is less useful. I've noticed AI catches way more issues in well-structured code.

Token costs add up. A full PR with context is 15-30K tokens. At $3 per 1M input tokens, you're spending $0.05-0.15 per review. Cheaper than a coffee. But do 50 reviews a day and it matters.

Privacy matters. If you're using cloud AI, you're sending your code to their servers. For open source? Fine. For proprietary stuff? Check your company's policy first.

Still need humans. An AI caught 6 real bugs in my last 10 reviews. But they also suggested 3 changes that looked good but would've broken product logic. You still need judgment.

What I Changed in My Workflow

  • Before: Copy-paste snippets, get generic advice, mostly ignore it
  • Now: Full context dumps, specific feedback, actually implement it

Time spent? Same. Quality? Dramatically better.

My advice: Pick one PR this week and try it. Dump the whole thing. See what happens.

If you're writing about this stuff or want to dive deeper into AI productivity workflows, check out LearnAI Weekly—they send solid real-world examples every week.

What workflows are you using AI for? Hit me up on Twitter or drop a comment below.