improve-cursorrules-efficiency

A rule that analyzes repeated or unsuccessful AI requests in Cursor, an AI code editor, and suggests ways to make future requests clearer and less repetitive.

In plain words
What is it for?
It is for reviewing inefficient prompts and updating related Cursor rules with more specific guidance, structure, or task breakdowns.
Why use it?
It helps address cycles of retries, rewrites, and corrections that indicate the agent did not understand the task or produce a useful result.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/ivangrynenko/cursorrules/improve-cursorrules-efficiency
Clone the repo
git clone --depth 1 https://github.com/ivangrynenko/cursorrules

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,068 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01068
Opus 5 $0.00000 $0.00534
Sonnet 5 $0.00000 $0.00214
Haiku 4.5 $0.00000 $0.00107

Measured yesterday against content hash 9013de123a9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

improve-cursorrules-efficiency scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/improve-cursorrules-efficiency.mdc · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Query Efficiency & Auto-Optimization

Ensures Cursor analyzes AI query efficiency, detects repeated requests, and automatically updates relevant rules to improve response quality and reduce redundancy.

actions:

  • type: analyze conditions:

    • pattern: "(?i)(retry|again|fix this|not what I expected|didn't work|rewrite|regenerate)" message: "Detected inefficiencies or repeated requests. Initiating efficiency analysis..." execute: |
    • Identify inefficiencies in AI responses by comparing previous queries and results.
    • Suggest improvements in query structure or Cursor usage based on analysis:
      • Use more specific or detailed prompts.
      • Implement structured queries for complex tasks.
      • Provide feedback on past responses for better contextual understanding.
      • Break down complex tasks into smaller, more manageable steps.
      • Use specific technical terminology for clearer communication.
    • Automatically update relevant Cursor rules:
      • Enhance pattern recognition for similar future queries.
      • Adjust rule priorities or conditions to prevent repeat inefficiencies.
      • Update rule suggestions to guide users towards more effective interactions.
      • Create new rules for frequently encountered patterns.
  • type: suggest message: |

    Query Optimization Recommendations

    I notice you're making multiple requests for similar tasks. Here's how to optimize your AI interactions:

    1. Refine Your Prompts

    • Be more specific: Include technical details, file paths, and exact requirements
    • Use structured formats: For complex requests, use bullet points or numbered lists
    • Include context: Mention relevant technologies, frameworks, or standards
    • Set clear expectations: Specify the format and level of detail you need

    2. Break Down Complex Tasks

    • Split large tasks into smaller, focused requests
    • Ask for step-by-step approaches for complex problems
    • Request specific examples for unclear concepts

    3. Provide Feedback

    • Tell the AI what worked and what didn't in previous responses
    • Clarify misunderstandings explicitly
    • Highlight successful parts of previous responses

    4. Use Technical Terminology

    • Use precise technical terms for your domain (Drupal, Lagoon, etc.)
    • Reference specific functions, methods, or patterns
    • Mention relevant standards or best practices

    5. Leverage Cursor Features

    • Use file references when discussing specific code
    • Reference line numbers for targeted changes
    • Utilize code blocks for examples

    The system will now optimize rules based on this interaction pattern to improve future responses.

  • type: auto_update target: ".cursor/rules/ai-optimization.mdc" conditions:

    • pattern: "(?i)(retry|again|fix this|not what I expected|not what I meant|didn't work|rewrite|regenerate)" message: "Updating AI efficiency rules based on detected inefficiencies or repeated queries."
  • type: log message: "AI Query Efficiency Analysis: [{{query_count}} queries in {{time_period}} detected inefficiency.]" conditions:

    • pattern: "(?i)(retry|again|fix this|not what I expected|didn't work|rewrite|regenerate)"

examples:

  • input: | "This Drupal module is not working, let's try again." "That didn't work, let's refine the approach." "Please rewrite this code to be more efficient." output: | Cursor detects inefficiency in queries and suggests:

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 115 lines · 1,068 tokens per session scan A 9013de123a9d

Subscribe to this mod's changes

improve-cursorrules-efficiency is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,068 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.