Skip to content
Back to skills

Suggesting Cursor Hooks

ASecurity

When the user keeps asking for the same check to run (lint, tests, type-check), suggest a Cursor hook to automate it.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 10, 2026
testingshell

Works with

  • cursor

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add 0xAidan/polymarket-bot-test --skill suggesting-cursor-hooks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Suggesting Cursor Hooks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Suggesting Cursor Hooks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0xaidan-suggesting-cursor-hooks/badge)](https://www.skillsdirectory.com/skills/0xaidan-suggesting-cursor-hooks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: suggesting-cursor-hooks
description: When the user keeps asking for the same check to run (lint, tests, type-check), suggest a Cursor hook to automate it.
user-invocable: false
---

# Suggesting Cursor Hooks

Watch for repeated manual requests. When the user keeps asking you to run the same command after changes, suggest a hook to automate it.

## Triggers

Suggest a hook when you notice:
- The user asks you to **run the same check 2+ times** (e.g. "run lint", "run tests", "check types")
- The user says "always run X after editing" or "make sure to test after changes"
- You keep forgetting to run a validation step and the user catches it
- A CI failure could have been caught locally with a post-edit check

## How to Suggest

```
You've asked me to run [command] after edits a few times. Want me to 
set up a Cursor hook so it runs automatically?
```

If they say yes, create `.cursor/hooks.json` and the script:

```json
{
  "hooks": [
    {
      "event": "afterFileEdit",
      "script": ".cursor/hooks/<name>.sh",
      "pattern": "<glob>"
    }
  ]
}
```

## Common Hooks to Suggest

| User keeps asking... | Hook |
|---------------------|------|
| "run lint" / "fix formatting" | `afterFileEdit` → `eslint --fix` or `prettier --write` |
| "check types" | `afterFileEdit` → `tsc --noEmit` on `.ts`/`.tsx` |
| "run tests" | `afterFileEdit` → run related test file |
| "don't touch .env" | `beforeShellExecution` → warn on secrets files |
| "make sure it builds" | `stop` → quick build check |

## Rules

- Only suggest after a real repeated pattern, not preemptively
- Hook scripts must be fast (under 5 seconds) or the agent feels slow
- Scripts should exit 0 and report via stdout — don't block the agent unless the user explicitly wants that
- Check for existing `.cursor/hooks.json` first — merge, don't overwrite
- Keep it casual — "want me to automate this?" not a formal proposal

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…