hookslisted
Install: claude install-skill nimadorostkar/Claude-Skills-collection
# Hooks
## Purpose
Enforce a rule deterministically rather than asking the model to remember it. A hook runs every time, regardless of the model's attention, its context, or its mood — which is exactly what a rule requires.
## When to Use
- A rule must hold every time: formatting, a forbidden command, a required check.
- The agent keeps forgetting an instruction despite it being in the instructions.
- Automating a step that should happen around every edit or command.
- Blocking a dangerous action before it executes.
## Capabilities
- Lifecycle events: before and after a tool call, on session start, on stop.
- Deterministic enforcement: formatting, linting, blocking.
- Injecting context at the right moment.
- Notification and logging.
## Inputs
- The rule and when it must apply.
- The event that should trigger it.
- What should happen when it fails: block, warn, or fix.
## Outputs
- Hook configuration that runs reliably.
- Rules enforced without depending on the model's memory.
- A fast hook — one that does not make the agent unpleasant to use.
## Workflow
1. **Identify the rule that keeps being broken** — If an instruction is in the instruction file and is still violated, it is a hook, not an instruction. Instructions are guidance; hooks are enforcement.
2. **Choose the event** — Before a tool call to block or validate; after one to format or verify; on session start to inject context.
3. **Make it fast** — A hook runs on every matching event. Two seconds on every