Home / Directory / Cursor project rules

Cursor's own rules docs: how .mdc files actually attach

CURSORANY STACK

By Cursor · License: Vendor documentation (not a software license)

Before you copy a community rules pack, read the page that defines the format. Cursor's rules docs are short and they settle arguments that GitHub comments get wrong.

Open Cursor project rules

What it does

The docs explain that project rules live in .cursor/rules as .mdc files and are version-controlled. A plain .md file in that folder is ignored because it has no frontmatter. If you want a simple always-on Markdown file, Cursor points you at AGENTS.md instead.

Frontmatter controls attachment. alwaysApply: true injects the rule every chat. A globs list attaches when a matching file is in context. A description without globs lets the agent pull the rule when it thinks it is relevant. Omit both and the rule is manual: you @-mention it.

You can create a rule with /create-rule in Agent or from Customize → Rules. Nested folders under .cursor/rules are for organizing files, not for scoping. Subprojects can have their own .cursor/rules directory.

Who it is for

Anyone writing or reviewing Cursor rules. If you maintain a pack, this page is the spec you should match. If you only use Claude Code, you can skip it.

It is also the page to send a teammate who pasted a 200-line .md into .cursor/rules and wondered why nothing happened.

Our take

The strength is that it is first-party and current enough to trust on mechanics. Community posts still recommend a root .cursorrules file; this page is clearer about project rules and AGENTS.md.

The limit is the obvious one: it will not give you stack rules. There is no RLS example, no FastAPI ownership check, no Godot scene-tree warning. You still have to write the content or copy it from somewhere you trust.

We treat this as required reading, not as a kit. Our own .mdc files follow the frontmatter described here.

Compared with AgentKit Drawer

One-File Agent Rules is an AGENTS.md, which Cursor will read if you put it at the repo root. The stack packs add scoped .mdc files that use the globs and descriptions this page defines.

If you are choosing between "learn the format" and "buy a pack," read this page first. Then decide whether you want to write the Next.js or FastAPI content yourself.

Related AgentKit pack

One universal AGENTS.md for Cursor, Claude Code, Codex, Windsurf and Copilot: plan gate, verify-before-done, and stack modules. A filled-in file, not a format spec.

One-time payment · instant download · 14-day refund. We do not claim this third-party kit is affiliated with AgentKit Drawer.

FREE · 1 FILE · WORKS IN EVERY AGENT

Try the free Starter AGENTS.md first

A 40-line rules file that makes Cursor, Claude Code, Codex and Windsurf plan first, keep diffs small and run your tests before saying "done". It works alongside anything in this directory. We email it to you instantly.