All skills
setup-pre-commit
Set up Husky pre-commit hooks that run Prettier, type checking, and tests before each commit.
- Part of mattpocock/skills
- 564k installs
- Developer Tools · Coding skills
When to use it
You have a JavaScript repo with no commit-time checks and want formatting and tests to run automatically before commits.
For example
You say
Use setup-pre-commit to add pre-commit hooks to my pnpm TypeScript repo so staged files get formatted and tests run before each commit.
You get
- Husky pre-commit hook
- lint-staged and Prettier config
- Committed setup changes
How it works
- Detects your package manager from lockfiles and adapts commands accordingly.
- Skips typecheck and test lines if those scripts are missing, and tells you.
More Coding skills
See all- lark-skill-maker486kTurns Lark API operations into reusable custom skills for the CLI.
- brainstorming438kGuides you through brainstorming before any creative work, whether a feature, a talk or a renovation.
- writing-plans312kTurns a spec or requirements into a step-by-step implementation plan before any code is written.
- higgsfield-websites174kBuilds, edits and deploys full-stack websites, apps and multiplayer games to Cloudflare.
Also in this pack
- grill-me1.6MInterviews you relentlessly to sharpen a plan or design before you commit to it.
- grill-with-docs1.4MInterviews you hard about a plan while also writing decision records and a glossary as you go.
- improve-codebase-architecture1.3MScans a codebase for structural improvement opportunities, shows them in an HTML report, then digs into your pick.
- tdd1.3MBuilds features and fixes bugs test-first, writing failing tests before code and refactoring after.