# Cursor Hooks

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

- **Type:** Skill
- **Install:** `agentstack add skill-hktitan-cursor-sdk-cursor-hooks`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [HKTITAN](https://agentstack.voostack.com/s/hktitan)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [HKTITAN](https://github.com/HKTITAN)
- **Source:** https://github.com/HKTITAN/cursor-sdk/tree/main/skills/cursor-hooks
- **Website:** https://skills.sh/hktitan/cursor-sdk

## Install

```sh
agentstack add skill-hktitan-cursor-sdk-cursor-hooks
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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]]

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [HKTITAN](https://github.com/HKTITAN)
- **Source:** [HKTITAN/cursor-sdk](https://github.com/HKTITAN/cursor-sdk)
- **License:** MIT
- **Homepage:** https://skills.sh/hktitan/cursor-sdk

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hktitan-cursor-sdk-cursor-hooks
- Seller: https://agentstack.voostack.com/s/hktitan
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
