with one click
suggesting-cursor-hooks
// When the user keeps asking for the same check to run (lint, tests, type-check), suggest a Cursor hook to automate it.
// When the user keeps asking for the same check to run (lint, tests, type-check), suggest a Cursor hook to automate it.
Generate or edit images using the OpenAI Image API (gpt-image-2). Use when the user asks to generate, create, draw, render, illustrate, mock up, or edit an image, icon, logo, mockup, illustration, OG image, blog hero, marketing asset, or similar visual. Also use when the user supplies a reference image and asks to modify, restyle, or remix it. Triggers on: "generate an image", "create an image", "make a picture of", "edit this image", "restyle this", "make a mockup of", "draw a", "render a", "illustration of".
When the same multi-step workflow repeats in Cursor (user corrections or agent redos), capture it as a new SKILL.md under .cursor/skills/ so future sessions load it automatically.
After navigating and interacting in Cursor's built-in browser, use browser_network_requests to audit every fetch/XHR for failures, slowness, duplicate calls, and suspicious payloads. Use for API-heavy pages and after backend or client networking changes.
When GitHub Actions fails, fetch failing job logs and assign each failing job to a separate subagent that fixes its slice of the problem in parallel. Use for multi-job CI failures where jobs are independent.
Run four parallel read-only subagents that each review the same diff from a different lens — security, performance, correctness, and readability — then merge findings into one report. Use before merging large or risky PRs.
Execute a user flow step-by-step in Cursor's built-in browser while documenting each action, then emit a Playwright test that replays the same flow using stable selectors derived from the accessibility tree.
| 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 |
Watch for repeated manual requests. When the user keeps asking you to run the same command after changes, suggest a hook to automate it.
Suggest a hook when you notice:
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:
{
"hooks": [
{
"event": "afterFileEdit",
"script": ".cursor/hooks/<name>.sh",
"pattern": "<glob>"
}
]
}
| 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 |
.cursor/hooks.json first — merge, don't overwrite