CURSOR

Cursor Rule Types: Which One Should Each Rule Use?

You wrote a careful Cursor rule, committed it, and the model still ignored it. Or the opposite: you marked everything as always on, and now every chat starts with pages of instructions that have nothing to do with the file you are editing. In both cases the rule text was fine. The rule type was wrong.

Cursor rule types are the four modes that control when a rule file in .cursor/rules is loaded into the model's context: Always, Auto Attached, Agent Requested and Manual. The mode is not a separate setting. It is derived from three frontmatter fields in the .mdc file, and this guide shows which combination to use for which kind of rule.

What are the four Cursor rule types?

The four types are Always, Auto Attached, Agent Requested and Manual, and each one answers a different question: who decides when the rule loads. For Always the answer is nobody, it loads every time. For Auto Attached the file path decides. For Agent Requested the model decides. For Manual you decide by mentioning the rule by name.

Cursor's rules documentation describes these same four modes. In the editor you pick one from a dropdown, but on disk it is just frontmatter at the top of a .mdc file:

Rule typeFrontmatterLoads when
AlwaysalwaysApply: trueEvery chat and every agent run in the project
Auto Attachedglobs set, alwaysApply: falseA file matching a glob is part of the context
Agent Requesteddescription set, no globs, alwaysApply: falseThe model reads the description and judges it relevant
ManualNone of the three setYou type @rule-name in the prompt

That table is the whole mechanism. Everything else in this article is about choosing a row.

Why does the rule type matter more than the rule text?

The rule type matters because it decides whether your text is in the context window at all, and a rule that is not loaded cannot be followed. A perfectly worded rule set to Agent Requested with a vague description is, in practice, a rule that never runs.

There is a cost on the other side too. Every Always rule is paid for on every request. Instructions compete for the model's attention, so a long always-on set dilutes the few rules that really are universal. Loading less, more precisely, is the goal.

This is also the usual hidden cause behind rules that seem to stop working as a project grows. When you add a second or third stack, the always-on pile gets contradictory, and the model resolves the conflict unpredictably. Scoping rules by type is the structural fix, not rewording.

When should a rule be Always, Auto Attached, Agent Requested or Manual?

Choose by the scope of the rule, not by how important it feels. A rule belongs in Always only if it is true for every file and every task in the repo. Otherwise it should be narrower. Work through these steps for each rule you write:

  1. Ask whether the rule is true for every file in the repo. If yes, and it fits in a few lines, make it Always.
  2. If it only applies to a file pattern, such as *.tsx or app/api/**, make it Auto Attached and write the glob.
  3. If it applies to a task rather than a path, such as writing a database migration, make it Agent Requested and write a description that names the task.
  4. If it is a long playbook you want only on demand, make it Manual and give the file a memorable name.
  5. Open a fresh chat, trigger the situation, and confirm in the context list that the rule attached.

Step five is the one people skip. Do not assume a rule loaded. Check it.

Always: keep it to project facts

Good Always rules are short statements about the project itself: the package manager, the test command, the directory layout, the one library you never want swapped. Bad Always rules are style guides for a single framework, because they load while you edit unrelated files.

My opinion, and it is a judgment rather than a documented limit: if your always-on rules would not fit on one screen, something in there should be demoted to Auto Attached.

Auto Attached: the workhorse

Most convention rules belong here. A React component rule attached to **/*.tsx and a SQL rule attached to **/*.sql each load only when relevant, so they can be specific without costing anything elsewhere.

---
description: Next.js route handler conventions
globs: app/api/**/route.ts
alwaysApply: false
---
- Validate input with zod before touching the database.
- Return NextResponse.json with an explicit status code.
- Never read process.env directly; import from lib/env.

