Back to skills
SKILL.md
Hooks Setup
ASecuritySet up Monomind hooks — generate the .claude/settings.json hook configuration and verify it.
- 21 stars
- 0 votes
- 0 copies
- 2 views
- Added September 10, 2026
Works with
Security analysis
100/100npx -y skills add monoes/monomind --skill hooks-setup --agent claude-codeAre you the author of Hooks Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/monoes-hooks-setup)---
name: hooks-setup
description: Set up Monomind hooks — generate the .claude/settings.json hook configuration and verify it.
type: flow
---
# Setting Up Monomind Hooks
## Quick Start
### 1. Initialize with Hooks
```bash
npx monomind init --hooks
```
This automatically creates `.claude/settings.json` with hook configurations.
### 2. Test Hook Functionality
```bash
# Test pre-edit hook
npx monomind hooks pre-edit --file src/utils.ts
# Test pre-task hook
npx monomind hooks pre-task -d "Implement user authentication"
# Test route
npx monomind hooks route -t "Fix authentication bug"
```
### 3. Customize Hooks
Edit `.claude/settings.json` to configure which hooks fire on which Claude Code events:
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx monomind hooks pre-edit --file '${tool.params.file_path}'"
}]
},
{
"matcher": "^Bash$",
"hooks": [{
"type": "command",
"command": "npx monomind hooks pre-command --command '${tool.params.command}'"
}]
}
],
"PostToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx monomind hooks post-edit --file '${tool.params.file_path}' --success true"
}]
},
{
"matcher": "^Bash$",
"hooks": [{
"type": "command",
"command": "npx monomind hooks post-command --command '${tool.params.command}' --success true"
}]
}
]
}
}
```
## Common Patterns
### Task Tracking (manual)
```bash
# Record task start
npx monomind hooks pre-task -d "Implement auth module"
# After completing work, record result
npx monomind hooks post-task -i task-123 --success true
```
### Route Before Spawning
```bash
# Get agent recommendation for a task
npx monomind hooks route -t "Optimize database queries"
# Understand why an agent was chosen
npx monomind hooks explain -t "Fix authentication bug"
```
### Bootstrap from Repository
```bash
# Pretrain on current repo (medium depth + embeddings)
npx monomind hooks pretrain
# Deep analysis only, no embeddings
npx monomind hooks pretrain --depth deep --no-with-embeddings
```
### Session Persistence
```bash
# At session end
npx monomind hooks session-end
# At session start (restores latest)
npx monomind hooks session-restore
```
## Debugging
```bash
# Enable debug output
export MONOMIND_LOG_LEVEL=debug
# List all registered hooks
npx monomind hooks list
# View recorded routing/outcome metrics
npx monomind hooks metrics
# Check background workers
npx monomind hooks worker list
```
Attribution
Comments
Loading comments…