What problem does it solve?
It prevents broken code, test regressions, and accidental secrets from being committed by running staged-file checks before a commit is finalized.
Core Features & Use Cases
- Staged secrets scan: Detects common secret patterns in staged diffs and stops the commit when a match is found.
- Markdown linting (non-blocking): Flags markdown issues in staged files so they can be cleaned up after the commit if needed.
- Code auditing on staged changes: Reviews only the staged files and reports HIGH severity issues that block the commit.
- Test execution: Runs the project’s available test suite and blocks the commit on test failures.
Use case: Before committing a feature branch that touches multiple files, this gate ensures you don’t accidentally commit an API token in a config or break unit tests.
Quick Start
Run the pre-commit skill in your Claude Code workflow before issuing the commit command so the gate checks staged files and blocks unsafe changes.