write-a-hook
Installation
SKILL.md
Write a hook
Scaffold a new hook conforming to memo-flow bundle conventions. The skill interrogates you before writing anything; you can't produce an inconsistent hook by accident.
Process
1. Interrogation
Ask the author each question in order. Do not skip any. Do not write files until all answers are collected.
Hook name (kebab-case, no .sh suffix, e.g. context-monitor):
- Must be unique among hooks in
skills/engineering/memo-hooks/hooks/
Trigger event — pick one:
PreToolUse— fires before any tool call; can block (exit 2)PostToolUse— fires after any tool call; advisory only (exit 0)Stop— fires when the agent is about to stop; can block (exit 1)UserPromptSubmit— fires on each user turn; can block (exit 2 surfaces message)PreCompact— fires before context compaction; can block (exit 1)