Skip to content
Back to skills

Husky

ASecurity

Generates Husky Git hooks configuration with pre-commit checks. Creates .husky/pre-commit file for running linting, testing, and formatting before commits.

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 9, 2026
code-qualityvuetestinggit

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill husky --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Husky?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Husky
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-husky/badge)](https://www.skillsdirectory.com/skills/majiayu000-husky)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: husky
description: Generates Husky Git hooks configuration with pre-commit checks. Creates .husky/pre-commit file for running linting, testing, and formatting before commits.
---

# Husky Skill

## Purpose
Generate Husky configuration for Git hooks with proper pre-commit checks.

## Instructions

### Step 1: Initialize Husky (Already Done During npm install)
The `prepare` script in package.json automatically runs `husky` during `npm install`.
This creates the `.husky/` directory structure.

### Step 2: Create Pre-Commit Hook
**CRITICAL**: After Husky initialization, you MUST create or replace the `.husky/pre-commit` file with the proper content.

**Do NOT rely on auto-generated default** - it creates a default hook with just `npm test` which is insufficient.

## Output
Create the file: `.husky/pre-commit`

## Implementation Steps

1. **Create `.husky/pre-commit` file** with this content:
- Lint to check all code
- Stylelint to check Vue and SCSS files for style issues
- Unit tests to ensure code changes don't break tests
- Lint-staged to auto-fix and format staged files

2. **Make the hook executable**


## Notes
- Pre-commit hook ensures code quality before commits are made
- Husky is initialized automatically via the `prepare` script
- The agent MUST create/replace the pre-commit hook file after initialization

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.