Skip to content

Cursor ignores your project rules: what to check

By the Toolbay team · Checked against the sources below on

Cursor applies a project rule only if it is an .mdc file in .cursor/rules with frontmatter that matches how you want it used: alwaysApply for every chat, globs for matching files, or a description so the agent can pick it. A plain .md file there is not a rule. Open Customize to see every rule and its status.

Checklist

  1. File type and place: .cursor/rules/<name>.mdc (subfolders are fine). For plain Markdown without frontmatter, use AGENTS.md instead; Cursor reads it in the root and in subfolders.
  2. Rule type matches the frontmatter. Always Apply needs alwaysApply: true. Apply to Specific Files needs globs and attaches when a matching file is in context. Apply Intelligently needs a description the agent can match. Apply Manually rules load only when you @-mention them.
  3. Glob covers the files you are editing. A rule for src/app/api/**/*.ts does nothing in a chat about a component.
  4. Size: Cursor's docs say to keep rules under 500 lines and split big ones into smaller rules.
  5. Status: Customize shows all rules and their status.

User rules and project rules

User Rules, set in Customize, apply to every project you open. Project rules live in the repo and are version-controlled, so the whole team gets them. If a teammate does not see your rule, it is probably a user rule on your machine.

.cursor/rules/api-routes.mdc
---
description: Conventions for API route handlers
globs: src/app/api/**/*.ts
alwaysApply: false
---

- Validate input with the schema in src/lib/schemas.ts.
- Return errors as { error: string } with a 4xx status.

If a rule is a long procedure rather than a short constraint, make it a skill instead: Cursor loads skills from .cursor/skills/ and .agents/skills/, and also from Claude Code's .claude/skills/.

When a skill or vault helps, and when it does not

Helps

  • Turning a 20-step rule into a skill means it loads only when needed and stops diluting every chat.
  • One skill folder works in Cursor, Claude Code and Codex, so the team keeps one copy.

Does not help

  • A skill will not fix a rule with the wrong frontmatter; fix the rule type first.
  • Short, always-true constraints belong in a rule or AGENTS.md, not in a skill.