Rules & instructions Official

Cursor Rules

Persistent prompt-level instructions for Cursor Agent: project .mdc rules, user rules, team rules and AGENTS.md.

Author
Cursor (Anysphere)
Works with
Cursor
Documented
Oct 2, 2026

What Cursor Rules is

Rules provide reusable context included at the start of the model context. Project rules live in .cursor/rules as version-controlled .mdc files with frontmatter. Cursor also supports User Rules, Team Rules and AGENTS.md as a simpler alternative.

What it does

How Cursor Rules plugs in: which agents run it and what it addsRUNS INYour agentCursorone host documentedRULES · OFFICIALCursor RulesProject instructions the agent re…4 install stepsno extra permissions listedWHAT IT ADDSWhat it doesProject rules in .cursor/rules as…Four apply modes: Always, Intelli…User Rules (global), Team Rules (…/create-rule in Agent chat genera…agent → extension → new capability · from the official repository or docs
Where Cursor Rules runs and what it adds, from its documentation
  • Project rules in .cursor/rules as .mdc files with description, globs and alwaysApply frontmatter
  • Four apply modes: Always, Intelligently (by description), Specific Files (globs), Manual (@-mention)
  • User Rules (global), Team Rules (dashboard, Team/Enterprise plans) and AGENTS.md
  • /create-rule in Agent chat generates a rule file

When to use it

Good fit

  • Encode codebase conventions that Agent should follow every session
  • Scope guidance to certain paths with globs
  • Share rules with a team via Team Rules

Not for

  • Plain .md files in .cursor/rules: they are ignored; use .mdc or AGENTS.md
  • Copying whole style guides: use a linter instead

How to install Cursor Rules

You need: Cursor

  1. Type /create-rule in Agent and describe the rule, or open Customize > Rules > Add Rule
  2. Rule is saved to .cursor/rules/.mdc
  3. Set frontmatter: description, globs, alwaysApply
  4. Commit the folder so the team shares it
Configuration example (from the official docs)
---
globs: src/components/**/*.tsx
alwaysApply: false
---
- Use named exports, not default exports

Limitations

  • Docs recommend keeping rules under 500 lines
  • Team Rules need Team or Enterprise plan

Tools it extends

Frequently asked questions

What file extension do Cursor project rules need?

They must be .mdc; a plain .md in .cursor/rules is ignored. source

How does Cursor decide when to apply a rule?

alwaysApply true always includes it; globs auto-attach on matching files; a description alone lets Agent decide; none means @-mention only. source

Does Cursor support AGENTS.md?

Yes, as a simple alternative to .cursor/rules. source

How do I create a Cursor rule quickly?

Type /create-rule in Agent chat. source

Related guides

Sources and gaps

Not stated by the maintainers: Cursor is closed source; repo_url is a placeholder for the public getcursor org, not a verified rules repo; docs.cursor.com/en/context/rules served an SPA shell; content read from cursor.com/docs/rules; Public source repository (closed source or not verified).

More extensions to look at