meta-hook-create

Configure Cursor lifecycle hooks in .cursor/hooks.json to intercept agent actions.

Updated Feb 22, 2026
One-click install
npx skills add https://github.com/JuroOravec/agents --skill meta-hook-create
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: meta-hook-create
Source: https://github.com/JuroOravec/agents/tree/main/.cursor/skills/meta/hook-create
Command: npx skills add https://github.com/JuroOravec/agents --skill meta-hook-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cursor hooks provide a standardized way to configure and manage Cursor lifecycle hooks that run before or after key agent actions, enabling interception and automation without invasive changes.

Core Features & Use Cases

  • Create and modify the .cursor/hooks.json to define events like beforeSubmitPrompt, beforeReadFile, beforeShellExecution, and stop.
  • Provide and manage hook scripts (shell or JS/TS) that receive JSON payloads and perform automation, auditing, or context injection.
  • Use examples like capture-prompts to implement auditing, logging, and automated responses.

Quick Start

Configure a beforeSubmitPrompt hook to log messages to .cursor/logs and then reload Cursor to apply changes.

Frequently Asked Questions about meta-hook-create

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Cursor lifecycle hooks to intercept agent actions?

Cursor lifecycle hooks intercept agent actions by defining events in a .cursor/hooks.json file, writing shell or JS/TS scripts to process JSON payloads, and reloading the Cursor window to apply the automation changes.

What is a .cursor/hooks.json file used for in workflow automation?

A .cursor/hooks.json file is used to define Cursor lifecycle events like beforeReadFile, beforeShellExecution, and stop, enabling you to run custom hook scripts that perform auditing, logging, or context injection before or after key agent actions.

Can I use shell scripts for Cursor hooks to automate pre-action logic?

Yes, you can use shell scripts for Cursor hooks to automate pre-action logic. Hook scripts can be written in shell or JS/TS, receive JSON payloads containing event data, and execute automation or auditing tasks across lifecycle events like beforeMCPExecution.

How do I capture and log prompts submitted in Cursor?

To capture and log prompts in Cursor, configure a beforeSubmitPrompt hook in your .cursor/hooks.json file that triggers a script to write message payloads to a log file, such as .cursor/logs, then reload the Cursor window to activate the logging automation.

What lifecycle events are available to intercept in Cursor hooks?

Available Cursor hook lifecycle events include beforeSubmitPrompt, beforeReadFile, beforeShellExecution, beforeMCPExecution, and stop. These events allow you to intercept agent actions and execute custom scripts for context injection or auditing.

Do I need to reload Cursor after modifying hooks.json configurations?

Yes, you need to reload the Cursor window after modifying hooks.json configurations. Reloading the Cursor window is required to apply changes and activate newly defined lifecycle hooks and their associated automation scripts.