---
title: "Cursor rules examples and best practices"
description: "A good Cursor rule is short, concrete and scoped: one topic, under 500 lines, pointing to files instead of copying them, added when Agent repeats a mistake."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# What makes a good Cursor rule? Best practices and examples

Short answer

Cursor's own guidance: keep each rule focused, actionable and scoped, under 500 lines, with concrete examples or references to files in your codebase. Do not paste style guides a linter can enforce or commands Agent already knows. Start small and add a rule only when Agent makes the same mistake twice. Community collections are a source of ideas, not a set to copy whole.

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

## What Cursor itself says a good rule is

Cursor’s documentation is short and clear about it. A good rule is focused, actionable and scoped. It reads like clear internal documentation, not like a wish. And it stays under 500 lines; anything bigger should be split into smaller rules that can be combined.

The list of things to leave out is just as useful:

| Leave out | Why | Do this instead |
| --- | --- | --- |
| A whole style guide | A linter enforces it better and cheaper | Configure the linter, keep the rule for what a linter cannot check |
| Common commands Agent already knows | It costs context and adds nothing | Only document commands that are specific to your repo |
| Rare edge cases | They take space in every matching conversation | Put them in a manual rule you @-mention, or a skill |
| Copies of code from the codebase | They go stale the moment the code changes | Point to the canonical file and say what to look for |

