setup-pre-commit

Automate pre-commit hook setup with Husky and lint-staged for Git repositories.

Updated Jun 6, 2026
One-click install
npx skills add https://github.com/guille-gallo/auth-kit --skill setup-pre-commit-guille-gallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-pre-commit
Source: https://github.com/guille-gallo/auth-kit/tree/main/.agents/skills/setup-pre-commit
Command: npx skills add https://github.com/guille-gallo/auth-kit --skill setup-pre-commit-guille-gallo

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 pre-commit hooks for code quality and testing, ensuring that code is linted, formatted, and tested before being committed.

Core Features & Use Cases

  • Automated Code Linting: Ensures code quality by automatically running linters on staged files.
  • Commit-Time Formatting: Applies code formatting to staged files to maintain consistency.
  • Automated Testing: Executes tests to ensure code functionality before it's committed.
  • Use Case: For developers who want to maintain code quality and catch issues early in the development process.

Quick Start

Use the setup-pre-commit skill to automatically set up pre-commit hooks for your 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 pre-commit hooks for code quality and testing in a Git repository?

This Skill automates setting up pre-commit hooks by installing and configuring Husky, lint-staged, and Prettier in your Git repository to ensure code is linted, formatted, and tested before committing.

What are pre-commit hooks and how do they automate code linting and formatting?

Pre-commit hooks are scripts triggered automatically before a commit is finalized. They automate code linting and formatting by running tools like lint-staged and Prettier on staged files to catch quality issues early.

Do I need Husky and lint-staged to automate commit-time formatting and testing?

Yes, Husky and lint-staged are required dependencies to automate commit-time formatting and testing. Husky manages the Git hooks while lint-staged runs the linters and formatters specifically on staged files.

Can I use Prettier with Husky to automatically format staged files before committing?

Yes, you can use Prettier with Husky to format staged files. This Skill configures them together so that Prettier automatically applies code formatting to your staged files during the pre-commit hook execution.

What is the best way to automate code quality checks for staged files in Git?

The best way to automate code quality checks for staged files is using lint-staged with Husky. This Skill automates that setup, configuring your environment to run linters and tests only on changed files before committing.