What problem does it solve?
This Skill resolves common pain points of misconfigured pre-commit hooks: slow commits that disrupt developer flow, false positive failures blocking work on unrelated changes, full-git-history scans surfacing issues from remote branches, and missing enforcement of critical code quality and security checks.
Core Features & Use Cases
- Hook Authoring Decision Tree: Guides selection between pre-commit and pre-push stages based on runtime, scope, and enforcement timing requirements.
- Staged-Scope Invariant Enforcement: Prevents full-history scans that cause false positives, with concrete corrected examples for TruffleHog, gitleaks, and detect-secrets.
- Performance Tier Placement: Groups hooks into fast (<2s), file-scoped (<10s), and pre-push tiers to keep commit latency low.
- Audit Patterns & Checklists: Provides grep commands and step-by-step validation for .pre-commit-config.yaml files to catch unpinned refs, missing stages, inline configs, and silent-skip wrappers.
- Common Gotchas Reference: Documents high-impact failure modes including formatter-breaking suppression pragmas, infinite recursion from nested pre-commit runs, and directory-walking validators that violate staged scope.
- Use Case: A team experiencing 30-second pre-commit runs can use this Skill to reclassify slow dependency audits to pre-push, scope secret scanners to staged files only, and eliminate silent-skip wrappers that provide zero enforcement.
Quick Start
Use the pre-commit-authoring skill to audit your existing .pre-commit-config.yaml file and identify hooks that scan full git history, lack explicit stage assignments, or use silent-skip wrappers that provide no enforcement.