How to create a rule and pick between the four modes is covered in [How do you use Cursor rules](https://bombos.ai/en/questions/cursor/how-to-use-cursor-rules/). This page is about what you write inside it.

## Examples that work

The examples in Cursor’s docs share one pattern: each rule makes one concrete demand that you can check. Adapted to a typical web project:

**Always Apply**, for the few things that always hold:

```
---
alwaysApply: true
---
Read the relevant source files before proposing a change.
Never edit files in src/generated/; they are rebuilt from the schema.
```

**Apply to Specific Files**, conventions per part of the code:

```
---
globs: src/components/**/*.tsx
alwaysApply: false
---
Use named exports, not default exports.
Keep styles in a file next to the component.
Split a component that grows past about 200 lines.
```

**Apply Intelligently**, where the description decides:

```
---
description: Writing or changing RPC services and their validation
alwaysApply: false
---
Validate every input with the schemas in src/rpc/schemas.ts.
Return errors as structured objects, see src/rpc/errors.ts for the shape.
```

**Apply Manually**, a procedure you call with `@migrations`:

```
---
alwaysApply: false
---
Every migration has an up and a down function.
Never change a column in place: add the new one, copy, then drop the old one.
```

Notice what these rules do not contain: explanations of what React is, the full error class, or a list of every component. They reference the file that already holds the truth.

## The order to build rules in

1.  Start with no rules, or one Always Apply rule with your hardest agreements.
2.  Work normally. When Agent makes the same mistake a second time, that is your rule.
3.  Write the rule as the correction you just gave, in one or two lines, with a pointer to the right file.
4.  Pick the narrowest mode that still catches the case: globs if it is about a folder or file type, a description if it is about a kind of task.
5.  Commit it, so the next person does not have to give the same correction.
6.  Once in a while, read all rules together and delete what no longer matches the code. Two rules that contradict each other are worse than none.

You can also let Agent do the writing: `/create-rule` in chat, or tag `@cursor` on a GitHub issue or pull request to have it update a rule.

## Community rule collections

Collections such as awesome-cursorrules on GitHub hold rule files for many stacks. That repository now uses the `.mdc` Project Rules format, with `description`, `globs` and `alwaysApply` in the frontmatter, so the files work when copied into `.cursor/rules/`.

The misunderstanding is that more rules make a better Agent. A downloaded set for “Next.js best practices” describes someone else’s project. Every Always Apply rule in it takes space in every conversation, and its conventions can clash with yours, after which Agent picks one of the two. Cursor’s own advice points the other way: start simple, add a rule when Agent repeats a mistake. Read community rules for phrasing and ideas, then write your own short version.

If you do want to install rules from a GitHub repository, Cursor does not import loose rule files. It expects them packaged as a plugin and published through a marketplace, after which the rules show up in Customize.

## What this means for a team

A good rule is a correction that one person gave once and nobody has to give again. That only works if the rule is committed to the repository or set as a Team Rule; a correction that stays in one person’s chat helps nobody else. It also means rules need an owner: someone who deletes the stale ones. For sharing rules across the team, 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

The best practice above is a manual loop: notice a repeated mistake, write the rule, commit it, prune it later. Bombos is a plugin that gives every AI tool your team uses, Cursor included, one shared memory, and it learns rules from corrections so the same correction does not have to be turned into a file by hand. It also reads what already sits in your repos, documents and email, and shows what each answer rests on, in the cloud or on your own server. One developer can try it first next to their own `.cursor/rules`.

## Related questions

Should I copy a rule set from awesome-cursorrules?

Use it to see how others phrase rules for a stack, then keep only what fixes a mistake your Agent actually makes. A large imported set costs context in every conversation and often contradicts your own conventions.

How many rules should a project have?

Cursor gives no number. It advises starting simple and adding rules when Agent repeats a mistake, and keeping each rule under 500 lines. A handful of Always Apply rules plus scoped rules per part of the code is a common shape.

Can a rule point to a file instead of repeating it?

Yes, and Cursor recommends it. Agent reads a referenced file with its tools when needed. The contents are not inlined, so anything that must always be in context belongs in the rule body itself.

Can Agent update a rule for me?

Yes. Ask Agent in chat or use /create-rule, and on GitHub you can tag @cursor on an issue or pull request to have Agent update a rule.

## Sources

1.  [Cursor docs: Rules](https://cursor.com/docs/context/rules)
2.  [Cursor help: Rules](https://cursor.com/help/customization/rules)
3.  [GitHub: PatrickJS/awesome-cursorrules](https://github.com/PatrickJS/awesome-cursorrules)

## 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

-   [How do you use Cursor rules (.cursor/rules) and which rule type should you pick?](https://bombos.ai/en/questions/cursor/how-to-use-cursor-rules/)
-   [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/)
-   [How do you move Cursor rules to Claude Code, Copilot or Codex?](https://bombos.ai/en/questions/cursor/cursor-rules-in-claude-code/)
-   [Cursor rules vs skills: what is the difference and when do you use each?](https://bombos.ai/en/questions/cursor/cursor-rules-vs-skills/)
-   [Did Cursor remove Memories, and how do you keep memory across sessions now?](https://bombos.ai/en/questions/cursor/cursor-memory-removed/)

[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":"What makes a good Cursor rule? Best practices and examples","description":"A good Cursor rule is short, concrete and scoped: one topic, under 500 lines, pointing to files instead of copying them, added when Agent repeats a mistake.","abstract":"Cursor's own guidance: keep each rule focused, actionable and scoped, under 500 lines, with concrete examples or references to files in your codebase. Do not paste style guides a linter can enforce or commands Agent already knows. Start small and add a rule only when Agent makes the same mistake twice. Community collections are a source of ideas, not a set to copy whole.","datePublished":"2026-11-17T00:00:00.000Z","dateModified":"2026-11-17T00: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/cursor-rules-best-practices/","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 help: Rules","url":"https://cursor.com/help/customization/rules"},{"@type":"CreativeWork","name":"GitHub: PatrickJS/awesome-cursorrules","url":"https://github.com/PatrickJS/awesome-cursorrules"}]}

{"@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":"What makes a good Cursor rule? Best practices and examples","item":"https://bombos.ai/en/questions/cursor/cursor-rules-best-practices/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Should I copy a rule set from awesome-cursorrules?","acceptedAnswer":{"@type":"Answer","text":"Use it to see how others phrase rules for a stack, then keep only what fixes a mistake your Agent actually makes. A large imported set costs context in every conversation and often contradicts your own conventions."}},{"@type":"Question","name":"How many rules should a project have?","acceptedAnswer":{"@type":"Answer","text":"Cursor gives no number. It advises starting simple and adding rules when Agent repeats a mistake, and keeping each rule under 500 lines. A handful of Always Apply rules plus scoped rules per part of the code is a common shape."}},{"@type":"Question","name":"Can a rule point to a file instead of repeating it?","acceptedAnswer":{"@type":"Answer","text":"Yes, and Cursor recommends it. Agent reads a referenced file with its tools when needed. The contents are not inlined, so anything that must always be in context belongs in the rule body itself."}},{"@type":"Question","name":"Can Agent update a rule for me?","acceptedAnswer":{"@type":"Answer","text":"Yes. Ask Agent in chat or use /create-rule, and on GitHub you can tag @cursor on an issue or pull request to have Agent update a rule."}}]}
```
