Skip to content

Latest commit

 

History

History
324 lines (232 loc) · 12.2 KB

File metadata and controls

324 lines (232 loc) · 12.2 KB

Awesome Cursor Rules

Project Status Website GitHub Pages Translation Progress GitHub Stars GitHub Forks License

🇨🇳 中文 | 🇺🇸 English

A curated collection of Cursor AI coding rules for modern development stacks 为中文开发者打造的 Cursor AI 编程规则集合 - 查看中文版

132 rule files · 32 tech domains · 190 technical docs · 6,500+ lines

🚀 Quick Start · 📂 Browse Rules · 💡 Usage Guide · 📚 Docs · 🤝 Contributing


📋 Table of Contents


What is this?

Awesome Cursor Rules is a curated collection of Cursor AI coding assistant rules. This project provides comprehensive translations and localized content for global developers:

  • 🎯 Accurate Translation — High-quality translations with precise technical terminology
  • 📂 Clear Structure — Organized by technology domain for easy discovery
  • 🚀 Ready to Use — Copy .cursorrules file and start coding immediately
  • 🌍 Bilingual Support — Complete English and Chinese documentation
  • ⚡ 132 Rules — Covering frontend, backend, mobile, AI, DevOps, and more

🌐 Online Documentation: awesome-cursorrules-zh.js.org


What is .cursorrules?

.cursorrules is a project-level configuration file for the Cursor AI editor that defines how AI should assist your coding:

Feature Description Example
Coding Standards Define code style and naming conventions PascalCase components, camelCase functions
Tech Stack Specify frameworks, libraries, toolchains React + TypeScript + Tailwind CSS
Best Practices Automatically apply industry standards Error handling, performance optimization
AI Behavior Customize AI response style Detailed comments, functional programming

💡 Essence: A "project handbook" for AI assistants that ensures consistent, high-quality code generation


✨ Features

🏆 Popular Tech Stacks

TypeScript
Most covered
React
Frontend leader
Python
Backend & AI
Next.js
Full-stack
Docker
DevOps

📊 Coverage Areas

  • 🌐 App Development: Frontend, Backend, Mobile, Database, Systems
  • 🤖 AI & Data: Machine Learning, Data Science, Data Engineering
  • ☁️ Infrastructure: DevOps, Cloud, Edge Computing, Security
  • 🔬 Specialized: Blockchain, IoT, Quantum Computing, Bio Tech

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/LessUp/awesome-cursorrules-zh.git

# Browse available rules
cd awesome-cursorrules-zh
ls rules/frontend/react/

Usage

# Copy rule to your project
cp rules/frontend/react/nextjs-typescript/.cursorrules /path/to/your/project/

That's it! Open your project in Cursor and the AI will follow the rules automatically.

Quick Examples

Tech Stack Rule Command
Next.js + TypeScript nextjs-typescript cp rules/frontend/react/nextjs-typescript/.cursorrules ./
Vue 3 composition-api cp rules/frontend/vue/composition-api/.cursorrules ./
FastAPI fastapi-api-example cp rules/backend/python/fastapi-api-example/.cursorrules ./
Flutter flutter-app-expert cp rules/mobile/flutter/flutter-app-expert/.cursorrules ./

📖 Complete Quick Start Guide


📂 Rule Categories

🌐 App Development
Domain Directory Technologies
Frontend rules/frontend/ React, Vue, Angular, Svelte, SolidJS, TypeScript
Backend rules/backend/ Node.js, Python, Go, Java, PHP, .NET, Elixir
Mobile rules/mobile/ Flutter, React Native, SwiftUI, Jetpack Compose
Database rules/database/ Cloud-native, Spatiotemporal
Systems rules/systems/ Modern C++, Rust
🤖 AI & Data
Domain Directory Technologies
AI/ML rules/ai/ Computer Vision, MLOps, Knowledge Graphs, Edge AI
Data Science rules/data-science/ Pandas, PyTorch, TensorFlow, Scikit-learn
Data Engineering rules/data/ Kafka, Spark, Flink, Data Warehouses
☁️ Infrastructure & DevOps
Domain Directory Technologies
DevOps rules/devops/ Docker, Kubernetes, Terraform, CI/CD
Cloud rules/cloud/ Middleware, Serverless
Edge Computing rules/edge/ AI Inference, Model Compression
Security rules/security/ Zero Trust, Privacy Computing, Homomorphic Encryption
🔬 Specialized Domains
Domain Directory Technologies
Blockchain rules/blockchain/ Solidity, Web3, Smart Contracts, Foundry
IoT rules/iot/ Embedded, Digital Twins
Quantum Computing rules/quantum/ Quantum Error Correction, Superconducting
Bio Tech rules/bio/ Bioelectronics, Biosensors
Hardware rules/hardware/ Neuromorphic Chips, Photon Computing
Gaming rules/gaming/ DragonRuby, Cloud Gaming
🛠️ Tools & General
Domain Directory Technologies
Tools rules/tools/ Convex, GitHub Quality
General rules/general/ Code Guidelines, Style Consistency, Testing

See full directory structure in rules/


💡 Usage

Single Tech Stack

cp rules/frontend/react/nextjs-typescript/.cursorrules ./

Multiple Tech Stacks

Option 1: Merge Rules

cat rules/frontend/react/nextjs-typescript/.cursorrules > .cursorrules
echo "" >> .cursorrules
cat rules/backend/python/fastapi-api-example/.cursorrules >> .cursorrules

Option 2: Directory-Level Rules (Recommended for monorepos)

project/
├── .cursorrules           # Global rules
├── frontend/
│   └── .cursorrules       # Frontend-specific rules
└── backend/
    └── .cursorrules       # Backend-specific rules

Customize Rules

# Append project-specific rules
cat >> .cursorrules << 'EOF'

## Project Custom Rules
- API routes use /api/v1 prefix
- All models must include created_at and updated_at fields
- Prefer functional components over class components
EOF

📖 Complete Best Practices Guide


📊 Statistics

Metric Value
Rule Files 132 .cursorrules
Tech Domains 32 categories
Tech Documents 190 Markdown files
Total Lines 6,500+ lines
Translation 100% Chinese + English
Coverage Frontend, Backend, Mobile, AI, DevOps, Blockchain, IoT, etc.

Top Technologies

TypeScript  ████████████████████████████████  29 rules
React       ██████████████████████            19 rules
Tailwind    ███████████████                   13 rules
Python      █████████████                     11 rules
Next.js     ██████████                         8 rules
Node.js     █████████                          7 rules
Docker      █████████                          7 rules

📚 Documentation

Document Description Link
🚀 Quick Start 5-minute getting started guide Online · GitHub
📖 Installation Detailed setup instructions Online · GitHub
💡 Best Practices Configuration & usage tips Online · GitHub
🔧 Troubleshooting Common issues & solutions Online · GitHub
📋 API Reference Rule format reference Online · GitHub
📝 Changelog Version history English · 中文

🤝 Contributing

Contributions are welcome in all forms:

  • 🐛 Report IssuesSubmit an Issue
  • 🔧 Improve ContentSubmit a Pull Request
  • 🔄 Sync Upstream — Help keep this project in sync with the original
  • 📝 Enhance Documentation — Improve guides and documentation

See Contributing Guide for details.


🙏 Acknowledgments

This project is a Chinese localization of PatrickJS/awesome-cursorrules. Special thanks to the original author and all contributors.


📄 License

MIT License


If this project helps you, please give it a ⭐ Star!

🌐 Visit Official Website · ⬆ Back to Top