[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"pack-detail-cursor-rules-library-zh":3,"seo:pack:cursor-rules-library:zh":90},{"code":4,"message":5,"data":6},200,"操作成功",{"pack":7},{"slug":8,"icon":9,"tone":10,"status":11,"status_label":12,"title":13,"description":14,"items":15,"install_cmd":89},"cursor-rules-library","📐","#334155","stable","稳定","Cursor 规则库","Cursor 即装即用 `.mdc` 规则包 — Python \u002F React \u002F Devin 工程师模式 + 从文档自动生成 MDC 的工具。",[16,28,38,46,54,61,68,75,82],{"id":17,"uuid":18,"slug":19,"title":20,"description":21,"author_name":22,"view_count":23,"vote_count":24,"lang_type":25,"type":26,"type_label":27},23,"ca000374-f5d8-4d75-a30c-460fda0b6b0e","awesome-cursor-rules-ai-coding-standards-30-stacks-ca000374","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.","TokRepo精选",1780,0,"en","skill","Skill",{"id":29,"uuid":30,"slug":31,"title":32,"description":33,"author_name":34,"view_count":35,"vote_count":24,"lang_type":25,"type":36,"type_label":37},745,"b7e65852-71d5-4114-bf50-162d16348de3","cursor-tips-advanced-ai-coding-workflow-guide-b7e65852","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.","Prompt Lab",383,"prompt","Prompt",{"id":39,"uuid":40,"slug":41,"title":42,"description":43,"author_name":44,"view_count":45,"vote_count":24,"lang_type":25,"type":26,"type_label":27},160,"f18133e8-aad7-4875-9828-acc45a09962f","cursor-rules-python-clean-code-ai-f18133e8","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.","Cursor · Anysphere",337,{"id":47,"uuid":48,"slug":49,"title":50,"description":51,"author_name":52,"view_count":53,"vote_count":24,"lang_type":25,"type":26,"type_label":27},41,"8ced00e7-b6b4-4ea8-adfb-3ddc0fe82620","cursor-rules-mdc-generator-auto-generate-docs-8ced00e7","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.","AI Open Source",310,{"id":55,"uuid":56,"slug":57,"title":58,"description":59,"author_name":44,"view_count":60,"vote_count":24,"lang_type":25,"type":26,"type_label":27},161,"ac71b14f-5ff6-4eb3-8087-a2b999a4a5f9","cursor-rules-react-typescript-component-hooks-patterns-ac71b14f","Cursor Rules: React + TypeScript — Component & Hooks Patterns","Cursor rules for React with TypeScript. Enforces functional components, hooks patterns, proper typing, and testing conventions.",299,{"id":62,"uuid":63,"slug":64,"title":65,"description":66,"author_name":52,"view_count":67,"vote_count":24,"lang_type":25,"type":26,"type_label":27},482,"92824589-6223-492b-bd37-5aec9fa93e74","devin-cursorrules-turn-cursor-into-ai-engineer-92824589","Devin Cursorrules — Turn Cursor into an AI Engineer","A .cursorrules configuration that gives Cursor\u002FWindsurf Devin-like capabilities: automated planning, self-correction, web browsing, and multi-agent collaboration. 6,000+ GitHub stars.",315,{"id":69,"uuid":70,"slug":71,"title":72,"description":73,"author_name":52,"view_count":74,"vote_count":24,"lang_type":25,"type":26,"type_label":27},501,"f38ab5c1-c3f6-4d0c-b055-37dbfb654e31","awesome-cursor-rules-mdc-auto-generated-mdc-files-f38ab5c1","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\u002Frules\u002F for AI-aware coding standards. CC0, 3,400+ stars.",286,{"id":76,"uuid":77,"slug":78,"title":79,"description":80,"author_name":34,"view_count":81,"vote_count":24,"lang_type":25,"type":36,"type_label":37},496,"1a138ad3-17fa-47ad-a5ff-48a6ca8e090c","cursor-ai-tips-reddit-wisdom-best-practices-1a138ad3","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.",322,{"id":83,"uuid":84,"slug":85,"title":86,"description":87,"author_name":34,"view_count":88,"vote_count":24,"lang_type":25,"type":36,"type_label":37},834,"6efaef05-fc58-432d-9bd9-f0530bded8e1","cursor-tab-ai-autocomplete-predicts-your-next-edit-6efaef05","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.",326,"tokrepo install pack\u002Fcursor-rules-library",{"pageType":91,"pageKey":8,"locale":92,"title":93,"metaDescription":94,"h1":13,"tldr":95,"bodyMarkdown":96,"faq":97,"schema":113,"internalLinks":123,"citations":136,"wordCount":149,"generatedAt":150},"pack","zh","Cursor 规则库：Python \u002F React \u002F Devin 模式 .mdc 包","Cursor 即装即用 .mdc 规则包 —— Python \u002F React \u002F Devin 工程师模式 + 从文档自动生成 MDC 的工具。TokRepo 一条命令装齐。","九个即贴即用的 Cursor `.mdc` 规则包 —— Python \u002F React \u002F Devin 风格工程师手册，加一个能从项目文档合成新规则的 MDC 生成器。一条命令装好。","## 这个 pack 装了什么\n\nCursor 的 Project Rules（`.cursor\u002Frules\u002F` 下的 `.mdc` 文件）是给一个代码库锁死风格、架构、流程预期的最高杠杆工具。Cursor 默认安装不带规则；团队要么从零写（慢、漂移），要么每个项目粘贴同样模板（无共享维护）。这个 pack 收齐 **九个 `.mdc` 包**，覆盖多数团队真想要的 80%，加一个从你现有文档生成定制规则的 MDC 生成器。\n\n| # | 资产 | 类型 | 覆盖什么 |\n|---|---|---|---|\n| 1 | Python 规则 | 语言 | 类型 \u002F ruff \u002F pytest \u002F 异步模式 |\n| 2 | React 规则 | 语言 | hooks \u002F TypeScript \u002F 无障碍 \u002F 文件布局 |\n| 3 | Devin 工程师模式 | 元 | 操作手册：先规划 \u002F 外科手术式改 \u002F 不越界 |\n| 4 | MDC 生成器 | 工具 | 读 `docs\u002F` 出定制 `.mdc` |\n| 5 | Next.js 模式 | 框架 | App Router \u002F server actions \u002F 数据获取 |\n| 6 | Tailwind \u002F shadcn 规则 | UI | utility-first 约定 \u002F 组件组合 |\n| 7 | API 设计规则 | 后端 | REST\u002FGraphQL 约定 \u002F 错误 envelope |\n| 8 | 测试纪律规则 | 质量 | golden-file \u002F snapshot \u002F mutation 测试 |\n| 9 | 安全审查规则 | 质量 | 每个 diff 都要标的 OWASP top-10 模式 |\n\n## 为什么要装\n\n没有规则的 Cursor agent 是通才。装上规则就是有立场的队友 —— 它已经懂你的栈、习语、护栏。装这个 pack 后团队报的三个具体收益：\n\n1. **新人 onboarding 从天到小时**。新工程师 `Cmd-K` 出来的代码已经长得像代码库其他部分，因为 Cursor 在读人类入职第一天读的同一份约定文档。\n2. **review 疲劳下降**。reviewer 不再每个 PR 都揪同样五个风格\u002F架构小问题 —— 规则在生成阶段就抓了。review 聚焦逻辑和取舍，那才是人类增值最多的地方。\n3. **AI 越界被限制**。Devin 工程师模式规则建立「先规划、最小修改、别重构无关代码」。单这条规则就阻止了 Cursor 最常见的失败：一行 bug 修变成 200 行没要求的「优化」。\n\n## 一条命令装齐\n\n```bash\n# 装整个 pack 进当前项目\ntokrepo install pack\u002Fcursor-rules-library\n\n# 或者只装单个语言 \u002F 框架\ntokrepo install python-cursor-rules\ntokrepo install react-cursor-rules\ntokrepo install devin-engineer-mode\n```\n\nTokRepo CLI 把 `.mdc` 文件写进 repo 的 `.cursor\u002Frules\u002F`。Cursor 下次 prompt 就拿到 —— 不用重启。从你现有文档重新生成规则：\n\n```bash\ntokrepo run mdc-generator --input .\u002Fdocs --output .\u002F.cursor\u002Frules\u002Fproject.mdc\n```\n\n## 常见坑\n\n- **一条大规则覆盖一切**。Cursor 按 glob 范围每次请求加载匹配规则。一个 2000 行的 `.mdc` 把你每次 prompt 的上下文预算炸掉。按域拆：语言规则一个文件，架构一个，安全一个。\n- **没设 glob 范围**。一个后端规则在每个前端文件都触发会浪费 token 还把 agent 带偏。在 frontmatter 用 `globs:` 把规则限到 `**\u002F*.py`、`app\u002F**\u002F*.tsx` 等。\n- **非 Devin 工具忽略 Devin 工程师模式**。这条规则其实不是 Devin 专属 —— 它是通用的「像高级工程师那样」操作手册。在 Cursor \u002F Claude Code \u002F Codex CLI \u002F Cline 一样能跑（用 Skill 生态 pack 的转换器）。\n- **把规则当静态的**。栈在演进，规则也得演进。`.cursor\u002Frules\u002F` 进版本控制，像别的代码一样在 PR 里 review 改动。文档变时 MDC 生成器能重新发规则。\n- **粘贴跟现实漂移的代码示例**。规则说「X 用 `fooBar()`」结果代码里是 `bar_foo()`，比没规则更糟。要么示例最少最抽象，要么用 MDC 生成器从真代码生成。\n\n## 这个 pack 一个不够时\n\n如果你*同时*用 Cursor 和别的 AI 工具（Claude Code \u002F Codex CLI 等），直接写 `.mdc` 把你锁死在 Cursor。Skill 生态 pack 让你用规范 skill 格式写一次，给 Cursor 出 `.mdc`、给 Codex CLI 出 `AGENTS.md`、给 Claude Code 出 subagent 等。只用 Cursor 就用这个 Cursor 规则库 pack；多工具就转用 skill。\n\n纯 Cursor 重度用户：配合 AI 代码编辑器横评 pack，看 Cursor 跟 Zed \u002F Cody \u002F Continue \u002F Morphic \u002F OpenCode 比哪赢哪输 —— 内部推 Cursor 或决定何时换工具时有用。",[98,101,104,107,110],{"q":99,"a":100},"这些 .mdc 规则免费吗？","免费 —— 九个 pack 都是 MIT 协议，住在 TokRepo 公开注册中心。MDC 生成器是 TokRepo CLI 命令，也免费。你唯一付钱的是 Cursor 订阅，跟这些规则独立。无需注册；公开资产 `tokrepo install` 不用账号就能用。",{"q":102,"a":103},"比自己写规则强在哪？","如果你已经有项目专属约定写在某处，MDC 生成器一条命令就能从现有文档出定制 `.mdc` —— 通常比从空白开始好。对语言和框架默认值（Python \u002F React \u002F Next.js）来说，从这个 pack 开始改比从零写快。pack 规则在真代码库实战过；你的微调加在上面。",{"q":105,"a":106},"用 Codex CLI 或 Claude Code 也能用吗？","Cursor `.mdc` 文件格式是 Cursor 专属。同样*内容*可以移植到 AGENTS.md（Codex CLI）\u002F CLAUDE.md 或 subagent（Claude Code）\u002F `.clinerules`（Cline）等。两条路：(1) 给 Cursor 装这个 pack 然后给别的工具重写，或者 (2) 用 Skill 生态 pack 按 skill 格式写自动出 `.mdc` 加其他全部。多工具团队选 (2)。",{"q":108,"a":109},"跟 Skill 生态 pack 啥区别？","这个 pack 出即用 Cursor 规则 —— 装上 Cursor 就工作。Skill 生态出*元*工具：可移植 skill 写一次，转换器出 Cursor `.mdc` \u002F Codex `AGENTS.md` 加 12 个其他目标。只用 Cursor 这个 pack 更快。可能以后加别的 AI 工具就从 Skill 生态开始，永远不用重新移植你的约定。",{"q":111,"a":112},"运维坑：规则会拖慢 Cursor 吗？","规则给每个匹配 glob 的 prompt 加 token，每个会话多加几百毫秒和几分钱。解决办法是 glob 范围：别在 TypeScript 文件加载 Python 规则。Cursor 规则 UI 显示某次 prompt 触发了哪些规则 —— 用它找 glob 太宽的规则。范围合理的 9 规则库通常每次 prompt token 成本加不到 2%。",{"@context":114,"@type":115,"name":116,"description":117,"numberOfItems":118,"publisher":119},"https:\u002F\u002Fschema.org","CollectionPage","Cursor Rules Library","Drop-in .mdc rule packs for Cursor — Python, React, Devin-style engineer mode, and an MDC generator.",9,{"@type":120,"name":121,"url":122},"Organization","TokRepo","https:\u002F\u002Ftokrepo.com",[124,128,132],{"url":125,"anchor":126,"reason":127},"\u002Fzh\u002Ftools\u002Fcursor","Cursor","本 pack 规则丢进的 IDE",{"url":129,"anchor":130,"reason":131},"\u002Fzh\u002Fpacks\u002Fskills-ecosystem","Skill 生态","skill 可编译为 .mdc —— 写一次到处部署",{"url":133,"anchor":134,"reason":135},"\u002Fzh\u002Fpacks\u002Fai-code-editor-showdown","AI 代码编辑器横评","Cursor 跟 Zed \u002F Cody \u002F Continue 横评",[137,141,145],{"claim":138,"source_name":139,"source_url":140},"Cursor .mdc rule file format and Project Rules documentation","Cursor Rules docs","https:\u002F\u002Fdocs.cursor.com\u002Fcontext\u002Frules",{"claim":142,"source_name":143,"source_url":144},"PatrickJS\u002Fawesome-cursorrules curated list of Cursor rule files","awesome-cursorrules","https:\u002F\u002Fgithub.com\u002FPatrickJS\u002Fawesome-cursorrules",{"claim":146,"source_name":147,"source_url":148},"Devin engineer-style operating manual for AI coding assistants","Cognition Devin docs","https:\u002F\u002Fdocs.devin.ai\u002F",572,"2026-05-02T15:40:00Z"]