Skip to content
Free tool

Cursor Rules Generator

Generate a Cursor project rule (.cursor/rules/*.mdc) or a cross-tool AGENTS.md from your stack and conventions. Review and edit the output before you commit it.

Configuration
Describe your project and choose an output format

Output

Project

Stack

Preferences

.cursor/rules/project-conventions.mdc

Configure your settings and click Generate to see the file here.

Keep your rules in one place

Save rules alongside your prompts in a private HyperPrompt library.

Get started

What this generator creates

Cursor stores project rules as .mdc files in .cursor/rules. Each file starts with frontmatter that controls when the rule is used, followed by Markdown instructions. This tool fills in that frontmatter and a conventions section from the stack you choose. It can also produce a plain AGENTS.md, which Cursor reads from the project root and subdirectories and which several other AI coding tools also support. The output is a starting point built from your selections; it has not been tested against your codebase.

Cursor rule types

  • Always Apply: alwaysApply: true, included in every request.
  • Apply to Specific Files: alwaysApply: false with globs, attached when matching files are involved.
  • Apply Intelligently: alwaysApply: false with a description and no globs; the agent decides when it is relevant.
  • Apply Manually: no description or globs; used when you @-mention the rule.

How to install the generated rule

  1. Create .cursor/rules/ in your repository root.
  2. Save the download there with the .mdc extension. A plain .md file in that folder is ignored by Cursor's rules system.
  3. Commit the file and confirm the rule appears in Cursor's rules settings.
  4. For AGENTS.md, save the file in the repository root (or a subdirectory it should apply to).

Migrating from .cursorrules

Earlier versions of this tool produced a single .cursorrules file. The current Cursor rules documentation does not describe that file. Paste its contents into the generator's description and preferences, or split it into focused .mdc rules.

Tips

  • Name exact versions where they matter, for example the framework major version you use.
  • State the commands the agent should run to check its work (tests, lint, type check).
  • Keep each rule focused. Cursor's docs recommend keeping rules under 500 lines.
  • Rules guide the model; keep code review and CI checks in place.

Format details checked against Cursor's rules documentation on 2026-11-05.