Cursor token budget: how many rules is too many?
The problem
Cursor loads your rules into the context window alongside your code, your prompt, and the files it's editing. The context window is finite. Every token spent on rules is a token not spent on understanding your code.
If you have 20 rules with alwaysApply: true, all 20 load on every request. Even if you're editing a Python file and half your rules are about React.
How to measure your token usage
Run the stats command to see a breakdown:
npx cursor-doctor stats
This shows you each rule's estimated token count, which are always-loaded vs conditional, and the total budget your rules consume per request.
For a deeper analysis:
npx cursor-doctor budget
The budget command breaks down always-loaded tokens vs conditional tokens, flags oversized rules, and identifies waste.
What "too many" actually looks like
From our testing with 50 rules across real codebases:
- Clean test files: 100% compliance at every rule count (1 to 50)
- Real codebases (~900 lines): 96-98% compliance at 50 rules. 1-2 rules silently ignored per run, random ones each time.
So 50 rules works, but you're losing 2-4% reliability. The practical limit depends on how critical each rule is to you.
The real issue isn't rule count. It's alwaysApply overuse. 50 well-scoped rules with globs perform better than 10 rules all set to alwaysApply, because scoped rules only load when relevant.
How to cut token waste
- Use globs instead of alwaysApply. A React rule should target
*.tsxand*.jsx, not load on every file. Only truly global rules (naming conventions, comment style) needalwaysApply: true. - Remove redundant rules. Run
npx cursor-doctor scanto find duplicates. Two rules saying the same thing in slightly different words wastes tokens for zero benefit. - Keep rules short and specific. A 200-token rule that says "use try-catch in API routes with this exact pattern" beats a 1,000-token rule that explains error handling philosophy.
- Add code examples, cut prose. An example is worth 50 tokens of explanation. Show the model what you want instead of describing it.
- Split oversized files. Any rule over 500 tokens should probably be two rules. Run
npx cursor-doctor fix(Pro) to auto-fix oversized rules, or split them manually.
The ideal setup
Most projects do well with:
- 3-5 global rules (
alwaysApply: true): naming, comments, error format, commit style - 5-15 scoped rules (with globs): framework conventions, test patterns, API routes, component structure
- Total budget under 3,000 tokens always-loaded
Related guides
- How to write Cursor rules that actually work
- How to fix Cursor rule conflicts
- Sharing Cursor rules across a team
Check your token budget
See exactly how many tokens your rules consume and where the waste is.
npx cursor-doctor budget