AI Git Hooks — AI skill for Claude Code
AI-powered git hooks - auto-review diffs, generate commit messages, scan for secrets.
How to install AI Git Hooks
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Sagargupta16/ai-git-hooks and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AI Git Hooks does
AI-powered git hooks - auto-review diffs, generate commit messages, scan for secrets. Supports Claude, OpenAI, and Ollama
Alternatives in AI
- Claudekit — by Carl Rannaberg - Impressive CLI toolkit providing auto-save checkpointing, code quality hooks, specificatio 633 ★
- Commit Claude Config — Version the Solana AI Kit config in git (un-ignores .claude/, CLAUDE.md, .mcp.json, .gitmodules and commits th 98 ★
- Sloppy — Static analysis for the debt AI agents leave in PHP: 25 rules, Claude Code hooks, git-diff review, a Rector an 84 ★
README
AI Git Hooks
   
AI-powered git hooks that review your code, generate commit messages, catch bugs, and scan for security issues - before you push.
Drop-in git hooks that use AI (Claude, OpenAI, Ollama) to automate code quality checks at every stage of your git workflow.
Hooks
| Hook | Description | Trigger |
|---|---|---|
| AI Code Review | Reviews staged changes for bugs, style issues, and anti-patterns | pre-commit |
| Commit Message Generator | Auto-generates conventional commit messages from your diff | prepare-commit-msg |
| Commit Message Validator | Validates commit messages follow conventions | commit-msg |
| Pre-Push Security Scan | Scans for secrets, vulnerabilities, and large files | pre-push |
Quick Start
1. Install
git clone https://github.com/Sagargupta16/ai-git-hooks.git
cd ai-git-hooks
./scripts/install.sh
2. Configure
Create `.ai-hooks.yml` in your project root:
provider: claude # claude | openai | ollama
model: claude-sonnet-5 # model to use
hooks:
pre-commit:
enabled: true
severity: warn # error | warn | info
max_files: 20
ignore:
- "*.lock"
- "*.min.js"
- "dist/**"
prepare-commit-msg:
enabled: true
style: conventional # conventional | simple | detailed
ticket_prefix: true # auto-detect ticket from branch name
commit-msg:
enabled: true
convention: conventional
max_lengt
Related Skills
Pbi Commit
Stage all semantic model changes and create a local git commit with an auto-generated business-language messag
Git AI
Stop writing commit messages by hand. AI-powered conventional commits from your staged changes — powered by Cl
Trapscan
Scan a repository for things that execute the moment you open it — editor auto-tasks, devcontainer host comman
Clean Commit Skill
Keep AI noise out of your git history. A cross-platform agent skill that blocks Co-Authored-By bots, generator
Bespoke AI VSCode Ext
✍️ AI autocomplete for natural language and code, plus one-click commit messages — powered by Claude Code
Claude Code Flash
Cut Claude Code token usage: hooks, Sonnet/Opus subagents, orchestration rules and /review + /task commands th
Related Agents
Secret Guard
MUST be used whenever the user asks to scan for secrets, API keys, credentials, or tokens before a commit or i
Secret Purist
The paranoid sentinel of credential security. Use this agent to scan codebases and git history for leaked secr
Hardcoded Secret Scanner
Scan a trading codebase for credentials that live in code, config committed to git, logs, tests, or documentat