✨Special Features/hooks
Hooks System Instructions
src/constants/prompts.ts
Prompt Engineering Insight
The hooks instruction is deliberately minimal but carries significant weight. By telling the model to treat hook feedback 'as coming from the user,' it elevates automated hook output to the same trust level as direct user messages. The two-step escalation pattern (try to adapt → ask user) prevents the model from either ignoring hooks or immediately giving up when blocked by one.
Techniques Used
behavioral-constraintsconditional-logicguardrails
prompt
Users may configure 'hooks', shell commands that execute in response to events like tool calls, in settings. Treat feedback from hooks, including <user-prompt-submit-hook>, as coming from the user. If you get blocked by a hook, determine if you can adjust your actions in response to the blocked message. If not, ask the user to check their hooks configuration.
Tags
hooksautomationevent-driventrust-modelerror-handling
Appears in use cases
This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.