/install-hook - Install Generated Hook to Settings
Description
**Install a generated hook to Claude Code settings (user-level or project-level).** ---
Installation
claude install-skill https://github.com/alirezarezvani/claude-code-skill-factory README
/install-hook - Install Generated Hook to Settings
**Install a generated hook to Claude Code settings (user-level or project-level).**
Usage
/install-hook generated-hooks/my-hook
/install-hook generated-hooks/my-hook user
/install-hook generated-hooks/my-hook project
What This Command Does
Installs hook.json configuration to:
- undefined
**Installation process**:
- undefined
Examples
Install User-Level Hook (All Projects)
/install-hook generated-hooks/auto-format-python user
**Performs**:
- undefined
**Output**:
Installing hook: auto-format-python
Location: User-level (~/.claude/settings.json)
✅ Hook validation PASSED
- JSON structure: Valid
- Safety checks: All passed
- Event type: PostToolUse
Creating backup...
✅ Backup created: ~/.claude/settings.json.backup
Installing to PostToolUse hooks...
✅ Hook installed successfully!
Event type: PostToolUse
Matcher: tool_names=["Write", "Edit"], paths=["**/*.py"]
Command: Auto-format Python with Black
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next steps:
1. Restart Claude Code (required)
2. Test by editing a .py file
3. Verify hook runs automatically
To test:
claude --continue
> Edit any Python file
> Check if Black formatting runs
Install Project-Level Hook (Current Project Only)
/install-hook generated-hooks/test-runner project
**Installs to**: `.claude/settings.json` (current project)
**Output**:
Installing hook: test-runner
Location: Project-level (.claude/settings.json)
✅ Hook validation PASSED
✅ Backup created: .claude/settings.json.backup
✅ Hook installed successfully!
Event type: SubagentStop
Matcher: (empty - runs for all agents)
Command: Run pytest after agent completes
This hook will only run in this project.
Next steps:
1. Restart Claude Code
2. Run any Task agent
3. Hook will automatically run tests when agent completes
Auto-Detect Installation Level
/install-hook generated-hooks/git-auto-add
**Auto-detection logic**:
- undefined
Safety Validation
**Before installation, the hook is validated for**:
- undefined
Related Skills
next.js
| The React Framework | 138360 | 1503 | 1 |
Development community sharing-skills
skill for guidance.
Development community root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development community Template Skill
Minimal skeleton for a new skill project structure.
Development community Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THIS PRODUCT. ---
Development official Claude API
When code imports anthropic/@anthropic-ai/sdk/claude_agent_sdk, or user asks to use Claude APIBuild apps with the Claude API or Anthropic SDK
Development official Related Agents
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
Contributing to nanobot
Thank you for being here. nanobot is built with a simple belief: good tools should feel calm, clear, and humane. We care deeply about useful features, but we also believe in achieving more with less:
Key exports from each phase
for summary in .planning/phases/*/*-SUMMARY.md; do echo "=== $summary ===" grep -A 10 "Key Files\|Exports\|Provides" "$summary" 2>/dev/null done