/install-hook - Install Generated Hook to Settings
Description
**Install a generated hook to Claude Code settings (user-level or project-level).** ---
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for alirezarezvani/claude-code-skill-factory, shared by 13 entries
in this directory. It describes the repository, not this entry specifically.
/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:
- User-level (
~/.claude/settings.json) - Applies to all projects - Project-level (
.claude/settings.json) - Current project only
**Installation process**:
- ✅ Validates hook.json structure
- ✅ Checks for safety violations
- ✅ Backs up existing settings.json
- ✅ Merges with existing hooks (preserves other settings)
- ✅ Saves and displays confirmation
Examples
Install User-Level Hook (All Projects)
/install-hook generated-hooks/auto-format-python user
**Performs**:
- Reads
generated-hooks/auto-format-python/hook.json - Validates JSON structure and safety
- Creates backup:
~/.claude/settings.json.backup - Opens
~/.claude/settings.json - Adds hook to appropriate event type section
- Saves changes
**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**:
- If
.claude/settings.jsonexists → Install to project - Otherwise → Ask user: "Install to user or project level?"
Safety Validation
**Before installation, the hook is validated for**:
**JSON Structure**:
- ✅ Valid JSON syntax
- ✅ Required fields present (matcher, hooks)
- ✅ Correct data types
**Safety Patterns**:
- ✅ Tool detection for external commands
- ✅ Silent failure mode
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11