Review your code changes before committing. Catch security vulnerabilities, performance issues, and bugs before they reach the remote repository.
# .git-ai-review.yaml
model: claude-3-sonnet
# Review rules
rules:
security:
enabled: true
severity: block # block | warn | ignore
performance:
enabled: true
severity: warn
style:
enabled: false
# File filtering
include:
- "src/**/*.{ts,tsx,js,jsx}"
- "lib/**/*.py"
exclude:
- "**/*.test.ts"
- "**/dist/**"Detect hardcoded secrets, SQL injection, XSS, and other vulnerabilities
Identify inefficient patterns, memory leaks, and optimization opportunities
Use OpenAI, Claude, or local Ollama models for privacy-sensitive code
Inspired by Reddit r/coolgithubprojects
Related tools: Husky • pre-commit
Review staged changes before commit to catch security issues, destructive patterns, debug leftovers, and other quality risks earlier in the workflow. This page is built for people who want a fast path to a working result, not a vague prompt-and-pray workflow. If you need a more reliable first draft, cleaner output, or a repeatable workflow you can hand to a teammate, Git Pre-Commit AI Review is designed to shorten that path.
Most visitors use Git Pre-Commit AI Review because they need something specific done now: a deliverable, a decision, or a workflow checkpoint. The sections below show the fastest way to get value from the tool and the adjacent pages that help you keep going.
Use it before committing code when you want a faster risk screen than waiting for CI or teammate review.
Helpful for developers who want a lightweight pre-commit review step without a full external review cycle.
Catch risky changes before they land in history
Reduce noisy CI failures and early review churn
Screen staged diffs for obvious high-risk patterns before commit
A strong outcome from Git Pre-Commit AI Review is not just “some output.” It should be usable with minimal cleanup, aligned to the task you opened the page for, and specific enough that you can paste it into the next step of your workflow without rewriting everything from scratch.
If the first pass feels too generic, use the use cases, FAQs, and related pages here to tighten the scope. That usually produces better results faster than starting over in a blank chat.