setup-pre-commit

Automate Husky pre-commit hook setup for code quality checks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/stephangrobler/myBpmFlow --skill setup-pre-commit-stephangrobler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-pre-commit
Source: https://github.com/stephangrobler/myBpmFlow/tree/main/agent/skills/setup-pre-commit
Command: npx skills add https://github.com/stephangrobler/myBpmFlow --skill setup-pre-commit-stephangrobler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires husky, lint-staged, prettier, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the setup of Husky pre-commit hooks, which include lint-staged for code formatting, type checking, and tests, to ensure code quality before commits.

Core Features & Use Cases

  • Automated Code Formatting: Ensures consistent code formatting with Prettier.
  • Type Checking: Runs type checking scripts to catch potential issues.
  • Testing: Executes test scripts to verify code functionality.
  • Use Case: When you want to quickly set up a Git repository with Husky hooks for code quality checks.

Quick Start

Run the 'setup-pre-commit' skill to automatically configure Husky pre-commit hooks in your current repository.

Frequently Asked Questions about setup-pre-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Husky pre-commit hooks for code formatting and testing?

To set up Husky pre-commit hooks, you can run the setup-pre-commit skill which automatically configures lint-staged for Prettier formatting, type checking, and test execution before commits are finalized.

What do pre-commit hooks do for code quality in a Git repository?

Pre-commit hooks automate code quality checks by running scripts for formatting, type checking, and testing before changes are committed, ensuring consistent style and preventing broken code from entering the repository.

Do I need lint-staged and Prettier installed before configuring Husky hooks?

Yes, you need lint-staged, Prettier, and a compatible package manager already installed in your project, as the setup-pre-commit skill requires these dependencies to integrate automated code quality checks.

Can I use Husky pre-commit hooks with different package managers?

Yes, the setup-pre-commit skill integrates with various package managers to configure Husky hooks, allowing you to maintain consistent code quality checks across different JavaScript project environments.

What's the best way to automate Prettier formatting before a Git commit?

The best way to automate Prettier formatting before a commit is using Husky pre-commit hooks integrated with lint-staged, which runs formatting scripts specifically on staged files to enforce code quality.

Why are my Husky pre-commit hooks not running type checking and tests?

Husky pre-commit hooks may not run type checking and tests if the scripts are not properly configured in your package manager, which the setup-pre-commit skill automates by integrating lint-staged with your testing and type checking scripts.