Free tool

Cursor rules generator

Pick your stack and copy a ready Cursor project rule. Free, no sign up.

Updated

1

Choose your stack

Not sure? The defaults work for most Cursor projects.

Framework

What your app is built with. Not sure? Ask Cursor, or keep the default.

Styling

How Cursor writes the design. Tailwind CSS is the most common.

Language

TypeScript helps Cursor catch mistakes early.

Package manager

The command Cursor uses to install packages. Pick npm if unsure.

Tests

Checks Cursor runs to make sure the code works. Pick None if you have none.

2

Your project.mdc

.cursor/rules/project.mdc
---
description: Project conventions for this codebase
globs:
alwaysApply: true
---

# Project guide

React + Vite app written in TypeScript, styled with shadcn/ui, using npm.

## Commands
- Dev server: `npm run dev`
- Build: `npm run build`
- Lint: `npm run lint`
- Tests: `npm run test`

## Code style
- Components live in src/components, pages in src/pages.
- Keep components small and typed; lift state only as far as needed.
- TypeScript strict mode. No `any`; type props and return values.
- Reuse existing components and helpers before creating new ones.

## UI and design
- Use shadcn/ui components from components/ui and restyle them through the theme, not by copying new variants.
- The design source of truth is design/template.html. Match its fonts, type scale, spacing, colours and corner radius.
- One accent colour. No new fonts, gradients or shadows that are not in the template.
- Every page works at 375px wide with no horizontal scroll.
- Interactive elements have visible focus states and accessible labels.

## Testing
- Write Vitest tests for new logic and fixed bugs.
- Run the tests before calling a task done.

## How to work
- Reference the files you change with @ and keep edits inside them.
- Reuse components from the components folder; never create a second Button or Card.
- After editing, run the build, lint and tests in the terminal and fix any errors.

Cursor applies it to every Agent and chat request. Want the full design rules? Cursor design rules template

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

1

Pick your stack

Choose your framework, styling, language, package manager and test tool above.

2

Copy the rule

Copy the generated file and save it as .cursor/rules/project.mdc.

3

Check it is applied

Open Cursor settings, Rules, and confirm the rule shows as Always.

4

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.

AI chatbot landing page

Website template

Full-screen SaaS hero

Website template

Frosted glass navbar

Website template

Full Cursor design rules template

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