What problem does it solve?
The af-engineer-hook skill helps teams design and implement Cursor hooks to intercept agent actions, apply rules, and enforce security and automation policies across workflows.
It enables you to create new hooks, configure hooks.json, and implement blocking or modification logic via scripts.
Core Features & Use Cases
- Define events (beforeShellExecution, afterFileEdit, etc.) and implement policy logic with either command-based scripts or prompt-based instructions.
- Configure hooks.json to apply rules globally or per-project; store hook scripts under .cursor/hooks to enforce governance and auditability.
- Use cases include blocking dangerous commands, filtering sensitive actions, and enforcing organizational standards during automation.
Quick Start
Create a new hook for formatting or security, configure .cursor/hooks.json, and implement the hook script under .cursor/hooks/.