A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
110+ tested .mdc and .cursorrules files for Cursor AI. Validate with cursor-doctor, generate with rule-gen, convert with
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.
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
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)globs for file-type scoping where applicable (e.g. Python rules only apply to *.py)description for Cursor's contextThese 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.
Same prompts, different output. Left side is vanilla Cursor, right side is with rules applied.
React component:

Python API endpoint:

TypeScript function:

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 |
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) |
|---|---|---|
| Clean Code | clean-code.mdc | clean-code.cursorrules |
| Testing | testing.mdc | testing.cursorrules |
| Documentation | documentation.mdc | documentation.cursorrules |
| Git Workflow | git-workflow.mdc | git-workflow.cursorrules |
| Code Review | code-review.mdc | code-review.cursorrules |
| Security | security.mdc | security.cursorrules |
| Performance | performance.mdc | performance.cursorrules |
| Accessibility | accessibility.mdc | accessibility.cursorrules |
| API Design | api-design.mdc | api-design.cursorrules |
| Error Handling | error-handling.mdc | error-handling.cursorrules |
| Logging | logging.mdc | logging.cursorrules |
| Monitoring | monitoring.mdc | monitoring.cursorrules |
| Migration Safety | migration-safety.mdc | migration-safety.cursorrules |
| Refactoring | refactoring.mdc | refactoring.cursorrules |
| AI-Assisted Development | ai-assisted-development.mdc | ai-assisted-development.cursorrules |
| Monorepo | monorepo.mdc | monorepo.cursorrules |
| Database Migrations | database-migrations.mdc | database-migrations.cursorrules |
Not just Cursor — rules and patterns for configuring any AI coding tool.
| Rule | .mdc |
|---|---|
| CLAUDE.md (Claude Code) | claude-md.mdc |
| AGENTS.md (OpenAI Codex) | agents-md.mdc |
| GitHub Copilot Instructions | copilot-instructions.mdc |
| Windsurf Rules & Workflows | windsurf-rules.mdc |
| GEMINI.md (Gemini CLI) | gemini-md.mdc |
| Cross-Tool Config Guide | cross-tool-config.mdc |
With .mdc (recommended): Just copy multiple files into .cursor/rules/. Each one works independently. Glob patterns keep them scoped to the right files.
mkdir -p .cursor/rules
cp rules-mdc/languages/typescript.mdc .cursor/rules/
cp rules-mdc/frameworks/nextjs.mdc .cursor/rules/
cp rules-mdc/practices/testing.mdc .cursor/rules/
With .cursorrules: Combine them into one file:
cat rules/languages/typescript.cursorrules rules/frameworks/nextjs.cursorrules > .cursorrules
PRs welcome. See CONTRIBUTING.md. The bar: rules should be specific enough to actually change Cursor's output. "Write clean code" doesn't count.
cursor-doctor catches broken frontmatter, conflicting rules, token budget waste, and other silent failures before they hurt your output.
npx cursor-doctor scan # health score + issues
npx cursor-doctor lint # detailed rule linting
npx cursor-doctor fix # auto-repair (Pro)
cursor-doctor Pro ($9 one-time) — full diagnostic report with conflict detection, redundancy analysis, token budget breakdown, and auto-fix. Run npx cursor-doctor audit for the full report.
If these rules saved you time, ⭐ star the repo so others can find it.
MIT
📋 Free Cursor Safety Checklist — pre-flight checklist for AI-assisted coding sessions, based on tested experiments
📄 Configuration files that enhance Cursor AI editor experience with custom rules and behaviors
Cursor AI 编程规则精选集 | 132+ 规则,覆盖前端/后端/AI/DevOps 等 32 个领域
Curated AI Prompts for Cursor Rules, Cline, Windsurf and Github Copilot
A practical approach to managing multiple AI agents in Cursor through strict file-tree partitioning and domain boundarie