Skip to main content

cursor-hooks

File-based agent loop hooks via `.cursor/hooks.json` — pre/post commands, governance gates. Use when enforcing policy without modifying agent prompts.

Informations de source

Dépôt
HKTITAN/cursor-sdk
Dernière activité de la source
3 mai 2026 à 08:23
Langue détectée de SKILL.md
anglais
Étoiles
2
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Explorateur de fichiers
4 fichiers

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
cursor-hooks
description
File-based agent loop hooks via `.cursor/hooks.json` — pre/post commands, governance gates. Use when enforcing policy without modifying agent prompts.
metadata
{"internal":false,"source":"https://cursor.com/docs/sdk/typescript"}
# cursor-hooks Hooks are **file-based**, not programmatic. The SDK does not expose JS callbacks for the agent loop — use `.cursor/hooks.json` and rely on `local.settingSources` to load them. ## When to use - Lint / type-check gates before agent commits - Audit logging or compliance commands after each turn - Fail-fast policies that must run regardless of prompt ## Concepts - [[references/file-format]] — `.cursor/hooks.json` shape - [[references/loading]] — `settingSources` and project vs user vs team scope - [[references/programmatic-alternatives]] — what to use when you need JS callbacks (`onDelta`, `onStep`) ## Cross-links - `local.settingSources` → [[../cursor-sdk/references/local-options]] - Stream-side observation → [[../cursor-runs/references/interaction-updates]] - Sibling `.cursor/` features → [[../cursor-rules/SKILL]] · [[../cursor-skills-system/SKILL]]
Voir sur GitHub