5 Cursor rule mistakes that make the AI ignore you
Cursor reads your .cursor/rules/ directory to understand how you want code written. But it doesn't validate your rules. If something is wrong, you won't see an error. You'll just notice Cursor "ignoring" your instructions and wonder why.
These are the five most common mistakes. All of them are found in real, public repositories. All of them are silent.
#1. The rule that never loads
This rule looks correct. It has valid YAML, a clear description, and specific instructions. It will never be applied.
---
description: TypeScript naming conventions
alwaysApply: false
---
Use camelCase for variables and functions.
Use PascalCase for classes and interfaces.
Never abbreviate variable names.
→ Set alwaysApply: true for global rules, or add globs to scope to specific files
What's happening: When alwaysApply is false and there are no globs, the rule only activates if you reference it by name in chat. Most people never do. The rule exists in your directory, consumes zero tokens, and does nothing.
This is the single most common Cursor rule mistake. Over 5,000 public repositories on GitHub have rules configured this way.
The fix
Either set alwaysApply: true if you want it active on every request, or add globs to scope it to specific files:
---
description: TypeScript naming conventions
globs:
- "**/*.ts"
- "**/*.tsx"
---
#2. The contradiction
Two rules in the same project. Both set to alwaysApply: true. Both load on every request.
style-guide.mdc
Always use semicolons at the
end of statements.
Use double quotes for strings.
javascript.mdc
Omit semicolons at the end
of statements.
Use single quotes for strings.
✗ Semantic conflict in quote style: style-guide.mdc says "double quotes" but javascript.mdc says "single quotes"
What's happening: Cursor receives both rules in its context window. They say opposite things. Cursor picks one (unpredictably) and follows it. This is especially common when rules are copied from different sources or written by different team members.
Full guide: How to fix Cursor rule conflicts covers how to find, diagnose, and resolve every type of rule contradiction.
#3. The token hog
Every rule set to alwaysApply: true. Most instructions are things the model already knows.
---
description: General coding standards
alwaysApply: true
---
Write clean code.
Follow best practices.
Use proper naming conventions.
Handle errors properly.
⚠ Vague rule detected: "follow best practices" (line 6)
⚠ Vague rule detected: "use proper naming" (line 7)
⚠ Vague rule detected: "handle errors properly" (line 8)
What's happening: Every rule with alwaysApply: true gets loaded into the context window on every request. Vague instructions like "write clean code" don't change what the model does. They just consume tokens that could be used for actual code context. The model already follows best practices. Telling it to do so is like telling a chef to "cook good food."
The quick fix: Replace "write clean code" with "max 20 lines per function, extract helpers over nesting." Replace "handle errors properly" with "wrap route handlers in try-catch, return {error, code} on failure."
Full guide: Cursor token budget: how many rules is too many? covers how to measure your total token usage and cut waste.
#4. The Windows developer
Glob patterns written with Windows-style backslashes.
---
description: React component conventions
globs:
- "src\components\*.tsx"
- "src\pages\*.tsx"
alwaysApply: false
---
Use functional components with hooks.
Never use class components.
→ Use forward slashes for cross-platform compatibility.
⚠ Glob pattern uses Windows backslashes: src\pages\*.tsx
→ Use forward slashes for cross-platform compatibility.
What's happening: Glob patterns use forward slashes on all platforms. Backslashes are escape characters in most glob implementations. src\components\*.tsx doesn't match src/components/Button.tsx. The rule never loads for the files you intended.
This one is invisible because the rule is valid YAML and has correct frontmatter structure. Everything looks right until you realize the globs don't match anything.
The fix
globs:
- "src/components/**/*.tsx"
- "src/pages/**/*.tsx"
Always use forward slashes in globs, even on Windows.
#5. The YAML crime scene
Everything wrong at once. This is a real pattern found across multiple repositories, combined into one example.
---
description: Rules for my project
globs: "*.ts, *.tsx, *.js"
alwaysApply: "true"
priority: high
---
Follow best practices.
Write clean code.
→ alwaysApply should be a boolean (true or false), not a string ("true"). Remove quotes.
⚠ Frontmatter indentation uses tabs
→ YAML prefers spaces over tabs for indentation. Use 2 spaces.
⚠ Globs as comma-separated string. Consider using YAML array format
⚠ Unknown frontmatter key: priority
→ Valid keys: description, globs, alwaysApply. Unknown keys are ignored by Cursor.
⚠ Vague rule detected: "follow best practices" (line 7)
⚠ Vague rule detected: "write clean code" (line 8)
What's happening: Six issues in eight lines. alwaysApply: "true" (with quotes) is a string, not a boolean. Cursor may not interpret it correctly. The priority key doesn't exist in the .mdc spec and gets silently ignored. Comma-separated globs may not parse as you expect. Tabs in YAML can cause parsing errors in some environments. And both instructions are too vague to change model behavior.
Each of these issues is minor on its own. Together, they create a rule that might partially work, partially fail, and is impossible to debug without a linter.
The fix
---
description: TypeScript and JavaScript standards
globs:
- "**/*.ts"
- "**/*.tsx"
- "**/*.js"
---
Use const for all variables that aren't reassigned.
Wrap async operations in try-catch blocks.
Return early from functions instead of nesting if/else.
How to check your own rules
All five of these mistakes are caught automatically. Run this from your project root:
npx cursor-doctor lint
It scans every .mdc file, checks for 100+ issues including all the patterns above, and tells you exactly what's wrong and how to fix it. No install, no config, zero dependencies.
For a quick health grade:
npx cursor-doctor scan
Frequently asked questions
Why does Cursor ignore my rules?
The five most common causes: (1) alwaysApply: false with no globs, so the rule never loads, (2) two rules contradicting each other, so Cursor picks one silently, (3) vague instructions like "write clean code" that don't change model behavior, (4) glob patterns with Windows backslashes that don't match any files, and (5) broken YAML frontmatter that prevents the rule from parsing.
How many Cursor rules can I have before they stop working?
There is no hard limit on rule count, but every rule with alwaysApply: true consumes context window tokens. When your rules exceed 10-15% of the context window, Cursor starts dropping code context to make room. Run npx cursor-doctor scan to see your total token usage.
Does Cursor validate .mdc files?
No. Cursor does not validate .mdc rule files. If the YAML frontmatter is broken, the rule silently disappears. If two rules contradict each other, Cursor picks one without warning. You need an external linter like cursor-doctor to catch these problems.
Related guides
- How to lint your Cursor rules
- How to write Cursor rules that actually work
- How to fix Cursor rule conflicts
- Cursor token budget: how many rules is too many?
Check your rules now
Find out if your Cursor rules have any of these problems. One command, 10 seconds.
npx cursor-doctor lint
Or paste a single rule into the playground for instant feedback.