# Tutorial: hooks you can poke

Write a hook, type a command at it, watch the verdict. Every widget on these pages runs a JavaScript port of capt-hook's dispatch -- and every preset button is a row in a parity test, so what the widget answers is what `capt-hook test` answers. When a command uses shell features the port doesn't model (substitution, heredocs), the widget says so instead of guessing.

Try it -- this is the hook you'll build on the next page:


Six short stops, each one interaction and one idea:

1.  [Your first block](../../docs/tutorial/first-block.md): one line guards a whole command family
2.  [Precision with Runs](../../docs/tutorial/command-vs-runs.md): recall vs precision, and why you want both ends
3.  [Conditions compose](../../docs/tutorial/secret-guard.md): AND, veto, and the guard that ignores reads
4.  [Walk the command](../../docs/tutorial/walk-the-command.md): when a regex can't decide
5.  [Stop gates](../../docs/tutorial/stop-gates.md): gate the session, not the tool call
6.  [Test it, then ship it](../../docs/tutorial/test-then-ship.md): the same cases, as inline tests

Fifteen minutes end to end. When you're done, `uvx capt-hook init` gives you the real thing.
