Cursor rules token limit: 500 lines, four rule types, and what you pay every request
Cursor project rules live in .cursor/rules as .mdc files. When a rule is applied, its
contents are included at the start of the model context — so every always-on rule is a permanent tax on the
window. Cursor’s rules docs also give a practical size limit: keep each rule under about 500 lines. Here is how
the four rule types decide when you pay, and how to measure the bill with Clogmeter.
Four rule types (frontmatter decides)
Cursor’s rules documentation describes four types, controlled by frontmatter fields
alwaysApply, description, and globs:
| Rule type | Frontmatter | When it costs tokens |
|---|---|---|
| Always Apply | alwaysApply: true | Every chat; globs and description are ignored |
| Apply to Specific Files | globs set, alwaysApply false | When a matching file is in context |
| Apply Intelligently | description only | When the agent decides the rule is relevant |
| Apply Manually | none of the three | Only when you @-mention the rule |
AGENTS.md is a simpler always-on alternative without frontmatter — useful for short, shared
guidance, but it pays the same always-on cost as Always Apply rules.
The ~500-line best practice
Cursor’s rules docs recommend keeping rules under 500 lines, splitting large rules into focused ones, and
referencing files with @path instead of pasting their contents. Referenced file contents are
not inlined into the prompt; the agent reads them with tools when needed. That means a long
template pasted into a rule costs tokens on every apply, while @service-template.ts does not until
the agent opens it.
Details above follow Cursor’s rules documentation (cursor.com/docs/rules). Exact behaviour can change between versions — check the current docs before relying on a detail.
What that means for your budget
- Always Apply is the expensive default. A 2,000-token always-on rule runs on every chat, whether the topic needs it or not.
- Globs and descriptions buy specificity. A rule that only loads for
src/api/**or when the agent judges it relevant stays out of unrelated sessions. - Manual rules are free until mentioned. Rare checklists belong behind an
@-mention, not in Always Apply. - Over-500-line rules are a smell. Split them, or move long examples into files you reference with
@path.
Trim checklist
- Prefer glob, description, or manual over Always Apply for bulky guidance.
- Split rules over ~500 lines into focused
.mdcfiles. - Reference files with
@pathinstead of pasting templates or long snippets. - Weigh always-on rules in Clogmeter — paste Always Apply rules and
AGENTS.mdfirst, then decide what can drop a level.
Measure with Clogmeter
Use the free Cursor rules token counter to count a single
.mdc file, or open the full inspector to weigh your rules folder alongside
AGENTS.md / CLAUDE.md, spot duplicates, and export a trimmed copy. Nothing is uploaded —
analysis runs in the browser.