SkillAgentSearch skills...

cursor-hooks

This repository provides ready-to-use examples and documentation for Cursor's Agent Hooks.

Install / Use

npx skills add hamzafer/cursor-hooks

Installs into whichever agent you are using.

About this skill
📐

.cursorrules

Cursor IDE rules (legacy)

Quality Score

54/100

Supported Platforms

Cursor

Our assessment of cursor-hooks

cursor-hooks scores 54/100 on our quality scale, 1143rd of 1,175 Content & Media skills we index.

Its .cursorrules is 2.2 KB long, split into 7 sections and no code examples: moderately detailed.

It has 29 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
20/30
Structure
11/20
Description
12/15
Adoption
6/20
Freshness
5/15

Maintenance, license and trust

  • The repository was last updated about 13 months ago. Expect some instructions to reference tool versions or APIs that have since changed.
  • Our last check on 2026-10-21 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

cursor-hooks compared with similar skills

All 4 of these similar skills score higher than cursor-hooks; compare them before choosing.

SkillScoreStarsUpdatedFormat
cursor-hooks (this skill)by hamzafer542913mo ago.cursorrules
siyuanby siyuan-note10047.1ktodayMCP Server
changelog-videoby heygen-com10076.6k5d agoSKILL.md
content-research-writerby ComposioHQ10078.5k48d agoSKILL.md
competitor-profilingby coreyhaines3110057.7k6d agoSKILL.md

Frequently asked questions

How do I install cursor-hooks?
Run npx skills add hamzafer/cursor-hooks. The install tabs above show the steps for each supported agent.
Which AI agents does cursor-hooks work with?
It is written for Cursor, as a .cursorrules file. Other agents that read the same format can often use it too.
Is cursor-hooks safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is cursor-hooks still maintained?
The repository was last updated about 13 months ago. Expect some instructions to reference tool versions or APIs that have since changed.

Cursor Hooks Examples

This repo gives you copy‑paste ready recipes for Cursor's Agent Hooks. Hooks are lightweight scripts that exchange JSON with Cursor so you can observe, block, or mutate agent behavior.

Quickstart: Format Hook

Create a minimal hook that runs after every file edit. This repo already includes hooks.json and all referenced scripts under hooks/, so setup is just copying the files into ~/.cursor/.

  1. Copy hooks.json to ~/.cursor/hooks.json.
  2. Copy every script from hooks/ to ~/.cursor/hooks/.
  3. Run chmod +x ~/.cursor/hooks/*.sh to make them executable.
  4. Restart Cursor and verify the hook runs after edits. Tail /tmp/agent-audit.log or /tmp/hooks.log to confirm activity.

Why Hooks Matter

With a handful of scripts you can:

  • run formatters or linters immediately after Cursor edits a file
  • audit or block shell commands before they execute
  • redact secrets before the agent reads sensitive content
  • apply safety guardrails around MCP tool usage

Each hook definition maps to an executable script. Cursor streams JSON input on stdin and expects JSON back on stdout, letting you tailor the agent loop without patching Cursor itself.

Hook Catalog

Everything you need to mirror the documentation examples lives in this repository:

  • hooks.json wires each documented hook event to the scripts in hooks/.
  • hooks/format.sh is the minimal formatter-style hook used in the Quickstart.
  • hooks/audit.sh captures every payload into /tmp/agent-audit.log for auditing.
  • hooks/block-git.sh denies raw git usage, requests approval for gh, and logs decisions to /tmp/hooks.log.
  • hooks/redact-secrets.sh prevents Cursor from reading files that look like they contain GitHub tokens.

How To Use This Repo

  1. Copy hooks.json and the scripts in hooks/ into ~/.cursor/.
  2. Run chmod +x ~/.cursor/hooks/*.sh so Cursor can execute them.
  3. Tail /tmp/hooks.log or /tmp/agent-audit.log to verify hook activity.
  4. Restart Cursor after modifying any hook.

Contributing

Issues and pull requests are welcome. Please open an issue first if you plan to add new recipes or extend existing ones.

License

Released under the MIT License. See LICENSE.

Related Skills

View on GitHub
GitHub Stars29
CategoryContent
Updated1y ago
Forks2

Languages

Shell

Trust signals

80/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium1 low1 info