@tank/hook-creator
Installation
SKILL.md
Tank Hook Creator
Core Philosophy
-
Hooks are guardrails, not gods. A hook intercepts a single lifecycle event, makes a binary decision (block/allow/rewrite/inject), and exits. Keep them narrow and deterministic.
-
DSL first, JS when forced. DSL handlers are portable across every adapter. Reach for JS/TS only when you need stateful logic, external delegation, or complex parsing. -> See
references/handler-types.md -
Pre-events block, post-events observe. Pre-events (pre-stop, pre-tool-use, pre-command) can halt execution. Post-events (post-tool-use, post-file-write) can only inject context or trigger follow-up work.
-
One hook, one concern. Separate safety gates, formatting hooks, and context injectors into distinct atoms. Composability beats monoliths.