This guide covers how mods work, how to build and test one, and the design rules that keep a mod safe. The last sections collect patterns from public mods.
Early access. Mods (function hooks) load only when
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1is set, and the API can change between releases without notice. Your build writes its own type definitions, and those types are correct for your version. Check them before you trust any guide, including this one.