文件最后提交记录最后更新时间
3 天前
1 个月前
README

Claude Code hooks

hooks.json is a thin Claude Code adapter around the portable core.

Hooks require a current Claude Code release: the exec-form command and args hook shape and the compact SessionStart matcher used below need it (see the Claude Code hooks contract). Both hooks also need an interpreter reachable as python3 on PATH; see the Windows and WSL guide for native Windows setup.

Event Matcher Behavior
SessionStart `startup resume
Stop unsupported/omitted Emits a bounded, aggregate JSON systemMessage when recovery is needed. It omits operation identifiers, paths, and note content; otherwise it is silent.

Both are command hooks using an executable plus an argument array and ${CLAUDE_PLUGIN_ROOT} only to locate plugin code. They do not use the plugin cache as a vault.

The response shapes follow the current Claude Code hooks contract: An opted-in SessionStart may add context through stdout, while Stop warnings use the supported top-level systemMessage field. Stop has no matcher because that event does not support one. Both readers reject symlinked paths and cap their scan count and output bytes.

Hooks never write knowledge, update wiki/hot.md, stage files, commit Git, run remote calls, or bypass transaction approval. The same workflows remain usable on hosts that do not support Claude hooks.