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.
npx agentmods add rules/ivangrynenko/cursorrules/improve-cursorrules-efficiencygit clone --depth 1 https://github.com/ivangrynenko/cursorrulesWhat 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.
| Model | Per session | Once 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 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- improve-cursorrules-efficiency — 100% identical, 0 lines differ
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:
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.
- yesterday First seen · 115 lines · 1,068 tokens per session scan A 9013de123a9d
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.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.