Hooks | Cursor Docs
cursor.com · 5,887 words · saved by 1 readers
Built-in hooks and how to use them effectively in Cursor.
# Hooks Hooks let you observe, control, and extend the agent loop using custom scripts. Hooks are spawned processes that communicate over stdio using JSON in both directions. They run before or after defined stages of the agent loop and can observe, block, or modify behavior. [Media](/docs-static/images/agent/hooks.mp4) With hooks, you can: - Run formatters after edits - Add analytics for events - Scan for PII or secrets - Gate risky operations (e.g., SQL writes) - Control subagent (Task tool) execution - Inject context at session start Looking for ready-to-use integrations? See [Partner Integ
saved by
related reading
- GitHub - x1xhlol/system-prompts-and-models-of-ai-tools: FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sourced) System Prompts, Internal Tools & AI Modelsgithub.com
- goose | Your open source AI agentblock.github.io
- Cursor: AI coding agentcursor.com
- Cursor: AI coding agentcursor.sh
- Cursor: AI coding agentcursor.com
- Agentationagentation.dev
- A Guide to Claude Code 2.0 and getting better at using coding agents – sankalp's blogsankalp.bearblog.dev
- Agentationagentation.com
- Cookbookcookbook.openai.com
- Subagents | Cursor Docscursor.com
- Agent Skills | Cursor Docscursor.com
- Claude Code Cheat Sheetcc.storyfox.cz