cursorrules-collection
nedcodes-ok · nedcodes-ok/cursorrules-collection
This collection provides over 110 tested rules (.mdc and .cursorrules) for Cursor AI and other coding agents to improve output quality.
110+ tested .mdc and .cursorrules files for Cursor AI. Validate with cursor-doctor, generate with rule-gen, convert with rule-porter.
See it in action
From the author's README nedcodes-ok ·Source
What you can do with it
- Quickly add TypeScript-specific coding guidelines to your Cursor agent.
- Use cursor-doctor to validate your agent's current rules setup and identify conflicts.
- Import a rule to enforce specific file naming conventions across a project.
Safety check
No risky patterns found in the files we scanned.
Automated scan of the repo files. Always review code you run.
From the README
cursorrules-collection
110+ tested rules for AI coding tools — Cursor, Claude Code, Copilot, Windsurf, Gemini CLI, and Codex. Every rule contains something you can't get from a generic LLM prompt. Copy to your project and start getting better output.
⚠️ Using Cursor agent mode? Use the
.mdcfiles inrules-mdc/. Both.cursorrulesand.mdcare loaded, but.mdctakes precedence on conflicts and gives you frontmatter (alwaysApply, globs). More details.
🔧 Check your setup first
Before adding new rules, see if your current setup has issues:
npx cursor-doctor scan
Catches broken frontmatter, conflicting rules, token budget problems, and missing coverage. Takes about 2 seconds.
→ cursor-doctor on GitHub · → cursor-doctor on npm
Quick Start (manual)
For agent mode (recommended):
# Copy the .mdc file into your project's .cursor/rules/ directory
mkdir -p .cursor/rules
curl -o .cursor/rules/typescript.mdc https://raw.githubusercontent.com/nedcodes-ok/cursorrules-collection/main/rules-mdc/languages/typescript.mdc
For regular Cursor sessions (composer, chat):
curl -o .cursorrules https://raw.githubusercontent.com/nedcodes-ok/cursorrules-collection/main/rules/languages/typescript.cursorrules
Each .mdc file includes:
alwaysApply: true(required for agent mode)globsfor file-type scoping where applicable (e.g. Python rules only apply to*.py)descriptionfor Cursor's context
🔧 Make It Yours
These rules are starting points, not finished configs. The more specific they are to YOUR project, the better they work.
Step 1: Grab the rule for your stack (e.g. react.mdc)
Step 2: Open it and delete anything that doesn't match your patterns. Using Redux instead of Context? Zustand instead of TanStack Query? Edit the rule.
Step 3: Add your project-specific conventions:
## Our Conventions
- All API calls go through src/lib/api.ts
- Use date-fns, not moment
- Component files are PascalCase, utilities are camelCase
- Tests live next to the file they test (Button.test.tsx)
Step 4: Validate with npx cursor-doctor lint to make sure the frontmatter is correct.
The generic version gets you 70% there. The last 30% is what makes the rule actually useful for your codebase.
📝 Articles & Guides
- Cursor Agent Mode Ignores .cursorrules — Use .mdc Instead
- 5 .cursorrules That Actually Changed Cursor's Output
- How to Write .cursorrules That Actually Work
- 5 .cursorrules That Actually Changed What Cursor Generates (React/Next.js)
Before / After
Same prompts, different output. Left side is vanilla Cursor, right side is with rules applied.
React component:
Python API endpoint:
TypeScript function:
Rules
Languages
Deep coverage: Python, JavaScript, TypeScript, Go, Rust, Java — version-specific gotchas, tested patterns, real traps. Starter templates: C#, Ruby, PHP, Swift, Kotlin, Elixir, Scala, C++ — solid foundations, customize for your project.
| Rule | .mdc (agent mode) | .cursorrules (legacy) |
|---|---|---|
| Python | python.mdc | python.cursorrules |
| JavaScript | javascript.mdc | javascript.cursorrules |
| TypeScript | typescript.mdc | typescript.cursorrules |
| Go | go.mdc | go.cursorrules |
| Rust | rust.mdc | rust.cursorrules |
| Java | java.mdc | java.cursorrules |
| C# | csharp.mdc | csharp.cursorrules |
| Ruby | ruby.mdc | ruby.cursorrules |
| PHP | php.mdc | php.cursorrules |
| Swift | swift.mdc | swift.cursorrules |
| Kotlin | kotlin.mdc | kotlin.cursorrules |
| Elixir | elixir.mdc | elixir.cursorrules |
| Scala | scala.mdc | scala.cursorrules |
| C++ | cpp.mdc | cpp.cursorrules |
Frameworks
Deep coverage: React, Next.js, Vue, Angular, Django, FastAPI, Express, Tailwind CSS, shadcn/ui — version-specific, gotcha-heavy, opinionated. Solid coverage: Everything else — good patterns and conventions, ready to customize.
| Rule | .mdc (agent mode) | .cursorrules (legacy) |
|---|---|---|
| React | react.mdc | react.cursorrules |
| Next.js | nextjs.mdc | nextjs.cursorrules |
| Vue | vue.mdc | vue.cursorrules |
| Svelte | svelte.mdc | [svelte.cursorrul |


