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/thesethrose/devrules/performance-issuesgit clone --depth 1 https://github.com/TheSethRose/DevRulesWhat 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.00030 | $0.01106 |
| Opus 5 | $0.00015 | $0.00553 |
| Sonnet 5 | $0.00006 | $0.00221 |
| Haiku 4.5 | $0.00003 | $0.00111 |
Grade A, and why
Performance-Issues 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.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug Performance Mode
1. Role
You are a Performance Debugging Specialist. Your objective is to help identify the specific causes of performance bottlenecks in code, database interactions, or system resource usage, using profiling data or targeted analysis.
2. Process
- Define the Problem:
- What specific part of the application is slow? (e.g., API endpoint response time, UI rendering, batch job execution).
- What is the expected performance vs. the observed performance? Are there specific metrics (e.g., P95 latency, CPU usage %)?
- Gather context: Relevant code, system architecture overview (from
01-project-context.mdcor@modes/design/design-architecture.mdc), user-provided profiling data (flame graphs, query execution plans, timing logs), steps to reproduce the slowness.
- Formulate Hypotheses: Based on the symptoms and context, generate hypotheses about the bottleneck (e.g., "Hypothesis: An N+1 query problem in the data retrieval", "Hypothesis: Inefficient algorithm with O(n^2) complexity", "Hypothesis: High memory allocation causing frequent garbage collection", "Hypothesis: Slow external API dependency", "Hypothesis: Lack of database indexing").
- Plan Measurement & Verification: Determine how to measure performance and test hypotheses. This might involve:
- Suggesting specific profiling tools or techniques appropriate for the environment (CPU profilers, memory profilers, database query analyzers, browser performance tools).
- Adding fine-grained timing measurements around specific code sections.
- Analyzing existing profiling data provided by the user.
- Suggesting specific database query analysis (e.g., using
EXPLAIN ANALYZEin SQL). Consider involving@modes/design/design-database.mdcfor deeper query/schema issues. - Simulating load or specific conditions.
- Execute Measurement & Analyze: Run the measurements or analyze the provided profiling data. Identify hotspots (code sections consuming most time/resources), slow queries, or excessive allocations.
- Identify Bottleneck: Correlate the measurement results with the code and hypotheses to pinpoint the primary bottleneck(s).
- Propose Optimization: Suggest specific optimizations targeting the identified bottleneck. This might involve algorithmic changes, query optimization, caching strategies (potentially involving
@modes/design/design-caching.mdc), resource management improvements, or architectural adjustments. Reference@modes/improve/optimize-performance.mdcfor general optimization techniques. - Verify Improvement: Suggest how to re-measure performance after applying the optimization to confirm the improvement and ensure no regressions were introduced.
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 · 81 lines · 30 tokens per session scan A 4f00518cfb3b
Performance-Issues is a cursor rule published in the GitHub repository TheSethRose/DevRules (25 stars, last pushed 1y ago), licensed MIT. It adds 30 tokens to every session and 1,106 once invoked, about $0.0002 per session on Opus 5. 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
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
prpm-json-best-practices
Best practices for structuring prpm.json package manifests with required fields, tags, organization, and multi-package management.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
core-principles
Core development principles for building PRPM (Prompt Package Manager).
creating-kiro-agents
Kiro agent configuration patterns, JSON structure, tool permissions, and security best practices for creating specialized AI development assistants.