Skip to content
Cursor Rules Generator

Customize Cursor AI Behavior — Generate Project Rules in Seconds

Define exactly how Cursor IDE's AI writes code for your project. Choose your tech stack, set your conventions, and get a complete rules configuration in Project Rules (.mdc), AGENTS.md, or legacy .cursorrules format — instantly.

How to Generate Your Cursor Rules

Follow these four steps to create a production-ready rules file tailored to your tech stack and team conventions.

1

Select Your Tech Stack

Choose one or more technologies from our 26+ templates — React, Next.js, TypeScript, Python, Go, Rust, Vue, Svelte, Node.js, and more. The generator intelligently combines best practices from each stack, ensuring your rules cover all relevant framework conventions. For monorepos or multi-language projects, select all applicable stacks and the generator produces rules for every part of your codebase.

2

Configure Your Preferences

Fine-tune how the AI generates code for your project. Set indentation (tabs or spaces, 2 or 4 width), quote style (single or double), semicolon usage, naming conventions (camelCase, PascalCase, snake_case), and AI strictness level. Higher strictness means the AI follows your rules more rigidly — ideal for established teams with mature conventions. Lower strictness gives the AI more flexibility for exploratory work.

3

Choose Your Output Format

Pick the format that fits your workflow: Project Rules (.mdc) for multi-file team workflows with glob-based targeting and frontmatter metadata; AGENTS.md for simple single-file setup at the project root; or Legacy .cursorrulesfor existing projects that already use Cursor's original format. You can switch formats at any time — the same configuration produces consistent output across all three.

4

Add Custom Rules & Download

Include project-specific rules beyond the generated defaults — file structure conventions, testing requirements, documentation standards, or CI pipeline expectations. Review the real-time preview to confirm everything looks correct, then click Download. Place the file in your project root (or .cursor/rules/ directory for .mdc format) and Cursor IDE applies your rules instantly on the next interaction.

Output Examples by Format

Project Rules (.mdc)

---
description: React component conventions
globs:
  - "src/components/**/*.tsx"
alwaysApply: false
---

# React Component Rules
- Use functional components
  with TypeScript interfaces
- Prefer named exports
- Keep components under 200 lines
- Use Tailwind CSS for styling

Multi-file with glob targeting. Best for teams and large projects.

AGENTS.md

# AGENTS.md

## Code Style
- Use 2-space indentation
- Single quotes, no semicolons
- Arrow functions preferred

## Naming
- camelCase for variables
- PascalCase for components
- snake_case for database fields

## Testing
- Jest with React Testing Library
- Every component needs at least
  one render test

Single markdown file. Best for simple projects and open-source.

Legacy .cursorrules

You are an expert React and
TypeScript developer.

Code Style:
- Use 2-space indentation
- Single quotes, no semicolons
- Arrow function components
  with explicit return types

Naming Conventions:
- camelCase for variables
- PascalCase for components
- kebab-case for file names

Testing:
- Jest + React Testing Library

Original plain-text format. For backward compatibility.

Frequently Asked Questions

How long does it take to generate rules?
Instant. As soon as you finish configuring your options, the preview updates in real-time. Download takes one click — no server processing, no waiting, no queues.
Can I edit the generated file after downloading?
Absolutely. The generated file is a starting point, not a locked template. Edit it freely to add project-specific conventions, remove rules that do not apply, or adjust the strictness to match your team's evolving standards.
What happens if I select multiple tech stacks?
The generator merges best practices from all selected stacks intelligently. Selecting React + TypeScript + Tailwind gives you rules covering component patterns, type safety, and utility-first styling — without duplication or conflicts.

Which Format Should You Choose?

Cursor IDE supports three formats for customizing AI behavior. Pick the one that fits your workflow and team structure.

