hook-system

Installation
SKILL.md

Hook System

Pain Signals — You Need This Pattern When:

  • Operators want to enforce policy (block dangerous commands, redact secrets, log audits) without forking the harness
  • Multiple users/teams need different behaviors on the same harness binary
  • Cross-cutting concerns (telemetry, compliance, formatting) keep showing up as conditionals in core code
  • You need extensibility for a built tool — third parties can configure behavior without code changes
  • You want a deterministic interception point for testing — fire a hook, observe state

Hooks shift policy out of code into config. The harness defines where extension points are; operators decide what runs there. Without hooks, every new policy means a code change and a redeploy.


Core Principle

A hook is a handler attached to an event. The harness emits events at well-defined lifecycle points; matching hooks run with a defined contract; their output influences (or does not influence) the harness's next action.

Installs
1
GitHub Stars
3
First Seen
Aug 22, 2026