Git Hooks Skill When to Activate Activate this skill when: - Setting up pre-commit hooks - Configuring commit message validation - Installing secrets scanners - Enforcing code quality standards - Automating pre-push tests Quick Installation Available Hooks Core Hooks (All Projects) | Hook | Purpose | |------|---------| | | Validates conventional commit format | | | Prevents leaked API keys/secrets | Language-Specific | Hook | Language | Checks | |------|----------|--------| | | Python | Black, Ruff | | | JS/TS | Prettier, ESLint, TypeScript | | | Go | gofmt, go vet | | | Mixed | Auto-detects…

)\n\nif [ -n \"$FILES\" ]; then\n # Run your tools\n uv run black --check $FILES || exit 1\n uv run ruff check $FILES || exit 1\nfi\n\nexit 0\n```\n\n## Hook Execution Order\n\n1. **pre-commit** - Before commit (code quality)\n2. **commit-msg** - Validates message format\n3. **post-commit** - After commit (notifications)\n4. **pre-push** - Before push (tests)\n\n## Best Practices\n\n### DO ✅\n- Install secrets scanner on ALL projects\n- Use commit-msg for consistent history\n- Run tests in pre-push\n- Test hooks after installation\n\n### DON'T ❌\n- Skip hooks regularly\n- Disable secrets scanning\n- Ignore hook failures\n- Commit without testing hooks first\n\n## Related Resources\n\nSee `AgentUsage/pre_commit_hooks/` for:\n- `setup_guide.md` - Complete installation guide\n- `examples.md` - Custom hook examples\n- `TROUBLESHOOTING.md` - Common issues\n- Individual hook scripts for reference\n---","attachment_filenames":[],"attachments":[],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Git Hooks Skill","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Activate","type":"text"}]},{"type":"paragraph","content":[{"text":"Activate this skill when:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Setting up pre-commit hooks","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Configuring commit message validation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Installing secrets scanners","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Enforcing code quality standards","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Automating pre-push tests","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Installation","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Use interactive installer (recommended)\n./AgentUsage/pre_commit_hooks/install_hooks.sh\n\n# Or manual installation for Python project\ncp AgentUsage/pre_commit_hooks/commit-msg .git/hooks/\ncp AgentUsage/pre_commit_hooks/pre-commit-python .git/hooks/pre-commit\ncp AgentUsage/pre_commit_hooks/pre-commit-secrets-scanner .git/hooks/pre-commit-secrets\ncp AgentUsage/pre_commit_hooks/pre-push .git/hooks/\nchmod +x .git/hooks/*","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Available Hooks","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Core Hooks (All Projects)","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hook","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"commit-msg","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Validates conventional commit format","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-commit-secrets-scanner","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prevents leaked API keys/secrets","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Language-Specific","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hook","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Language","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Checks","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-commit-python","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Python","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Black, Ruff","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-commit-javascript","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"JS/TS","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prettier, ESLint, TypeScript","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-commit-go","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Go","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"gofmt, go vet","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-commit-multi-language","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Mixed","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Auto-detects and runs appropriate tools","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Automation Hooks","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hook","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pre-push","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Runs tests before push","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"post-checkout","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Auto-updates dependencies on branch switch","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"post-commit","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shows commit summary and TODOs","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Hook Selection by Project","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Python Project\ncommit-msg + pre-commit-python + pre-commit-secrets-scanner + pre-push\n\n# JavaScript Project\ncommit-msg + pre-commit-javascript + pre-commit-secrets-scanner + pre-push\n\n# Go Project\ncommit-msg + pre-commit-go + pre-commit-secrets-scanner + pre-push\n\n# Multi-language\ncommit-msg + pre-commit-multi-language + pre-commit-secrets-scanner + pre-push","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"What Each Hook Does","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"commit-msg","type":"text"}]},{"type":"paragraph","content":[{"text":"Validates commit message format:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Accepted formats\nfeat: Add user authentication\nfix: Correct validation error\ndocs(readme): Update installation\n\n# Rejected\nUpdate files # No type\nfeat add feature # Missing colon","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"pre-commit-secrets-scanner","type":"text"}]},{"type":"paragraph","content":[{"text":"Scans for exposed secrets:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Anthropic API keys (","type":"text"},{"text":"sk-ant-...","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"OpenAI API keys (","type":"text"},{"text":"sk-...","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"AWS credentials (","type":"text"},{"text":"AKIA...","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"GitHub tokens (","type":"text"},{"text":"ghp_...","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Hardcoded passwords","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"pre-commit-python","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Runs automatically on staged .py files\nuv run black --check $file\nuv run ruff check $file","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"pre-push","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Runs before push\nuv run pytest tests/ # or pnpm test, go test, cargo test","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Testing Hooks","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Test pre-commit directly\n.git/hooks/pre-commit\n\n# Test with sample commit\ngit add .\ngit commit -m \"test: verify hooks\"\n\n# Run with debug output\nbash -x .git/hooks/pre-commit","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Bypassing Hooks (Emergency Only)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Skip all hooks\ngit commit --no-verify -m \"Emergency fix\"\n\n# Only use when:\n# - Emergency production fixes\n# - Hook malfunction\n# - Intentional override","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Troubleshooting","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Hook Not Running","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Check existence\nls -l .git/hooks/\n\n# Fix permissions\nchmod +x .git/hooks/*\n\n# Check syntax\nbash -n .git/hooks/pre-commit","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Permission Denied","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"chmod +x .git/hooks/*","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Failed Quality Checks","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Run tools manually\nuv run black --check .\nuv run ruff check .\n\n# Fix issues\nuv run black .\nuv run ruff check --fix .\n\n# Retry commit\ngit commit -m \"Your message\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Missing Tools","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Install code quality tools\nuv add --dev black ruff\n\n# Verify installation\nwhich black\nuv run black --version","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Custom Hook Configuration","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Modify pre-commit for Your Project","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"#!/bin/bash\n# .git/hooks/pre-commit\n\n# Get staged Python files\nFILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.py

Git Hooks Skill When to Activate Activate this skill when: - Setting up pre-commit hooks - Configuring commit message validation - Installing secrets scanners - Enforcing code quality standards - Automating pre-push tests Quick Installation Available Hooks Core Hooks (All Projects) | Hook | Purpose | |------|---------| | | Validates conventional commit format | | | Prevents leaked API keys/secrets | Language-Specific | Hook | Language | Checks | |------|----------|--------| | | Python | Black, Ruff | | | JS/TS | Prettier, ESLint, TypeScript | | | Go | gofmt, go vet | | | Mixed | Auto-detects…

)\n\nif [ -n \"$FILES\" ]; then\n # Run your tools\n uv run black --check $FILES || exit 1\n uv run ruff check $FILES || exit 1\nfi\n\nexit 0","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Hook Execution Order","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"pre-commit","type":"text","marks":[{"type":"strong"}]},{"text":" - Before commit (code quality)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"commit-msg","type":"text","marks":[{"type":"strong"}]},{"text":" - Validates message format","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"post-commit","type":"text","marks":[{"type":"strong"}]},{"text":" - After commit (notifications)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"pre-push","type":"text","marks":[{"type":"strong"}]},{"text":" - Before push (tests)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Best Practices","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"DO ✅","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Install secrets scanner on ALL projects","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use commit-msg for consistent history","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run tests in pre-push","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test hooks after installation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"DON'T ❌","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Skip hooks regularly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Disable secrets scanning","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ignore hook failures","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Commit without testing hooks first","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Related Resources","type":"text"}]},{"type":"paragraph","content":[{"text":"See ","type":"text"},{"text":"AgentUsage/pre_commit_hooks/","type":"text","marks":[{"type":"code_inline"}]},{"text":" for:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"setup_guide.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Complete installation guide","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"examples.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Custom hook examples","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"TROUBLESHOOTING.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Common issues","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Individual hook scripts for reference","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"git-hooks","author":"@skillopedia","source":{"stars":5,"repo_name":"groveengine","origin_url":"https://github.com/autumnsgrove/groveengine/blob/HEAD/.claude/skills/git-hooks/SKILL.md","repo_owner":"autumnsgrove","body_sha256":"abf52b45b760b0eb816280e6f7a076c5682841cee1b353d337061b020db8b3df","cluster_key":"0a059888a18e17c26ff83467ec8e1b1f71f8db54fc17a2b268aa277165536f83","clean_bundle":{"format":"clean-skill-bundle-v1","source":"autumnsgrove/groveengine/.claude/skills/git-hooks/SKILL.md","bundle_sha256":"a5da97a0ffbf65faceb544e653801a9500056bcc93f79866c6aa7f8ec54ed9a1","attachment_count":0,"text_attachments":0,"binary_attachments":0},"cluster_size":1,"skill_md_path":".claude/skills/git-hooks/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"software-engineering","category_label":"Engineering"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"software-engineering","import_tag":"clean-skills-v1","description":"Set up and configure Git pre-commit hooks for code quality, secrets scanning, and commit message validation. Use when installing git hooks, configuring pre-commit checks, or enforcing code standards."}},"renderedAt":1782979401200}

Git Hooks Skill When to Activate Activate this skill when: - Setting up pre-commit hooks - Configuring commit message validation - Installing secrets scanners - Enforcing code quality standards - Automating pre-push tests Quick Installation Available Hooks Core Hooks (All Projects) | Hook | Purpose | |------|---------| | | Validates conventional commit format | | | Prevents leaked API keys/secrets | Language-Specific | Hook | Language | Checks | |------|----------|--------| | | Python | Black, Ruff | | | JS/TS | Prettier, ESLint, TypeScript | | | Go | gofmt, go vet | | | Mixed | Auto-detects…