Agent skill · Workflow & Productivity

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.

Alireza Rezvani23,369★ · +428/wk · 1 repos on radarProfile →
claude-codeships scriptsMIT
Install
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.

Facts
Files in the skill folder: 28
SKILL.md size: 12 KB
Bundled scripts: yes
Version: 2.0.0
Declared author: Claude Code Skills Factory
Path: generated-skills/hook-factory/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 839
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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's inside
Steps it walks through
  1. What This Skill Does
  2. When to Use This Skill
  3. Capabilities
  4. Three Generation Modes
  5. Supported Hook Templates (10 Total)
  6. Languages Supported
  7. Enhanced Validation (v2.0)
  8. Safety Features
  9. How to Invoke
  10. Natural Language Requests
  11. Explicit Template Selection
  12. List Available Templates
  13. Example Interactions
  14. Example 1: Auto-Format Python
Ships with 24 files
  • README.md
  • examples/auto-format-python/README.md
  • examples/auto-format-python/hook.json
  • examples/desktop-notify/README.md
  • examples/desktop-notify/hook.json
  • examples/git-auto-add/README.md
  • examples/git-auto-add/hook.json
  • examples/load-context/README.md
  • examples/load-context/hook.json
  • examples/pre-push-check/README.md
  • examples/pre-push-check/hook.json
  • examples/pre-tool-validation/README.md
  • examples/pre-tool-validation/hook.json
  • examples/prompt-preprocessor/README.md
  • examples/prompt-preprocessor/hook.json
  • examples/security-scan/README.md
  • examples/security-scan/hook.json
  • examples/session-cleanup/README.md
  • examples/session-cleanup/hook.json
  • examples/test-runner/README.md
  • examples/test-runner/hook.json
  • generator.py
  • hook_factory.py
  • install-hook.sh
first 24 of 28
Commands it runs
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
More from claude-code-skill-factory
All skills →
About this skill
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.

Keep going