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 aj-geddes/useful-ai-prompts --skill git-hooks-setupgit clone --depth 1 https://github.com/aj-geddes/useful-ai-promptsWrote 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/aj-geddes/useful-ai-prompts/git-hooks-setup)<a href="https://agentmods.dev/skills/aj-geddes/useful-ai-prompts/git-hooks-setup"><img src="https://agentmods.dev/badge/skills/aj-geddes/useful-ai-prompts/git-hooks-setup/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/aj-geddes/useful-ai-prompts/git-hooks-setup"><img src="https://agentmods.dev/badge/skills/aj-geddes/useful-ai-prompts/git-hooks-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
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.00035 | $0.00638 |
| Opus 5 | $0.00017 | $0.00319 |
| Sonnet 5 | $0.00007 | $0.00128 |
| Haiku 4.5 | $0.00003 | $0.00064 |
Grade A, and why
git-hooks-setup scanned grade A with 0 findings 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 9d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Hooks Setup
Table of Contents
Overview
Configure Git hooks to enforce code quality standards, run automated checks, and prevent problematic commits from being pushed to shared repositories.
When to Use
- Pre-commit code quality checks
- Commit message validation
- Preventing secrets in commits
- Running tests before push
- Code formatting enforcement
- Linting configuration
- Team-wide standards enforcement
Quick Start
Minimal working example:
#!/bin/bash
# setup-husky.sh
# Install Husky
npm install husky --save-dev
# Initialize Husky
npx husky install
# Create pre-commit hook
npx husky add .husky/pre-commit "npm run lint"
# Create commit-msg hook
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
# Create pre-push hook
npx husky add .husky/pre-push "npm run test"
# Create post-merge hook
npx husky add .husky/post-merge "npm install"
Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Husky Installation and Configuration | Husky Installation and Configuration |
| Pre-commit Hook (Node.js) | Pre-commit Hook (Node.js) |
| Commit Message Validation | Commit Message Validation |
| Commitlint Configuration | Commitlint Configuration, Pre-push Hook (Comprehensive) |
| Pre-commit Framework (Python) | Pre-commit Framework (Python) |
| Secret Detection Hook | Secret Detection Hook, Husky in package.json |
Best Practices
✅ DO
- Enforce pre-commit linting and formatting
- Validate commit message format
- Scan for secrets before commit
- Run tests on pre-push
- Skip hooks only with
--no-verify(rarely) - Document hook requirements in README
- Use consistent hook configuration
- Make hooks fast (< 5 seconds)
- Provide helpful error messages
- Allow developers to bypass with clear warnings
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/commit-message-validation.md 846 B
- references/commitlint-configuration.md 724 B
- references/husky-installation-and-configuration.md 515 B
- references/pre-commit-framework-python.md 1.1 KB
- references/pre-commit-hook-nodejs.md 1.1 KB
- references/secret-detection-hook.md 432 B
- scripts/scaffold-tests.sh 574 B runs code
- templates/test-template.js 541 B runs code
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.
- 9d ago First seen · 94 lines · 35 tokens per session scan A 7b50de1946f5
git-hooks-setup is a skill published in the GitHub repository aj-geddes/useful-ai-prompts (338 stars, last pushed 6mo ago), licensed MIT. It adds 35 tokens to every session and 638 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
github-copilot-upgrader
Use this to update the Github Copilot CLI/SDK.
workflow-patterns
Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.
meta-pre-commit-quality-gate
Run three quality gates (ruff + mypy + pytest) in parallel over the staged diff, then arbitrate a single BLOCK/APPROVE verdict. Use before committing changes locally when you want a comprehensive pre-commit gate beyond per-file linting — exactly the same gate set CI enforces.
nw-quality-framework
Quality gates - 11 commit readiness gates, build/test protocol, validation checkpoints, and quality metrics.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
Changelog Test Mapper
Map changelog entries and release notes to affected test cases, ensuring every user-facing change has corresponding test coverage verification.