What problem does it solve? Automating behavior around Cursor agent events requires knowing the hooks.json schema, event names, matchers, and JSON stdin/stdout protocol, which is easy to get wrong. This Skill guides the creation of working project or user hooks that observe, block, modify, or follow up on agent behavior. ## Core Features & Use Cases - Event Selection Guidance: Maps goals to the narrowest correct hook event such as beforeShellExecution, preToolUse, afterFileEdit, or subagentStop. - Command and Prompt Hooks: Generates executable shell scripts that exchange JSON over stdin/stdout, or prompt-based hooks for policy decisions. - Matchers and Safety: Configures JavaScript-regex matchers, failClosed behavior, timeouts, and loop limits, with validation and troubleshooting steps. - Use Case: You want Cursor to ask for approval before any shell command that makes a network request. The Skill creates a beforeShellExecution hook with a curl|wget matcher that returns an "ask" permission response. ## Quick Start Create a Cursor project hook that blocks shell commands containing rm -rf and asks for confirmation before running them.