MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / register_hook

Function register_hook

s07_skill_loading/code.py:314–315  ·  view source on GitHub ↗
(event: str, callback)

Source from the content-addressed store, hash-verified

312HOOKS = {"UserPromptSubmit": [], "PreToolUse": [], "PostToolUse": [], "Stop": []}
313
314def register_hook(event: str, callback):
315 HOOKS[event].append(callback)
316
317def trigger_hooks(event: str, *args):
318 for callback in HOOKS[event]:

Callers 1

code.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected