Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tmolavi/mcp-agent-skills-hub --skill git-hooks-automationgit clone --depth 1 https://github.com/tmolavi/mcp-agent-skills-hubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/git-hooks-automation)<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/git-hooks-automation"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/git-hooks-automation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/git-hooks-automation"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/git-hooks-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.03375 |
| Opus 5 | $0.00023 | $0.01688 |
| Sonnet 5 | $0.00009 | $0.00675 |
| Haiku 4.5 | $0.00005 | $0.00337 |
Grade C, and why
git-hooks-automation scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf .husky This is a copy
91% identical to git-hooks-automation — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 422 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Hooks Automation
Automate code quality enforcement at the Git level. Set up hooks that lint, format, test, and validate before commits and pushes ever reach your CI pipeline — catching issues in seconds instead of minutes.
When to Use This Skill
- User asks to "set up git hooks" or "add pre-commit hooks"
- Configuring Husky, lint-staged, or the pre-commit framework
- Enforcing commit message conventions (Conventional Commits, commitlint)
- Automating linting, formatting, or type-checking before commits
- Setting up pre-push hooks for test runners
- Migrating from Husky v4 to v9+ or adopting hooks from scratch
- User mentions "pre-commit", "commit-msg", "pre-push", "lint-staged", or "githooks"
Git Hooks Fundamentals
Git hooks are scripts that run automatically at specific points in the Git workflow. They live in .git/hooks/ and are not version-controlled by default — which is why tools like Husky exist.
Hook Types & When They Fire
| Hook | Fires When | Common Use |
|---|---|---|
pre-commit |
Before commit is created | Lint, format, type-check staged files |
prepare-commit-msg |
After default msg, before editor | Auto-populate commit templates |
commit-msg |
After user writes commit message | Enforce commit message format |
post-commit |
After commit is created | Notifications, logging |
pre-push |
Before push to remote | Run tests, check branch policies |
pre-rebase |
Before rebase starts | Prevent rebase on protected branches |
post-merge |
After merge completes | Install deps, run migrations |
post-checkout |
After checkout/switch | Install deps, rebuild assets |
Native Git Hooks (No Framework)
# Create a pre-commit hook manually
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/sh
set -e
# Run linter on staged files only
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|ts|jsx|tsx)$' || true)
if [ -n "$STAGED_FILES" ]; then
echo "🔍 Linting staged files..."
echo "$STAGED_FILES" | xargs npx eslint --fix
echo "$STAGED_FILES" | xargs git add # Re-stage after fixes
fi
EOF
chmod +x .git/hooks/pre-commit
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 422 lines · 46 tokens per session scan C d4ee40c36937
git-hooks-automation is a skill published in the GitHub repository tmolavi/mcp-agent-skills-hub (8 stars, last pushed 15d ago), licensed MIT. It adds 46 tokens to every session and 3,375 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). It is 91% identical to git-hooks-automation, differing in 5 lines, and is treated as a copy.
Other skills, from other repositories
gate
MANDATORY before every commit and push. All gates must pass — Gates 1–3 always run; Gates 4 (Docker) and 5 (Cloud) run only when applicable. Do NOT proceed if any gate fails — fix the issue first.
merge-check
Xcode-specific pre-merge gate — archive build (catches strict-concurrency/MainActor errors debug builds miss), app-extension Info.plist check, SwiftLint — spawned in parallel. Trigger on Apple/Xcode merge intent specifically ("merge this iOS branch", "archive check before merge", "is this ready for TestFlight"); a…
github
Manages all git operations (commit, push, branch management, PR creation) in a standardized, safe, and consistent way. Automatically runs the code-review skill before any commit. Enforces Conventional Commits standard. Handles the full lifecycle: branch → review → commit → push → PR.
Git Conventional Commits
Git commit message and branch naming standards following Conventional Commits format. / TR: Git commit mesajları ve branch isimlendirme standartlarını belirler. Conventional Commits kurallarını uygular.
commit
Detect the repo's commit convention (Conventional Commits, Gitmoji, or a custom template) and create commits. Use when asked to commit, write a commit message, stage and commit changes, or commit and push work.
git-orchestrator
Git orchestrator managing commit standards, issue triage, PR code reviews, and repo rules. / TR: Git süreçlerini, commit standartlarını, issue ve PR yönetimini, repo kurallarını yöneten ana orkestratör.