pre-commit-setup
Installation
SKILL.md
Pre-commit setup
Wire pre-commit hooks into any git repo. Default to the universal pre-commit framework (works for any language); use Husky + lint-staged for pure-Node repos when the user explicitly asks. Always cover formatting, linting, type-checking (where applicable), secret scanning, and Conventional Commits.
When to use
- The user asked to set up pre-commit hooks, install husky, configure lint-staged, or wire up commit-time checks.
- A new repo is being bootstrapped and you're standardizing the dev experience.
- An existing repo has commit-time issues (secrets leaked, lint fails after merge, large files committed) and the user wants prevention.
- A monorepo or polyglot repo needs a single pre-commit configuration that covers multiple languages.
Skip this skill for: repos that already have a working pre-commit configuration the user is happy with (touch only with explicit ask), build-time CI checks (those belong in CI, not pre-commit), or pre-push hooks (different lifecycle).
Required outcome
After this runs, a fresh git commit in the repo must: