TOKREPO · ARSENAL
Stable

Cursor Rules Library

Drop-in `.mdc` rule packs for Cursor — Python, React, Devin-style engineer mode, and an MDC generator that auto-builds rules from your docs.

9 assets

What's in this pack

Cursor's Project Rules (.mdc files in .cursor/rules/) are the highest-leverage way to lock in style, architecture, and process expectations for a codebase. The default Cursor setup ships with no rules; teams either write theirs from scratch (slow, drifting) or paste the same boilerplate across every project (no shared maintenance). This pack collects the nine .mdc packs that cover 80% of what most teams actually want, plus an MDC generator that builds custom rules from your existing docs.

# Asset Type What it covers
1 Python rules language typing, ruff, pytest, async patterns
2 React rules language hooks, TypeScript, accessibility, file layout
3 Devin engineer mode meta the operating manual: plan-first, surgical edits, no-overreach
4 MDC generator tooling reads your docs/, emits a tailored .mdc
5 Next.js patterns framework App Router, server actions, data fetching
6 Tailwind / shadcn rules UI utility-first conventions, component composition
7 API design rules backend REST/GraphQL conventions, error envelopes
8 Test discipline rules quality golden-file, snapshot, mutation testing
9 Security review rules quality OWASP top-10 patterns to flag in every diff

Why this matters

The Cursor agent without rules is a generalist. With rules, it's an opinionated teammate that already knows your stack, your idioms, and your guardrails. Three concrete wins teams report after installing this pack:

  1. Onboarding goes from days to hours. A new engineer's Cmd-K produces code that already looks like the rest of the codebase, because Cursor is reading the same conventions doc the human reads on day one.
  2. Review fatigue drops. Reviewers stop catching the same five style/architecture nits on every PR — the rules catch them at generation time. Reviews focus on logic and trade-offs, where humans add the most value.
  3. AI overreach is bounded. The Devin engineer-mode rules establish "plan first, edit minimally, don't refactor unrelated code." This single rule prevents the most common Cursor failure: a one-line bug fix that turns into 200 lines of unsolicited "improvements."

Install in one command

# Install the entire pack into the current project
tokrepo install pack/cursor-rules-library

# Or pick a single language/framework
tokrepo install python-cursor-rules
tokrepo install react-cursor-rules
tokrepo install devin-engineer-mode

The TokRepo CLI writes the .mdc files to .cursor/rules/ in your repo. Cursor picks them up on the next prompt — no restart required. To regenerate rules from your existing docs:

tokrepo run mdc-generator --input ./docs --output ./.cursor/rules/project.mdc

Common pitfalls

  • One mega-rule that covers everything. Cursor loads matching rules per request based on glob scoping. A single 2000-line .mdc blows your context budget on every prompt. Split by domain: language rules in one file, architecture in another, security in a third.
  • No glob scoping. A backend rule that fires on every frontend file wastes tokens and confuses the agent. Use globs: in the frontmatter to scope rules to **/*.py, app/**/*.tsx, etc.
  • Forgetting Devin engineer-mode for non-Devin tools. This rule isn't actually Devin-specific — it's a generic "behave like a senior engineer" operating manual. It works just as well in Cursor, Claude Code, Codex CLI, and Cline (use the converter from the Skills Ecosystem pack).
  • Treating rules as static. When your stack evolves, the rules need to evolve. Version-control the .cursor/rules/ directory and review changes in PR like any other code. The MDC generator can re-emit rules when your docs change.
  • Pasting code examples that drift from reality. A rule that says "use fooBar() for X" and your code uses bar_foo() is worse than no rule. Either keep examples minimal and abstract, or generate them from real code via the MDC generator.

When this pack alone isn't enough

If you use both Cursor and another AI tool (Claude Code, Codex CLI, etc.), authoring .mdc directly locks you into Cursor. The Skills Ecosystem pack lets you author once in the canonical skill format and emit .mdc for Cursor plus AGENTS.md for Codex CLI, subagents for Claude Code, etc. Use this Cursor Rules Library pack if you're Cursor-only; switch to skills if you're multi-tool.

For pure Cursor power-users: pair this pack with the AI Code Editor Showdown comparison to understand where Cursor wins and loses against Zed, Cody, Continue, Morphic, and OpenCode — useful for advocating Cursor internally or deciding when to switch.

INSTALL · ONE COMMAND
$ tokrepo install pack/cursor-rules-library
hand it to your agent — or paste it in your terminal
What's inside

9 assets in this pack

Prompt#01
Awesome Cursor Rules — AI Coding Standards for 30+ Stacks

Curated .cursorrules files for 30+ tech stacks. Drop into your project root so Cursor AI follows your coding standards automatically.

by TokRepo Curated·389 views
$ tokrepo install awesome-cursor-rules-ai-coding-standards-30-stacks-ca000374
Prompt#02
Cursor Tips — Advanced AI Coding Workflow Guide

