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
- Create .cursor/hooks.json.
- Cloud agents run command-based hooks from the repo (beforeShellExecution, afterFileEdit, preToolUse, stop, …).
- Type /create-hook to scaffold.
- .cursor/hooks.json
- .cursor/hooks/format.sh
- chmod +x .cursor/hooks/format.sh
Load.cursor/hooks.json + format.sh. Exit 0/2. Repo only.
--- 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.
