hook-factory
Generate production-ready Claude Code hooks with interactive Q&A, automated installation, and enhanced validation. Supports 10 templates across 7 event types for comprehensive workflow automation.
npx skills add alirezarezvani/claude-code-skill-factory --skill hook-factory --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Hook Factory v2.0 **Generate production-ready Claude Code hooks with interactive Q&A, automated installation, and enhanced validation.** ## What This Skill Does Hook Factory v2.0 is a comprehensive hook generation system with three modes: 1. **Interactive Mode** (NEW!) - 7-question guided flow with smart defaults 2. **Natural Language** - Describe what you want in plain English 3. **Template Mode** - Direct generation from 10 production templates **Key Features:** - **Interactive Q&A** - 7 questions with validation and smart defaults - **Automated Installation** - Python and Bash installers with backup/rollback - **Enhanced Validation** - Secrets detection, event-specific rules, command validation - **10 Templates** - Covering 7 event types (PostToolUse, SubagentStop, SessionStart, PreToolUse, UserPromptSubmit, Stop, PrePush) - **Comprehensive Safety** - Tool detection, silent failure, atomic operations - **macOS/Linux Support** - Production-ready for Unix environments ## When to Use This Skill Use hook-factory when you want to: - Auto-format code after editing - Automatically stage files with git - Run tests when agents complete - Load project context at session start - Create c
- What This Skill Does
- When to Use This Skill
- Capabilities
- Three Generation Modes
- Supported Hook Templates (10 Total)
- Languages Supported
- Enhanced Validation (v2.0)
- Safety Features
- How to Invoke
- Natural Language Requests
- Explicit Template Selection
- List Available Templates
- Example Interactions
- Example 1: Auto-Format Python
python3 hook_factory.py -i python3 hook_factory.py -r "auto-format Python files after editing" python3 hook_factory.py -t post_tool_use_format -l python cd generated-skills/hook-factory Install to user level (~/.claude/settings.json) python3 installer.py install generated-hooks/[hook-name] user Install to project level (.claude/settings.json) python3 installer.py install generated-hooks/[hook-name] project Uninstall python3 installer.py uninstall [hook-name] user
What does the hook-factory skill do?
Generate production-ready Claude Code hooks with interactive Q&A, automated installation, and enhanced validation. Supports 10 templates across 7 event types for comprehensive workflow automation.
How do I install it?
Run `npx skills add alirezarezvani/claude-code-skill-factory --skill hook-factory --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From alirezarezvani/claude-code-skill-factory, a repository with 839 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.