Comprehensive guide to advanced Cursor workflows. Covers Composer, multi-file edits, .cursorrules, codebase indexing, and prompt engineering for 10x AI coding productivity.

by Prompt Lab·138 views
$ tokrepo install cursor-tips-advanced-ai-coding-workflow-guide-b7e65852
Config#03
Cursor Rules: Python — Clean Code with AI

Cursor rules for Python development. Enforces PEP 8 style, type hints, docstrings, pytest patterns, and modern Python 3.12+ idioms.

by Cursor · Anysphere·117 views
$ tokrepo install cursor-rules-python-clean-code-ai-f18133e8
Config#04
Cursor Rules MDC Generator — Auto-Generate from Docs

Auto-generate Cursor .mdc rule files for any library using Exa semantic search and LLM-powered documentation extraction.

by AI Open Source·95 views
$ tokrepo install cursor-rules-mdc-generator-auto-generate-docs-8ced00e7
Config#05
Cursor Rules: React + TypeScript — Component & Hooks Patterns

Cursor rules for React with TypeScript. Enforces functional components, hooks patterns, proper typing, and testing conventions.

by Cursor · Anysphere·96 views
$ tokrepo install cursor-rules-react-typescript-component-hooks-patterns-ac71b14f
Config#06
Devin Cursorrules — Turn Cursor into an AI Engineer

A .cursorrules configuration that gives Cursor/Windsurf Devin-like capabilities: automated planning, self-correction, web browsing, and multi-agent collaboration. 6,000+ GitHub stars.

by AI Open Source·93 views
$ tokrepo install devin-cursorrules-turn-cursor-into-ai-engineer-92824589
Config#07
Awesome Cursor Rules MDC — Auto-Generated .mdc Files

Collection of auto-generated Cursor .mdc rule files for 800+ libraries using Exa search and LLM. Drop into .cursor/rules/ for AI-aware coding standards. CC0, 3,400+ stars.

by AI Open Source·64 views
$ tokrepo install awesome-cursor-rules-mdc-auto-generated-mdc-files-f38ab5c1
Prompt#08
Cursor AI Tips — Reddit Wisdom & Best Practices

Comprehensive Cursor AI guide with keyboard shortcuts, Composer mode tips, .cursorrules examples, Max Mode pricing strategies, model benchmarks, and safety protocols. Curated from Reddit community.

by Prompt Lab·105 views
$ tokrepo install cursor-ai-tips-reddit-wisdom-best-practices-1a138ad3
Prompt#09
Cursor Tab — AI Autocomplete That Predicts Your Next Edit

Cursor's predictive code completion that suggests multi-line edits before you type. Cursor Tab uses context from your codebase and recent changes to predict the next logical edit.

by Prompt Lab·74 views
$ tokrepo install cursor-tab-ai-autocomplete-predicts-your-next-edit-6efaef05
FAQ

Frequently asked questions

Are these .mdc rules free?

Yes — all nine packs are MIT-licensed and live in TokRepo's open registry. The MDC generator is a TokRepo CLI command, also free. The only thing you pay for is your Cursor subscription, which is independent of these rules. No registration needed; tokrepo install works without an account for public assets.

How do these compare to writing rules myself?

If you already have project-specific conventions documented somewhere, the MDC generator can produce a tailored .mdc from your existing docs in one command — usually better than starting from a blank file. For language and framework defaults (Python, React, Next.js), starting from this pack and editing is faster than writing from scratch. The pack rules are battle-tested on real codebases; your tweaks layer on top.

Will this work with Codex CLI or Claude Code?

Cursor .mdc is Cursor-specific by file format. The same content can be ported to AGENTS.md (Codex CLI), CLAUDE.md or subagents (Claude Code), .clinerules (Cline), etc. Two paths: (1) install this pack for Cursor and rewrite for other tools, or (2) use the Skills Ecosystem pack to author in skill format and auto-emit .mdc plus all the others. Path 2 is the right answer for multi-tool teams.

What's the difference vs Skills Ecosystem?

This pack ships ready-to-use Cursor rules — install and they work in Cursor. Skills Ecosystem ships the meta tooling: write a portable skill once and the converter emits Cursor .mdc, Codex AGENTS.md, and 12 other targets. If you're Cursor-only, this pack is faster. If you might add another AI tool later, start with Skills Ecosystem and never have to re-port your conventions.

Operational gotcha: will rules slow Cursor down?

Rules add tokens to every prompt that matches their glob, which adds a few hundred milliseconds and a few cents per session. The fix is glob scoping: don't load a Python rule on TypeScript files. Cursor's rule UI shows which rules fired for a given prompt — use it to spot rules with too-broad globs. A well-scoped 9-rule library typically adds <2% to per-prompt token cost.

MORE FROM THE ARSENAL

12 packs · 80+ hand-picked assets

Browse every curated bundle on the home page

Back to all packs