Cursor Skill

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.

LLM Mart · 0 points · 24 views 1 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download spencerpauly-awesome-cursor-skills-resources_suggesting-cursor-hooks-99cd265.zip · 1 KB
Part of spencerpauly/awesome-cursor-skills — 65 skills

Install

skills CLI npx skills add https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/suggesting-cursor-hooks
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install spencerpauly-awesome-cursor-skills@llmmart
Git git clone https://github.com/spencerpauly/awesome-cursor-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole spencerpauly/awesome-cursor-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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:

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

Common Hooks to Suggest

User keeps asking... Hook
"run lint" / "fix formatting" afterFileEditeslint --fix or prettier --write
"check types" afterFileEdittsc --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
Files (awesome-cursor-skills)
  • SKILL.md 1.9 KB
    ---
    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
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related