FeatureProject Rules (.mdc)AGENTS.mdLegacy (.cursorrules)
File Location.cursor/rules/ directoryProject rootProject root
Split RulesYes — multiple .mdc files per concernSingle file — one AGENTS.md per repoSingle file — one .cursorrules
Glob TargetingBuilt-in globs in frontmatterNot supportedNot supported
Always ApplyConfigurable — per-file via frontmatterAlways on — whole file appliesAlways on — whole file applies
Best ForLarge projects, monorepos, team conventions per domainSimple projects, open-source repos, quick setupExisting Cursor users, backward compatibility
Frontmatter MetadataFull — description, globs, alwaysApply, versionNone — plain markdown onlyNone — plain text only

Already using the legacy format? Follow the step-by-step guide to migrate .cursorrules to Cursor Project Rules (.mdc) and learn how to split one file into targeted rules safely.

Project Rules (.mdc) Example

Project Rules use YAML frontmatter to attach metadata like target file patterns and application mode. Here is what a typical .mdc rule file looks like:

---
description: React component conventions for the frontend team
globs:
  - "src/components/**/*.tsx"
  - "src/pages/**/*.tsx"
alwaysApply: false
---

# React Component Rules

- Use functional components with TypeScript interfaces for props
- Prefer named exports over default exports
- Keep components under 200 lines; extract hooks and utilities
- Use Tailwind CSS for styling — no inline styles or CSS modules
- Every component file must include a JSDoc description

## State Management

- Use React Context + useReducer for shared state
- Avoid prop drilling beyond 2 levels
- Server state goes through React Query (TanStack Query)

The frontmatter tells Cursor to apply these rules only to src/components/**/*.tsx and src/pages/**/*.tsx files, not globally. Set alwaysApply: true for conventions that should apply everywhere.

Why Use Our Generator?

Multi-Format Output

Generate Project Rules (.mdc), AGENTS.md, or legacy .cursorrules from the same configuration. Switch formats anytime — your rules adapt automatically.

Stack-Aware Rules

Choose from 26+ tech stacks including React, Next.js, Vue, Python, Go, Rust, and more. Each template includes framework-specific best practices and patterns.

Zero Setup

No configuration files, no dependencies, no accounts. Just pick your stack, customize your preferences, and download ready-to-use rules instantly.

How It Works

  1. Select Your Tech Stack — Choose one or more technologies from our 26+ templates. The generator combines best practices from each stack.
  2. Set Your Style — Configure indentation, quotes, semicolons, naming conventions, and AI strictness level to match your team's preferences.
  3. Pick Your Format — Choose Project Rules (.mdc) for multi-file team workflows, AGENTS.md for simple single-file setup, or legacy .cursorrules for existing projects.
  4. Add Custom Rules — Include project-specific rules like file structure conventions, testing requirements, or documentation standards.
  5. Download & Use — Preview your rules in real-time, then download. Place the file in your project and Cursor IDE applies it instantly.

Frequently Asked Questions

What is the difference between Project Rules, AGENTS.md, and .cursorrules?
Project Rules (.mdc) is the modern format with frontmatter metadata, glob-based file targeting, and support for splitting rules into multiple files. AGENTS.md is a single markdown file at the project root — simpler but without glob targeting or metadata. Legacy .cursorrules is Cursor's original plain-text format, still supported but less flexible than Project Rules.
Which format should I use for my project?
Use Project Rules (.mdc) if you work in a team with multiple domains (frontend, backend, infra) and want per-directory rules. Use AGENTS.md for small projects, open-source repos, or when you want a single file that new contributors can read immediately. Use legacy .cursorrules if you are maintaining an existing project that already uses it.
Where do I place the generated files?
Project Rules (.mdc) go in the .cursor/rules/ directory. AGENTS.md and .cursorrules go in your project root directory. Cursor IDE automatically detects all three formats when you open the project.
Can I switch formats later?
Yes! You can regenerate your rules in any format at any time. The same configuration produces consistent output across all three formats — only the file structure and metadata differ.
Is the generator really free?
Yes, completely free. No sign-up, no usage limits, no hidden costs. We believe every developer should have access to well-crafted AI rules. Generate as many files as you need.