Cursor Rules Explained: Rule Types and When to Use a Skill
How Cursor Project, User and Team Rules activate, how nested AGENTS.md files differ, and when a task-specific procedure belongs in an Agent Skill.
Updated · Markdown version
Cursor rules are reusable instructions included when their activation conditions apply, so relevant conventions need not be repeated in every prompt. They sit alongside AGENTS.md, a plain Markdown instruction file supported by Cursor and other coding agents; the formats differ in activation, scope and portability.
Rule types and where they live
Cursor's rules documentation lists four sources of instructions. Project rules live in .cursor/rules and can be committed with the code, making them available to teammates who use Cursor with that repository. User rules are set under Customize and apply across projects in Agent chat. Team rules are managed from the Cursor dashboard on Team and Enterprise plans. AGENTS.md is plain Markdown in the project root, and the docs say it also works in subdirectories. Project rules must use the .mdc extension. Cursor ignores plain .md files in .cursor/rules; adding frontmatter without changing the extension does not make a .md file a Project Rule.
The frontmatter keys are description, which lets Agent decide when to pull in the rule, globs, which attaches the rule when matching files are in context, and alwaysApply, which includes the rule in every chat session when set to true.
Worked example: a team wants React components anywhere in the repository to use function components and named exports. A rule scoped to **/*.tsx states that convention once. When the agent edits Button.tsx, the rule is relevant. When it edits a Python script, the rule adds nothing. The useful question is whether the rule should load for every session or only when matching files are open.
What a rule is not: it gives no assurance that the agent follows the instruction on every run. It is context the agent reads, so vague wording or a contradiction with another file weakens it.
How AGENTS.md fits in
AGENTS.md has no required fields, so the headings can match the project: build steps, test commands and conventions. Agents read the nearest file in the directory tree. In a monorepo, a package-level AGENTS.md takes precedence over the root file for that package. Explicit instructions in a chat prompt override both.
Cursor is among the tools that read AGENTS.md. A team that already keeps AGENTS.md can often avoid a second instruction format for shared facts. Cursor-specific scoping, such as globs patterns or the alwaysApply switch, belongs in the .mdc project rules.
Comparison
| Question | Cursor project rule | AGENTS.md |
|---|---|---|
| Location | .cursor/rules | Project root, also subdirectories |
| Format | .mdc file with frontmatter | Plain Markdown, no required fields |
| Read by | Cursor | Cursor and many other agents |
| Scope | alwaysApply, globs, Agent selection from description, or manual @-mention | Parent and nested files are combined for the working path; more specific nested instructions take precedence |
Decision rule: choose AGENTS.md for facts every agent needs, such as build and test commands. Choose a Cursor rule when the instruction matters only for certain files or only inside Cursor.
When a rule should become a skill
A rule should become a skill when it turns into a procedure: a sequence of checks, a template, or a migration that runs only sometimes. Short conventions stay as rules. A long runbook pasted into an always-on instruction file costs context on every session, and that growth is the usual sign that the file is drifting.
Pitfalls
- Two files state the same convention and then disagree after one is edited. Notice it by searching for a key term across rule and instruction files. Fix it by keeping one source and pointing to it from the other.
- A rule scoped too broadly loads on unrelated files. Notice it when suggestions appear in code the rule was never meant for. Narrow the file pattern.
- A long always-on file consumes context and makes maintenance harder. Keep rules focused, reference canonical examples, and move task-specific procedures into a skill. A shorter rule can improve clarity, but it still does not guarantee model compliance.
- A rule is changed, but the old behavior remains. Notice it by rerunning a sample task. Confirm the change in a fresh session before relying on it.
- Rules copied from another editor keep that editor's assumptions. Notice it when a rule names a tool or path the project does not use. Rewrite it for the current setup.
When to use a skill instead
Rules suit short standing conventions that apply to a path or a whole repository. A reusable skill fits better when the instruction is a multi-step workflow the agent runs on request. The catalogue links rules-to-skills-migration and agent-instruction-files as related resources. Their recorded checks are Claude Code recognition probes, not Cursor migrations or end-to-end task tests, so review their instructions before applying them. For Cursor's documented conversion path, use /migrate-to-skills and review the generated files; a note that matters for only one prompt needs neither a persistent rule nor a skill.
FAQ
Are Cursor rules the same as AGENTS.md?
Not exactly. AGENTS.md is a plain Markdown file with no required fields that many agents read, while Cursor rules are Cursor's own configuration with scoping options. Cursor reads AGENTS.md as well.
Should every rule become a skill?
No. Keep short conventions that should always apply as rules, and move long, multi-step procedures into a skill that loads when the task calls for it.
What frontmatter does a Cursor rule need?
The rules docs define description, globs and alwaysApply, but a manually applied rule can omit all three and be included only when @-mentioned. Use globs: "**/*.tsx" for React files anywhere in the repository, or alwaysApply: true for every chat. These settings control inclusion, not guaranteed obedience.
Related skills in this catalog
Platform Score is our assessment under a published method. It is not a safety guarantee.
Related guides
Terms this guide uses
This item is a worked example in the AI glossary for:
Sources
- https://agents.md (accessed 2026-11-27)
- https://cursor.com/docs/rules (accessed 2026-11-27)