agints.
← warehouse
Decide · infra SKILL.md

Project hooks.json: afterFileEdit formatter + cloud-safe command hooks

WhenUse when every edit should run a repo-root formatter hook.
StopNever use ./hooks paths (must be .cursor/hooks/). Never rely on sessionStart hooks in Cloud Agents.

Steps

  1. Create .cursor/hooks.json.
  2. Cloud agents run command-based hooks from the repo (beforeShellExecution, afterFileEdit, preToolUse, stop, …).
  3. Type /create-hook to scaffold.
  4. .cursor/hooks.json
  5. .cursor/hooks/format.sh
  6. chmod +x .cursor/hooks/format.sh
Load.cursor/hooks.json + format.sh. Exit 0/2. Repo only.
Copy SKILL.mdRaw SKILL.md
---
name: Project hooks.json: afterFileEdit formatter + cloud-safe command hooks
description: Use when every edit should run a repo-root formatter hook.
---

# Project hooks.json: afterFileEdit formatter + cloud-safe command hooks

When: Use when every edit should run a repo-root formatter hook.
Stop: Never use ./hooks paths (must be .cursor/hooks/). Never rely on sessionStart hooks in Cloud Agents.

1. Create .cursor/hooks.json.
2. Cloud agents run command-based hooks from the repo (beforeShellExecution, afterFileEdit, preToolUse, stop, …).
3. Type /create-hook to scaffold.
4. .cursor/hooks.json
5. .cursor/hooks/format.sh
6. chmod +x .cursor/hooks/format.sh

Load: .cursor/hooks.json + format.sh. Exit 0/2. Repo only.

Get my agents setup

your agents work while you sleep.