← All guides

Cursor token budget: how many rules is too many?

Every rule eats into your context window. Here's how to measure and optimize.

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:

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

  1. Use globs instead of alwaysApply. A React rule should target *.tsx and *.jsx, not load on every file. Only truly global rules (naming conventions, comment style) need alwaysApply: true.
  2. Remove redundant rules. Run npx cursor-doctor scan to find duplicates. Two rules saying the same thing in slightly different words wastes tokens for zero benefit.
  3. 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.
  4. Add code examples, cut prose. An example is worth 50 tokens of explanation. Show the model what you want instead of describing it.
  5. 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:

Related guides

Check your token budget

See exactly how many tokens your rules consume and where the waste is.

npx cursor-doctor budget