Writing Hooks

Use for every request or task that creates, rewrites or wires a hook or hook script for Claude Code or Cowork, including the hooks entry in settings.json, even when the user never says hook. Load it before or with update-config whenever that settings change is a hook. That includes setting something up to run automatically, from now on, in every session or every time an event happens (whenever Claude edits a file, after it reads files, before a command runs, when a session starts or ends), to block, allow, log or check commands, tool calls, prompts or file changes, to make Claude always or never do something with a guarantee instead of a memory or an instruction, and to add hooks to a plugin, a skill, a subagent or user, project, local or managed settings. Writes hooks of every type (command, HTTP, MCP tool, prompt, agent) from the current official docs, picks the optimal event and location, and verifies them with real inputs. Not for Git hooks, React hooks or webhooks.

nerymurillohnd Updated 0 repo stars

File contents

nerymurillohnd/the-claude-factory commit 1de80f3c6c

Frequently asked questions

npx get-skill add nerymurillohnd/writing-hooks