Skip to content

Cursor Rules Examples & Best Practices

Cursor rules are .mdc files that tell Cursor's AI agent how to work on your codebase: what to build first, which tests to run, what never to ship. They live in .cursor/rules/ and apply to every agent session in that repo. These packs include production-ready Cursor rules for specific stacks and workflows, plus AGENTS.md files that work across Cursor, Claude Code and Codex. Each pack is test-first, includes working examples, and lists exactly what's inside.

Available packs

Frequently asked questions

What are Cursor rules and how do they work?
Cursor rules are markdown files (.mdc) in your .cursor/rules/ directory. The agent reads them at the start of every session and follows the instructions throughout. Use them for project structure, testing commands, deployment steps, and guardrails.
How do Cursor rules differ from .cursorrules files?
The old .cursorrules format (a single root file) is deprecated. Modern Cursor uses .mdc files in .cursor/rules/, which support globs, multiple rule files, and better organization. Our packs use the current .mdc format.
Can I use the same rules in Claude Code and Codex?
Yes. Our packs include both .cursor/rules/*.mdc and AGENTS.md files. The AGENTS.md format works across Cursor, Claude Code (Anthropic), and Codex (GitHub), so you write once and use everywhere.
Are these rules framework-specific?
Most packs target a stack or workflow (React, Flutter, test-first development). Pick the one that matches what you're building. Free packs let you try before buying.
Do I need to modify the rules after downloading?
The rules are ready to use as-is, but you can customize paths, commands, or guardrails to match your project. Each pack includes a README with setup instructions.

Related resources