One trap: a glob like **/* matches everything, so the rule behaves as Always while pretending to be scoped. If your glob matches every file, set alwaysApply: true honestly and shorten the rule.

Agent Requested: the description is the trigger

For Agent Requested rules the description is the only thing the model sees before deciding to load the body. Write it like a search result: what task, in what stack. A description such as "Helpful coding guidelines" matches nothing in particular. A description such as "Use when writing or editing Drizzle ORM migrations" gives the model something to match against.

Manual: for long playbooks

Manual rules suit procedures you run occasionally, like a release checklist or a security review. They cost nothing until you call them, which makes them a good home for long text that would be too heavy anywhere else.

How do the four rule types compare in practice?

Here is a decision table you can copy. It compares the types by reliability and context cost, which are the two things you are trading off.

TypeReliabilityContext costBest for
AlwaysHighest, always presentPaid on every requestPackage manager, test command, layout
Auto AttachedHigh when the glob matchesOnly on matching filesPer-language and per-folder conventions
Agent RequestedDepends on the descriptionDescription only until loadedTask-shaped guidance
ManualCertain, because you call itZero until mentionedChecklists and rare procedures

The pattern to notice is that reliability and cost move together. The more certain a rule is to load, the more it costs everywhere else. Good rule sets spend that budget deliberately.

What are the common mistakes with Cursor rule types?

The most common mistake is marking everything Always because it feels safe. The second is leaving the globs field empty on a rule that was meant to be file-scoped, which silently turns it into a Manual rule that nothing ever calls.

A third mistake is one rule file covering several stacks. A single file cannot have one glob that fits TypeScript, Python and SQL, so it ends up Always or never attached. Split it into one file per stack, each with its own glob.

The fourth is not testing. Frontmatter typos fail quietly. A misspelled key or a bad glob gives you no error, only a rule that does not attach.

Where does a ready-made rule set fit?

Splitting a rule set correctly means writing one file per stack, choosing a type for each, writing globs, and testing that each attaches. For one stack that is an afternoon. For several it is a week of fiddling. BuyCoded's Cursor Rules Mega-Pack ships 1,057 Cursor rules across 20 stacks in both Cursor formats, so you start from rules that are already split by stack rather than a blank folder.

If you want to see what a stack-by-stack rule set looks like before deciding, the Cursor Rules Mega-Pack product page lists what is included and the price.

Is it worth buying rules when you can write your own?

Writing your own is a fair choice, and for one small project it is probably the right one. Your rules will fit your codebase exactly, and the exercise teaches you how Cursor loads context. The tradeoff is time: every stack you add means another file to scope, glob and test.

A purchased set is a starting point, not a finished answer. You will still delete rules that do not match your conventions and tune the ones that do. If you are already comfortable with the types above, you can keep the parts that save time and drop the rest.

What should you do next?

Open your .cursor/rules folder and label every file with the type it actually has today, using the table above. Demote anything Always that is not universal, and fix any rule whose globs are empty. Then, if you would rather not build the per-stack files from scratch, browse the BuyCoded catalog, pick the Cursor rules or the other AI coding packs, and download the one that matches your stack right after checkout.

Frequently asked questions

How many types of rules does Cursor have?

Cursor has four rule types: Always, Auto Attached, Agent Requested and Manual. Always loads on every request, Auto Attached loads when a file matching its glob is in context, Agent Requested loads when the model judges its description relevant, and Manual loads only when you mention the rule with an @ reference.

How do I make a Cursor rule apply only to certain files?

Set the globs field in the rule's frontmatter and set alwaysApply to false. For example, globs: app/api/**/route.ts attaches the rule only when a matching file is in the context. Then open a fresh chat with such a file and check the context list to confirm the rule actually attached.

Why is my Agent Requested Cursor rule never used?

The most likely cause is a vague description. The model only sees the description before deciding whether to load the rule body, so it must name a concrete task and stack, such as writing Drizzle ORM migrations. If the task is predictable by file path, switch the rule to Auto Attached instead.

Should every Cursor rule be set to Always apply?

No. Always rules are included in every request, so each one adds context cost and competes with the others for attention. Reserve Always for short facts true across the whole repo, like the package manager or test command, and move stack-specific conventions to Auto Attached rules with a glob.

What is the difference between a Manual rule and an Agent Requested rule?

A Manual rule loads only when you type its name with an @ in your prompt, so you control it completely. An Agent Requested rule has a description and the model decides whether to load it. Manual is certain but needs you to remember it; Agent Requested is automatic but depends on the description.