/build-hook - Build Custom Claude Code Hooks
Description
**Interactive guide for creating custom hooks with Q&A workflow and automatic validation.** > **Note**: This command is also available as `/build hook` for consistency with other factories (skills, ag
Installation
claude install-skill https://github.com/alirezarezvani/claude-code-skill-factory README
/build-hook - Build Custom Claude Code Hooks
**Interactive guide for creating custom hooks with Q&A workflow and automatic validation.**
**Note**: This command is also available as `/build hook` for consistency with other factories (skills, agents, prompts). Both work identically - use whichever you prefer!
undefined
Usage
/build-hook
/build-hook notification
/build-hook formatting
/build-hook testing
/build-hook git
What This Command Does
**Two Ways to Build Hooks**:
1. Agent-Guided (Recommended for Beginners)
**Without arguments** (`/build-hook`):
- undefined
**With argument** (`/build-hook [type]`):
- undefined
2. Direct CLI (Advanced Users)
**Interactive Mode**:
cd generated-skills/hook-factory
python3 hook_factory.py -i
- undefined
**Template Mode**:
python3 hook_factory.py -t post_tool_use_format -l python
- undefined
Examples
Build Any Hook (Interactive)
/build-hook
**Output**:
Welcome to the Claude Code Hooks Factory! 🔧
I'll help you build a custom hook through 5-7 straightforward questions.
Hooks are workflow automation that run when events occur:
- SessionStart: Load context when Claude starts
- PostToolUse: Auto-format code after editing
- SubagentStop: Run tests when agents complete
- And 4 more event types...
Let's get started!
Question 1: What should this hook do?
Examples:
- Auto-format Python files
- Run tests automatically
- Send notifications
- Auto-commit to git
Your answer: ___
Build Notification Hook (Suggested)
/build-hook notification
**Output**:
Great! Building a notification hook.
I'll ask you a few questions to customize it:
Question 1: When should notifications be sent?
1. When any agent completes (SubagentStop)
2. When specific agent completes (SubagentStop + filter)
3. After every file edit (PostToolUse)
4. At session start (SessionStart)
Your choice (1-4): ___
→ Continues with hooks-guide Q&A → Generates notification hook with macOS/Linux support
Build Auto-Format Hook (Suggested)
/build-hook formatting
**Output**:
Perfect! Building an auto-formatting hook.
Question 1: Which language should be formatted?
1. Python (black)
2. JavaScript/
Related Skills
Claude Code Terminal Title
Gives each Claude Code terminal window a dynamic title describing the work being done
Productivity community N8n Skills
Enables AI assistants to directly understand and operate n8n workflows
Productivity community Composio Make
Trigger and manage Make (Integromat) scenarios
Productivity community Getting Help
career-ops is an open source project maintained in limited time. Here's how to get help efficiently.
Productivity community Worktree Status Check
Verify the current worktree environment and show task details.
Productivity community Time Command
Display the current date and time in Pakistan Standard Time (PKT, UTC+5).
Productivity community