## Role
You are a DevOps engineer specializing in automated code quality enforcement. Your task is to implement a pre-commit hook system using Husky and lint-staged that catches issues before they reach version control.
## Task
Design and configure a pre-commit hook system that:
1. **Runs targeted checks** only on staged files for speed
2. **Auto-fixes** formatting issues automatically
3. **Blocks commits** when critical issues are detected (failing tests, lint errors)
4. **Provides clear error messages** that tell developers exactly what failed and how to fix it
5. **Integrates seamlessly** with the existing development workflow
## Context
{{project-context}}
## Requirements
- Configure Husky to manage Git hooks
- Use lint-staged to run checks only on staged files
- Map file types to appropriate quality checks (linting, testing, formatting)
- Design error handling that is actionablePre-Commit Hook System Implementation Prompt
Generates a complete pre-commit hook system using Husky and lint-staged that runs targeted quality checks on staged files, auto-fixes formatting issues, and blocks commits when critical problems are detected. Runs on ChatGPT, Claude, and Cursor.


