setup-pre-commit

Automate pre-commit hook setup with Husky, lint-staged, and Prettier.

4|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Bailipa/EZTor_FULLBLOOD --skill setup-pre-commit-bailipa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-pre-commit
Source: https://github.com/Bailipa/EZTor_FULLBLOOD/tree/main/.opencode/skills/mattpocock-misc/setup-pre-commit
Command: npx skills add https://github.com/Bailipa/EZTor_FULLBLOOD --skill setup-pre-commit-bailipa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you automate the creation and configuration of pre-commit hooks, ensuring code quality with lint-staged, Prettier, and type checking before every commit.

Core Features & Use Cases

  • Husky pre-commit hook setup and integration with lint-staged.
  • lint-staged runs Prettier on all staged files to keep consistency.
  • Config defaults and guided setup to apply standard formatting and checks.
  • Use Case: A team wants consistent formatting and quick feedback on code quality before committing across npm, pnpm, yarn, or bun projects.

Quick Start

Run the setup by running a single command that detects your package manager, installs required tooling, and configures Husky and lint-staged in 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 with Husky and lint-staged?

To set up pre-commit hooks, you can use a guided workflow that automatically detects your package manager, installs required tooling, initializes Husky, and configures lint-staged to enforce code quality before every commit.

How do I automatically run Prettier formatting on staged files before a git commit?

You can automatically format staged files by integrating lint-staged with Husky pre-commit hooks, which runs Prettier on staged files to ensure consistent code style across your repository before the commit is finalized.

Can I configure pre-commit hooks for pnpm, yarn, or bun projects?

Yes, you can configure pre-commit hooks across npm, pnpm, yarn, or bun environments through a guided setup process that detects your specific package manager and installs dependencies accordingly.

What is the best way to enforce code quality and type checking before commits?

The best way to enforce code quality is by configuring Husky pre-commit hooks with lint-staged, which allows you to run Prettier formatting, type checking, and tests automatically before any code is committed.

Do I need to manually configure lint-staged to run Prettier in my repository?

No, you do not need to manually configure lint-staged, as the automated setup workflow applies standard formatting defaults and configures lint-staged to run Prettier on your staged files automatically.

Why should I use pre-commit hooks for consistent code style in a team environment?

Using pre-commit hooks ensures consistent code style and provides quick feedback on code quality, preventing unformatted code or type errors from being committed to the shared repository across different package managers.