What is project.mdc?
Cursor rules are instructions Cursor adds to Agent and chat requests, saved as .mdc files in .cursor/rules. This Cursor rules generator writes a project rule from a few choices, set to always apply, so Cursor follows your commands, code style and design on every request.
How to use the Cursor rules generator
Pick your stack
Choose your framework, styling, language, package manager and test tool above.
Copy the rule
Copy the generated file and save it as .cursor/rules/project.mdc.
Check it is applied
Open Cursor settings, Rules, and confirm the rule shows as Always.
Use Agent
Ask Agent for a change; the rule is added to the request automatically.
How Cursor rules work
Project rules live in .cursor/rules as .mdc files: markdown with a short header. The header decides when the rule is used: always, when matching files are in context, when Agent decides it is relevant, or only when you mention it.
The generated rule is set to always apply, which suits project-wide conventions like commands, code style and design. Add separate rules with globs for parts of the codebase, like one for components and one for API routes.
.cursorrules vs .cursor/rules
The single .cursorrules file in the project root is the older format and still works, but Cursor recommends project rules in .cursor/rules. They can be split by topic, scoped to files and versioned with the code. If you have a .cursorrules file, move its content into a project rule like this one.
What makes a good project.mdc
One topic per rule
A project rule for conventions, another for components. Small rules are followed better.
The right rule type
Always for project-wide rules, globs for rules that only matter in some folders.
Concrete design rules
Name the design file and the limits: one accent colour, no new fonts.
Commands Agent can run
Agent runs builds and tests; give it the exact commands.
Common mistakes
One giant rule
Split long rules by topic so each one stays focused.
Forgetting the header
Without alwaysApply or globs, a rule may never be used.
Keeping old .cursorrules
Two rule sources can contradict each other. Move to .cursor/rules.
Design templates for Cursor
The generated file points Cursor at design/template.html. Save one of these templates there and every page it builds follows the same design.
Frequently asked questions
Where do Cursor rules go?
In the .cursor/rules folder of your project, as .mdc files. Cursor also has user rules in settings that apply to every project.
Is this Cursor rules generator free?
Yes. The generated rule is free to copy. The full design rules template on the Cursor rules page comes with a BrowserMoon licence.
What is an .mdc file?
A markdown file with a small header that tells Cursor when to apply the rule: always, by file pattern, when relevant, or manually.
Does Cursor still support .cursorrules?
It still reads it, but project rules in .cursor/rules are the recommended format.
Does Cursor read AGENTS.md?
Yes. Cursor also reads AGENTS.md at the project root, so you can share rules with Codex. The AGENTS.md generator on this site outputs that format.
Can I have several Cursor rules?
Yes. Keep one always-on project rule like this one and add smaller rules scoped to folders with globs.
More free generators
Related