DEV Community

Cover image for LLM Code Reviews on pre-commit : A Solo Dev’s New Best Friend?
Franck LEBAS
Franck LEBAS

Posted on

LLM Code Reviews on pre-commit : A Solo Dev’s New Best Friend?

Hi, Franck here 🎤

As a solo developer, I write a lot of code alone. The problem ? I’m terrible at reviewing my own work. I always think “it looks good enough”… until I spot a dumb bug two days later.
I got tired of shipping code with blind spots. So I built a small open-source tool:

llm-review-framework

LLM-powered code review as a pre-commit hook. Works with any LLM provider, any project.

Install

curl -fsSL https://raw.githubusercontent.com/francklebas/llm-review-framework/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Setup a project

cd your-project
llmfwk init
Enter fullscreen mode Exit fullscreen mode

The interactive setup will:

  1. Ask which LLM provider to use (Gemini, Ollama, Claude, OpenAI, Mistral, Groq, GitHub Copilot, or custom)
  2. Check if the provider CLI is installed (and offer to install it)
  3. Let you pick a model
  4. Check if pre-commit is installed (and offer to install it)
  5. Optionally create project-specific prompts from templates
  6. Write .llm-review.yaml and .pre-commit-config.yaml

How it works

On every commit, the llm-codereview hook:

  1. Reads your .llm-review.yaml config
  2. Gets the staged diff
  3. Loads review prompts (project-specific or base defaults)
  4. Sends everything to your LLM provider
  5. Outputs a markdown code review

The output is readable by you and exploitable by the LLM in your editor (Claude Code, opencode, Cursor, etc.).

Prompts

Base prompts (built-in)

If you skip project-specific prompts during llmfwk

It turns any LLM into a pre-commit code reviewer that runs automatically on every git commit.

Why I Needed This ?

In a team, you open a PR and get feedback.
As a solo dev, you’re on your own. Self-review checklists quickly become wishful thinking.
I wanted something simple that:

  • Gives honest, consistent feedback
  • Runs locally or with any provider
  • Doesn’t slow me down
  • Doesn’t assume my code is perfect (spoiler: it never is)

How It Works (Really Simple)

  1. Install it once:
curl -fsSL https://raw.githubusercontent.com/francklebas/llm-review-framework/main/install.sh | bash

Enter fullscreen mode Exit fullscreen mode
  1. In any project, run:
llmfwk init
Enter fullscreen mode Exit fullscreen mode

A quick interactive wizard asks:
Which LLM do you want ? (Ollama, Gemini, Claude, Groq, OpenAI, Mistral, Copilot, or custom)
Which model ?
It sets up the pre-commit hook for you ! 🎉

And... that’s it.
From now on, every commit triggers a review. The tool grabs your staged changes, sends them to your LLM with solid prompts (SOLID, security, anti-patterns, error handling, etc.), and shows you a clean Markdown review in the terminal.

Voir un exemple de review générée
### Review of `auth.py`
- **Security**: The hardcoded API key on line 42 should be moved to an environment variable.
- **Style**: Function `login_user` is too long, consider refactoring.
Enter fullscreen mode Exit fullscreen mode

If something looks off — you fix it and commit again.

Make It Understand Your Project

You can add two files to give it context (the context project is in the parent directory) :

codereview-context.md → your stack, architecture choices, naming rules
codereview-guidelines.md → what you care about most in this project

The LLM then reviews your code like someone who actually knows your codebase.

Why I Like It

  • Works completely locally with Ollama → zero cost, zero data leak...
  • Super fast with Groq when I’m in a hurry
  • Fully customizable
  • AGPL-3.0 and 100% FOSS

It’s not magic, and it won’t replace human review when you have teammates. But for solo work, it’s a game-changer: I now commit with much more confidence.

Try It

Go to the repo:

Tester llm-review-framework sur GitHub 🚀

Run the install, do llmfwk init in one of your projects, and make a small change + commit. You’ll see the difference immediately.

I’d love to hear what you think, especially if you’re also a solo dev fighting the same problem.
What’s your current trick to avoid shipping "mediocre" code alone ?

Happy coding (and reviewed commits)! 🚀😁

Top comments (0)