setup-pre-commit
🤖 AI Summary
This skill automates the setup of a Git pre-commit hook using Husky and lint-staged to run Prettier, typecheck, and test scripts on staged files, and ensures a Prettier config is present if missing.
How to Install
Claude Code:
git clone --depth 1 https://github.com/mattpocock/skills.git && cp skills/skills/misc/setup-pre-commit ~/.claude/skills/setup-pre-commit -r- **Husky** pre-commit hook - **lint-staged** running Prettier on all staged files - **Prettier** config (if missing) - **typecheck** and **test** scripts in the pre-commit hook
Details
| Category | Coding → generation |
| Source | mattpocock/skills |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 143.3K |
| Est. per Skill | ~3.2K (shared across 45 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | Safe |
Related Skills
avalonia-layout-zafiro
Avalonia Layout with Zafiro.Avalonia Master modern, clean, and maintainable Avalonia UI layouts. Foc
codebase-cleanup-tech-debt
Technical Debt Analysis and Remediation You are a technical debt expert specializing in identifying,
impress
LibreOffice Impress Overview LibreOffice Impress skill for creating, editing, converting, and automa
code-refactoring-tech-debt
Technical Debt Analysis and Remediation You are a technical debt expert specializing in identifying,
Works Well With
Skills from the same repository — often designed to work together
qa
Run an interactive QA session. The user describes problems they're encountering. You clarify, explor
tdd
Test-Driven Development When to Use Use when this workflow matches the user request: Use this skill
triage
Triage When to Use Use when this workflow matches the user request: Move issues and external PRs thr