Skip to content
Back to skills

Hooks Setup

ASecurity

Set 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
ai-agentsbashdebuggingdatabase

Works with

  • claude code

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add monoes/monomind --skill hooks-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hooks Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hooks Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monoes-hooks-setup/badge)](https://www.skillsdirectory.com/skills/monoes-hooks-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…