---
title: "How to use Cursor rules: .cursor/rules and rule types"
description: "A Cursor rule is an .mdc file in .cursor/rules. Its description, globs, and alwaysApply fields decide if it applies always, by file, by relevance, or on @."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# How do you use Cursor rules (.cursor/rules) and which rule type should you pick?

Short answer

Project rules are .mdc files in .cursor/rules, kept in version control. The description, globs, and alwaysApply fields set one of four modes: Always Apply, Apply Intelligently, Apply to Specific Files, or Apply Manually. Cursor ignores a plain .md file in that folder; use AGENTS.md for plain markdown.

*Piet Baudoin · published November 16, 2026 · November 16, 2026*

## The four kinds of rules

Cursor has four kinds of rules. They look alike until you ask who manages them:

| Kind | Where | Who it is for |
| --- | --- | --- |
| Project Rules | `.cursor/rules/` in the repository, as `.mdc` | Everyone working in that repository |
| User Rules | Customize > Rules | Only you, across all projects, Agent (Chat) only |
| Team Rules | The Cursor dashboard, managed by team admins | The whole team, on a Team or Enterprise plan |
| AGENTS.md | Project root or a subdirectory | Everyone, and other AI tools too |

This page covers Project Rules, since those are the ones you set up yourself. Team Rules are covered in [How do you share context and team rules in Cursor](https://bombos.ai/en/questions/cursor/share-cursor-context-with-team/).

## How to add a rule

1.  Type `/create-rule` in Agent and describe what the rule should do. Or open Customize in the sidebar, go to Rules, and click Add Rule.
2.  Check that the file is in `.cursor/rules/` and ends in `.mdc`. Subfolders are fine, for example `.cursor/rules/frontend/`.
3.  Pick the mode (below). It sets the fields at the top of the file.
4.  Commit the file, so everyone in the repository gets the same rule.

A rule, for example `.cursor/rules/api.mdc`, looks roughly like this:

```
---
description: Conventions for API routes and error handling
globs: src/api/**/*.ts
alwaysApply: false
---
Always use the error class from src/lib/errors.ts.
Return a 4xx with a readable message, never a stack trace.
```

## The four modes

| Mode | Fields | When the agent uses it | Use it for |
| --- | --- | --- | --- |
| Always Apply | `alwaysApply: true` | Every chat session | A few hard agreements: language, style, things that must never happen |
| Apply Intelligently | `alwaysApply: false`, a description, no globs | When the agent decides it is relevant based on the description | Knowledge you need sometimes, like how to write a migration |
| Apply to Specific Files | `alwaysApply: false` with globs | When a file matches the globs | Rules per part of the code: tests, API, styling |
| Apply Manually | `alwaysApply: false`, no globs, no description | Only when you @-mention it, for example `@api` | Procedures you call on purpose now and then |

The fields behind that choice are `description`, `globs`, and `alwaysApply`. For Apply Intelligently, the description is everything: it is the only line the agent sees when deciding. So write when the rule applies, not what is in it.

## The common mistake: .md versus .mdc

A lot of advice online says you can drop plain markdown into `.cursor/rules`. Cursor’s own docs say otherwise: project rules must use the `.mdc` extension, and a plain `.md` file in `.cursor/rules` is ignored by the rules system. If you want plain markdown without fields, use `AGENTS.md` in the root or in a subdirectory. Nested AGENTS.md files are combined with their parents, and the more specific one wins.

A second trap is setting everything to Always Apply. Every always-on rule takes space in every conversation. Cursor recommends keeping rules under 500 lines and splitting big ones. Keep Always Apply for the few things that truly always hold, and let globs or a good description pick the rest.

## When a skill fits better

A rule that is only sometimes needed and describes a whole procedure, with steps or scripts, often works better as a skill: a folder with `SKILL.md` that the agent loads when it needs it. The difference is explained in [Cursor rules vs skills](https://bombos.ai/en/questions/cursor/cursor-rules-vs-skills/).

## What this means for a team

Project Rules and AGENTS.md travel with the code when committed to the repository: whoever clones it has them. User rules stay on your own account, and a correction in one chat does not automatically become an instruction for every future chat. So when you give the same correction twice, put it in a rule and commit it. If part of the team uses another AI tool, put shared agreements in `AGENTS.md` rather than in `.mdc` files that only Cursor reads. Rules are not the only shared context: Cursor Projects also keep context that agents learn, see [How do you share context and team rules in Cursor](https://bombos.ai/en/questions/cursor/share-cursor-context-with-team/).

## Where Bombos fits

Rules are instructions you write and maintain yourself. Cursor’s .mdc rules are tool-specific; AGENTS.md can provide shared instructions for compatible agents. Bombos is a plugin that gives every AI tool your team uses, Cursor included, one shared memory: team knowledge, rules it learns from corrections, and what already sits in email, documents, and repos, traceable, in the cloud or on your own server. One developer can try it first next to their own rules.

## Related questions

Why is my rule not doing anything?

First check the extension: Project Rules require .mdc, and Cursor ignores plain .md files in .cursor/rules. Then check the rule type, the description, and the file patterns: an empty or vague description under Apply Intelligently means the agent rarely picks it.

How long can a rule be?

Cursor recommends keeping each rule under 500 lines and splitting large rules into multiple, composable rules.

What is the difference between a project rule and a user rule?

A project rule lives in the repository and applies to everyone who works in it. A user rule is set in Customize > Rules, applies across all your projects, and only to Agent (Chat).

Where do I add Cursor rules?

Type /create-rule in Agent, or open Customize in the sidebar, go to Rules, and click Add Rule. Project rules end up in .cursor/rules/.

## Sources

1.  [Cursor docs: Rules](https://cursor.com/docs/context/rules)
2.  [Cursor docs: Agent Skills](https://cursor.com/docs/context/skills)

## What does your AI forget?

1.  01You tell us which AI you use and where it keeps starting over.
2.  02We show what a shared memory changes there, on your own examples.
3.  03You keep the plan, with or without Bombos.

![Piet Baudoin](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about Cursor

-   [Cursor rules vs skills: what is the difference and when do you use each?](https://bombos.ai/en/questions/cursor/cursor-rules-vs-skills/)
-   [What makes a good Cursor rule? Best practices and examples](https://bombos.ai/en/questions/cursor/cursor-rules-best-practices/)
-   [How do Cursor Bugbot rules work?](https://bombos.ai/en/questions/cursor/cursor-bugbot-rules/)
-   [How do you share context and team rules across a team in Cursor?](https://bombos.ai/en/questions/cursor/share-cursor-context-with-team/)
-   [Why is Cursor ignoring my rules?](https://bombos.ai/en/questions/cursor/why-cursor-ignores-rules/)
-   [How do you set Cursor rules that apply to every project?](https://bombos.ai/en/questions/cursor/cursor-global-user-rules/)
-   [Did Cursor remove Memories, and how do you keep memory across sessions now?](https://bombos.ai/en/questions/cursor/cursor-memory-removed/)
-   [How much does Cursor cost for teams in 2026?](https://bombos.ai/en/questions/cursor/cursor-pricing-for-teams/)

[All questions about Cursor →](https://bombos.ai/en/questions/cursor/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"How do you use Cursor rules (.cursor/rules) and which rule type should you pick?","description":"A Cursor rule is an .mdc file in .cursor/rules. Its description, globs, and alwaysApply fields decide if it applies always, by file, by relevance, or on @.","abstract":"Project rules are .mdc files in .cursor/rules, kept in version control. The description, globs, and alwaysApply fields set one of four modes: Always Apply, Apply Intelligently, Apply to Specific Files, or Apply Manually. Cursor ignores a plain .md file in that folder; use AGENTS.md for plain markdown.","datePublished":"2026-11-16T00:00:00.000Z","dateModified":"2026-11-16T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/cursor/how-to-use-cursor-rules/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"Cursor","url":"https://bombos.ai/en/questions/cursor/"},"citation":[{"@type":"CreativeWork","name":"Cursor docs: Rules","url":"https://cursor.com/docs/context/rules"},{"@type":"CreativeWork","name":"Cursor docs: Agent Skills","url":"https://cursor.com/docs/context/skills"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"Cursor","item":"https://bombos.ai/en/questions/cursor/"},{"@type":"ListItem","position":4,"name":"How do you use Cursor rules (.cursor/rules) and which rule type should you pick?","item":"https://bombos.ai/en/questions/cursor/how-to-use-cursor-rules/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Why is my rule not doing anything?","acceptedAnswer":{"@type":"Answer","text":"First check the extension: Project Rules require .mdc, and Cursor ignores plain .md files in .cursor/rules. Then check the rule type, the description, and the file patterns: an empty or vague description under Apply Intelligently means the agent rarely picks it."}},{"@type":"Question","name":"How long can a rule be?","acceptedAnswer":{"@type":"Answer","text":"Cursor recommends keeping each rule under 500 lines and splitting large rules into multiple, composable rules."}},{"@type":"Question","name":"What is the difference between a project rule and a user rule?","acceptedAnswer":{"@type":"Answer","text":"A project rule lives in the repository and applies to everyone who works in it. A user rule is set in Customize > Rules, applies across all your projects, and only to Agent (Chat)."}},{"@type":"Question","name":"Where do I add Cursor rules?","acceptedAnswer":{"@type":"Answer","text":"Type /create-rule in Agent, or open Customize in the sidebar, go to Rules, and click Add Rule. Project rules end up in .cursor/rules/."}}]}
```
