setup-pre-commit

Configure Husky and lint-staged pre-commit hooks for JavaScript and TypeScript projects.

28|3|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Minara-AI/cc-connect --skill setup-pre-commit-minara-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-pre-commit
Source: https://github.com/Minara-AI/cc-connect/tree/main/.claude/skills/setup-pre-commit
Command: npx skills add https://github.com/Minara-AI/cc-connect --skill setup-pre-commit-minara-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires husky, lint-staged, prettier.

What problem does it solve?

This Skill eliminates the manual overhead of maintaining code quality by automating the setup of pre-commit hooks that enforce formatting, type checking, and testing before code is committed.

Core Features & Use Cases

  • Automated Hook Configuration: Installs and configures Husky and lint-staged to ensure consistent code standards.
  • Integrated Quality Gates: Automatically triggers Prettier formatting, TypeScript type checking, and test suites on every commit.
  • Use Case: Use this when starting a new project or onboarding an existing repository to ensure that no unformatted or broken code is ever committed to the version control history.

Quick Start

Run the setup-pre-commit skill to configure Husky, lint-staged, and Prettier in the 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 automate code formatting with pre-commit hooks?

Automating code formatting with pre-commit hooks involves configuring Husky and lint-staged to run Prettier on staged changes. This Skill sets up those hooks to automatically enforce consistent formatting and type checking before code is committed.

How do I configure Husky and lint-staged for a new JavaScript project?

Configuring Husky and lint-staged requires installing both packages and linking them to Git hooks. This Skill automates that setup process, integrating Prettier formatting, TypeScript type checking, and test suites into a single pre-commit workflow.

Can I use this pre-commit setup for an existing TypeScript repository?

Yes, you can apply this pre-commit setup to an existing TypeScript repository. It configures Husky and lint-staged to verify staged changes, ensuring that no unformatted or broken code enters your version control history during onboarding.

Do I need Prettier installed to use Husky and lint-staged?

Yes, Prettier is a required dependency to enforce code formatting standards. This Skill configures Husky and lint-staged to automatically trigger Prettier alongside TypeScript type checking and test suites on every commit.

What is the best way to enforce code quality standards before a commit?

The best way to enforce code quality standards before a commit is using Husky and lint-staged as automated quality gates. This Skill configures them to intercept staged changes and run formatting, type checking, and tests automatically.