Back to the blog
Code reviewSeptember 22, 20268 min read

Pre-Push Code Review: catch bugs before the Pull Request even exists

The cheapest bug is the one that never reaches a PR. CodeCrab reviews your local changes with your repo's own profile and skills, so you push higher-quality code the first time.

You finish your work locally, everything looks ready, so you push and open the Pull Request. And then the loop starts: a few comments trickle in — some about real bugs, many about small things that could have been caught before you pushed. Each round means fixing locally, committing again, pushing again, re-requesting review, and often pinging a reviewer internally just so they notice the update.

Every one of those round trips is slow, and worse, it blocks the whole team: your PR sits in review, your reviewer's attention is split, and work that could have been merged today ships tomorrow. A lot of that friction is avoidable — and that is exactly what the Pre-Push Code Review in CodeCrab is for.

CodeCrab reviewing local changes before push, with AI findings and fixes applied before creating the Pull Request
Pre-push review: findings on local changes, investigated and fixed before the PR exists

The problem: bugs are cheapest before they reach a PR

Once a bug is in a Pull Request, the cost multiplies. The reviewer has to find it, describe it, and you have to reproduce it, fix it, and publish again. Every cycle of comment → fix → push → re-review adds hours, sometimes days. The fastest review is the one that never needs to happen: catch the issue while the code is still local, before anyone else sees the diff.

That is what pre-push review does: CodeCrab performs a read-only review of your local changes — before the commit, or right after it — and surfaces problems while the context is still fresh in your head.

What it catches, tuned to your repository

The review is not a generic linter. Because CodeCrab learned your repository's rules and patterns upfront, it reviews along the axes that matter for your project:

  • Correctness — logic flaws, broken edge cases, regressions in behavior.
  • Security — injection risks, unsafe data handling, exposed secrets, auth gaps.
  • Readability & Simplicity — code your teammates will struggle to understand or maintain.
  • Architecture — changes that break layering, leak responsibilities or fight the codebase's structure.
  • Performance — accidental complexity, N+1 patterns, unnecessary work in hot paths.
  • Anything else that is important for your repository — the review profile is yours to define.

Your local skills, combined with CodeCrab

The review runs with the skills you already have — Claude Code, Cursor, and your own custom skills — working together with CodeCrab's review engine. The adaptive profile learned from your repo, your skills, and your criteria all feed the same review. Nothing replaces your workflow: it amplifies it, and the more you customize, the more productive the review becomes. And because everything runs on your machine, your source code never leaves your laptop.

Investigate any finding, deeply

When the review finds a bug or a risky pattern, you don't have to take it at face value. Open the finding and investigate it as deeply as you need — with the stack trace, the code change graph, and diagrams that make the problem visible instead of hypothetical. You understand the issue fast, and along the way you learn things about your codebase you would not have spotted on your own.

From understanding to a ready-to-run fix

Once the problem is clear, CodeCrab gives you a fix prompt ready to hand to Claude Code or Cursor — pre-filled with the relevant files, the intent of the finding and your repository's constraints. It is fully editable: if you disagree with the framing, rewrite it. Your criteria stay in the loop, always.

Read-only today, one-click fix next

Today the pre-push review is read-only: nothing is committed, pushed or published without your explicit approval. The next step is a one-click fix — you approve, and in the background your local model applies the change and runs your full test suite on your machine.

That last part matters more than it sounds. One of the best ways to keep AI-generated code from breaking production is a robust test setup — unit, functional and integration tests. You already have that environment configured locally, because you run it manually every day. Cloud review bots can't touch it; CodeCrab can. Your local Claude Code or Cursor setup can run those tests against every change, so you can iterate on fixes without limits, verify each one, and only push when the code is genuinely ready.

Where this is going

The pre-push review is the foundation for a faster local workflow. On the roadmap: multi-branch and parallel branch support, so you can work on several changes at once, and controlling commit and push directly from the app, fully automated once you approve. The direction is always the same: more speed, more quality, and every decision stays yours.

Try it on your next Pull Request

Free Public Beta — runs 100% on your machine. No code leaving your laptop.

Download CodeCrab