@damonjw/agenthook
v0.1.11
Published
Cache-friendly model-backed lifecycle hooks for Codex
Readme
AgentHook
AgentHook provides a Linux command-line tool agenthook for model-backed Codex
lifecycle hooks. It runs a recursive acceptance tree of tool-scope selectors,
agent tests, sequential any_accept blocks, and parallel all_accept blocks.
Installation and usage
npm install --global @damonjw/agenthook
agenthook --install-codex-skillTo use it, ask your agent e.g.
I'd like to install a hook so that every time you edit a Markdown file
in directory `justsostories/`, and the edit involves more than a paragraph of
new or rewritten text, the text must mention a mustelid. Please store the
hook instructions in the current directory as `myhook.md` so that I can easily edit them.Run agenthook --help for the complete command and
configuration references. See the installation workflow in SKILL.md and the
complete prose-clarity example in assets/prose-clarity.md.
Requirements
- Linux or WSL
- Node.js 22.5 or newer
- Codex CLI installed separately, with paginated-thread
thread/turns/listandthread/revertapp-server support - util-linux
flockandsetpriv - an authenticated Codex CLI
The installer does not check Codex compatibility. Until AgentHook gains a capability-based preflight, an incompatible Codex installation fails when the required app-server operation is first used.
License
AGPL-3.0-or-later.
(c) DJW 2026
