Use for hooks/, InstallGitHooks, staged check orchestration, or sensitive pattern/allowlist behavior. Not for general CI workflow changes.
Scanned 8/31/2026
Install to Claude Code
npx -y skills add sneivandt/dotfiles --skill git-hooks-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Git Hooks Patterns?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/sneivandt-git-hooks-patterns)More formats (shields.io, HTML) on the badges page.
---
name: git-hooks-patterns
description: >
Use for hooks/, InstallGitHooks, staged check orchestration, or sensitive
pattern/allowlist behavior. Not for general CI workflow changes.
---
# Git Hooks Patterns
## Installation
`InstallGitHooks` discovers extensionless files under `hooks/` through injected
`FileSystemOps` and copies them into `.git/hooks/`. Keep filesystem access out
of applicability checks. Cross-domain dependency wiring belongs in the app
catalog.
## Pre-commit contract
`hooks/pre-commit` is a POSIX `sh` orchestrator:
- `check-sensitive.sh` scans staged diffs.
- `check-rust.sh` runs staged Rust/script checks.
- `check-ci-guards.sh` adds targeted CI parity when
`DOTFILES_HOOKS_FULL=1`.
Keep the hook and its integration test synchronized when adding a helper.
Installed hooks are copies, so rerun install after editing.
## Sensitive patterns
- Detection rules live in `hooks/sensitive-patterns.ini`; safe-span exceptions
live in `hooks/sensitive-allowlist.ini`.
- Patterns and allowlists are extended regular expressions.
- Match contextual indicators, not generic secret-like strings.
- Allowlist only the safe span; the remainder of the line must still be scanned.
- Prefer a narrow allowlist entry to weakening detection or recommending
`--no-verify`.
- Test both directions: the false positive clears and a real secret on the same
line remains detected.
The full hook integration script creates commits and requires a clean scratch
repository; do not run it against a dirty checkout.
Use `shell-patterns` for POSIX conventions and `ci-cd-patterns` when changing CI
parity scope.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!