From aj-geddes-useful-ai-prompts-4
Sets up Git hooks with Husky, pre-commit, and custom scripts to enforce linting, testing, commit messages, secret scanning, and code quality before commits and pushes.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Configure Git hooks to enforce code quality standards, run automated checks, and prevent problematic commits from being pushed to shared repositories.
Minimal working example:
#!/bin/bash
# setup-husky.sh
# Install Husky
npm install husky --save-dev
# Initialize Husky
npx husky install
# Create pre-commit hook
npx husky add .husky/pre-commit "npm run lint"
# Create commit-msg hook
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
# Create pre-push hook
npx husky add .husky/pre-push "npm run test"
# Create post-merge hook
npx husky add .husky/post-merge "npm install"
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Husky Installation and Configuration | Husky Installation and Configuration |
| Pre-commit Hook (Node.js) | Pre-commit Hook (Node.js) |
| Commit Message Validation | Commit Message Validation |
| Commitlint Configuration | Commitlint Configuration, Pre-push Hook (Comprehensive) |
| Pre-commit Framework (Python) | Pre-commit Framework (Python) |
| Secret Detection Hook | Secret Detection Hook, Husky in package.json |
--no-verify (rarely)--no-verify