Cursor Rules Generator (.mdc)
Generate a Cursor project rule file with the correct .mdc frontmatter. Pick when the rule applies, add your stack and conventions, then copy or download it. Free, in your browser.
Build your Cursor rule
Your rule file
How to use the Cursor Rules Generator
- Name the rule file. Cursor uses the .mdc extension for project rules.
- Choose when the rule applies: always, to specific file globs, when the agent decides from the description, or only when you @-mention it.
- Add your tech stack, conventions to follow, things to avoid and useful commands.
- Copy the output or download the .mdc file.
- Save it in .cursor/rules/ inside your project.
Frequently asked questions
What is a Cursor rule?
A Cursor rule is a Markdown file with frontmatter that gives the Cursor agent standing instructions for your project, such as coding conventions, architecture notes and commands to run.
Where do Cursor rule files go?
Project rules live in .cursor/rules/ and use the .mdc extension. Cursor’s documentation says a plain .md file in that folder is ignored because it has no frontmatter, and suggests AGENTS.md if you prefer plain Markdown.
What do alwaysApply, globs and description do?
If alwaysApply is true the rule is always included. If it is false and globs are set, the rule attaches when a matching file is in context. If it is false with only a description, the agent reads the description and pulls the rule in when relevant. If neither is set, the rule is included only when you @-mention it.
How long should a rule be?
Keep each rule short and specific. Several focused rules are easier for the agent to follow than one long file.
Can I use the same content for AGENTS.md?
Yes. The conventions, stack and commands you write here work as plain Markdown. Try the AGENTS.md and CLAUDE.md generator for that format.
Is anything uploaded?
No. The rule is generated in your browser.