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 warn
- Snyk pass
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.5 | $0.00014 | $0.00255 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (376 stars, last pushed 8mo ago), licensed MIT. It adds 35 tokens to every session and 638 once invoked, about $0.0001 per session on Opus 5.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.
git-hooks-setup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| git-hooks-setupaj-geddes/useful-ai-prompts | Skill | 376 | 8mo ago | MIT | A | 35 | Claude Code, Codex |
| create-prprisma/orm | Skill | 48k | yesterday | Apache-2.0 | A | 48 | Claude Code, Codex |
| git-commitThinkInAIXYZ/deepchat | Skill | 6.4k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |
| repo-syncdavidondrej/skills | Skill | 4.3k | 3d ago | MIT | A | 25 | Claude Code, Codex |
| engineer-bot-opsmakecindy/cindy | Skill | 9.3k | yesterday | Apache-2.0 | A | 57 | Claude Code, Codex |
| mcore-split-prNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 25 | Claude Code |
| git-commit-writermergisi/awesome-openclaw-agents | Skill | 4.1k | 2d ago | MIT | A | 53 | Claude Code, Codex |