# Hook Management

Session-scoped hook lifecycle management with enable/disable/status controls, execution...

- Repository: https://github.com/a5c-ai/babysitter (1887 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add a5c-ai/babysitter --skill hook-management -g -a claude-code -y`
Codex: `npx skills add a5c-ai/babysitter --skill hook-management -g -a codex -y`
Cursor: `npx skills add a5c-ai/babysitter --skill hook-management -g -a cursor -y`
Gemini CLI: `npx skills add a5c-ai/babysitter --skill hook-management -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add a5c-ai/babysitter`

## Description

Session-scoped hook lifecycle management with enable/disable/status controls, execution profiling, and color-coded performance alerts.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

- **file-guard**: Blocks sensitive file access (195+ patterns)

### PostToolUse Hooks
- **typecheck-changed**: Type checking on modified files
- **lint-changed**: Linting on modified files
- **test-changed**: Testing related to modified files
- **check-comment-replacement**: Detects code replaced with comments
- **check-unused-parameters**: Detects unused function parameters

### UserPromptSubmit Hooks
- **codebase-map**: Invisible project context injection
- **thinking-level**: Reasoning enhancement (4 levels)

### Stop/SubagentStop Hooks
- **create-checkpoint**: Git-backed state snapshot
- **typecheck-project**: Full project type checking
- **lint-project**: Full project linting
- **test-project**: Full test suite execution
- **self-review**: Comprehensive change review

## Session Isolation

All hook changes are session-scoped. Disabling a hook only affects the current session and does not persist.

## Profiling

- Red alert: execution time > 5s
- Yellow warning: execution time > 3s
- Green: execution time < 3s
- Output size monitoring: flag > 10KB

## Commands

- `/hook:enable [hookName]` -- Enable a disabled hook
- `/hook:disable [hookName]` -- Disable a hook for this session
- `/hook:status` -- Show all hook states and profiling data

## When to Use

- When a hook is causing issues during a session
- To check performance of hook executions
- To temporarily bypass a hook for a specific operation

## Processes Used By

- `claudekit-orchestrator` (hook pipeline setup)
- `claudekit-safety-pipeline` (hook profiling)

