AI code review for AI agents
Double-check the code your agent just wrote.
nitpick sends the diff, the changed files, and the code around them to a different model, and prints findings the agent fixes before opening the PR. One command, or none: hook it into the agent and it reviews each burst of edits in the background.
Paste this into your agent.
The agent follows the nitpick setup skill: it installs the CLI and the plugin, asks for a model key, turns on background review in every workspace, and checks that it works. Claude Code, Codex, Cursor, pi, OpenClaw, OpenCode, and anything that reads Agent Skills.
Set up nitpick for me by following https://raw.githubusercontent.com/LVTD-LLC/nitpick-skills/main/plugins/nitpick/skills/nitpick-setup/SKILL.md
Rather do it yourself?then read the README
How it works
- 01
It packs the change, not just the diff.
The unified diff, the full post-change files, and unchanged code chosen for a reason: definitions the diff uses, call sites of what it changed, the modules it imports, and matching tests. Ranked and trimmed to a token budget in milliseconds.
- 02
It asks a different model, through OpenRouter.
OpenRouter is the default provider, so one key gives nitpick every model there. Pick one with -m, or several at once; findings that agree are merged and marked (2/2 models). Point it at Ollama or llama.cpp instead and nothing leaves your machine.
- 03
It returns findings with an exit code.
Each finding cites path:line in the post-change file with a severity, a category, and a suggestion. Exit 1 when anything is at or above --fail-on (high by default), so the agent fixes, reruns, and only opens the PR at exit 0.
- 04
Or it watches, and the agent never runs anything.
nitpick watch hooks into Claude Code, Codex, Cursor, pi, OpenCode or OpenClaw. With global hooks installed, each workspace gets a background worker that reviews only what changed since it last looked; findings reach the agent as a [nitpick] note after its next tool call, and the stop hook returns immediately while reviews continue. Blocking on high or blocker findings is opt-in. It also watches source files in plain folders without Git, sending changed source files without related repository context. A review that could not run is logged, not reported as a failure, so free models are fine here.
export NITPICK_OPENROUTER_API_KEY=sk-or-…works for terminal sessions. For GUI background hooks, configure api_key in ~/.config/nitpick/config.toml with owner-only permissions (chmod 600). Get a key at openrouter.ai; models are billed per token, and several are free.
What it looks like
Real recordings against a branch of nitpick's own repo, with two one-line bugs planted in it. Scrub the timelines or just read the final screens.
Review the working tree
The default. Progress on stderr, the review on stdout. This repo's .nitpick.toml names two models, so both run and their findings are merged.
See what would be sent
No model call. The stats show what the payload costs in tokens; the tags list every file and snippet with the reason it was included.
Get it as JSON
The same review as one object: verdict, findings with file and line, per-model summaries, token counts and cost. Built for the agent, not the human.
More commands
nitpick --staged- only what is staged
nitpick --base develop- diff against another branch
nitpick src/api/- limit the review to some paths
nitpick -m openai/gpt-5.5 -m anthropic/claude-opus-5-5- two models in parallel, findings merged
nitpick -f "Focus on the SQL."- extra instructions for this run
nitpick --fail-on medium- stricter exit code
nitpick --provider ollama -m qwen3-coder:30b- local model, no key
nitpick init- write a starter .nitpick.toml
nitpick watch install codex --global- background review in every repo (Claude Code: the plugin does this)
nitpick watch status- is it on, what is waiting, what it found
nitpick watch log- every background finding so far