์คํฌ๋ก ๋์๊ฐ๊ธฐ
cursor-rules
LessUp ์ ์
Cursorโ์์ง ํ๊ฐ ์์
๋ด ํ๊ฐ
์์ฝ
๐ฏ A curated collection of 26 code review and coding standard rules for Cursor editor - unify code style, improve quality, and boost team productivity. / ไธไธบ Cursor ็ผ่พๅจๆ้ ็ไปฃ็ ๅฎกๆฅไธ็ผ็ ่ง่่งๅ้๏ผ็ปไธไปฃ็ ้ฃๆ ผ๏ผๆๅไปฃ็ ่ดจ้ใ
์ค๋ช
<div align="center"> # cursor-rules **A curated collection of code review and coding standard rules tailored for [Cursor](https://cursor.sh/) editor** [English](#english) | [ไธญๆ](#ไธญๆ) [](https://github.com/LessUp/cursor-rules/stargazers) [](https://github.com/LessUp/cursor-rules/network/members) [](LICENSE) [](#-supported-tech-stack) Help developers and teams unify code style and improve code quality for more efficient collaborative development. If you find this project helpful, please give us a โญ๏ธ Star โ it's our biggest motivation to keep maintaining! </div> --- <a name="english"></a> ## ๐ Table of Contents - [Key Features](#-key-features) - [Supported Tech Stack](#-supported-tech-stack) - [Quick Start](#-quick-start) - [Rule File Format](#-rule-file-format) - [Validation](#-validation) - [Contributing](#-contributing) - [License](#-license) - [Acknowledgments](#-acknowledgments) ## โจ Key Features | | Feature | Description | | :---: | :--- | :--- | | โ๏ธ | **Unified Standards** | Follows industry-recognized best practices to ensure consistent team code style | | ๐ | **Ready to Use** | Simple configuration to enable rules in Cursor editor | | ๐ก | **Smart Review** | Leverages Cursor's AI capabilities for real-time code improvement suggestions | | ๐งฉ | **Highly Extensible** | Easily customize or add new rules to meet team-specific needs | ## ๐ ๏ธ Supported Tech Stack ### Programming Languages | Tech | Rule File | | :--- | :--- | | Python | [`python.mdc`](python.mdc) | | Java | [`java.mdc`](java.mdc) | | Go | [`go.mdc`](go.mdc) | | C# / .NET | [`csharp-dotnet.mdc`](csharp-dotnet.mdc) | | Ruby | [`ruby.mdc`](ruby.mdc) | | PHP | [`php.mdc`](php.mdc) | | C++ | [`cpp.mdc`](cpp.mdc) | | TypeScript | [`typescript.mdc`](typescript.mdc) | ### Backend Frameworks | Tech | Rule File | | :--- | :--- | | Node.js / Express | [`node-express.mdc`](node-express.mdc) | | Spring | [`spring.mdc`](spring.mdc) | | FastAPI | [`fastapi.mdc`](fastapi.mdc) | ### Frontend Frameworks | Tech | Rule File | | :--- | :--- | | React | [`react.mdc`](react.mdc) | | Vue | [`vue.mdc`](vue.mdc) | | Svelte | [`svelte.mdc`](svelte.mdc) | | Next.js | [`nextjs.mdc`](nextjs.mdc) | | Tailwind CSS | [`tailwind.mdc`](tailwind.mdc) | | Medusa | [`medusa.mdc`](medusa.mdc) | ### Mobile Development | Tech | Rule File | | :--- | :--- | | Android | [`android.mdc`](android.mdc) | | iOS | [`ios.mdc`](ios.mdc) | | WeChat Mini Program | [`wechat-miniprogram.mdc`](wechat-miniprogram.mdc) | | NativeScript | [`nativescript.mdc`](nativescript.mdc) | ### Infrastructure & Engineering | Tech | Rule File | | :--- | :--- | | Database Design | [`database.mdc`](database.mdc) | | Docker | [`docker.mdc`](docker.mdc) | ### General Standards | Tech | Rule File | | :--- | :--- | | Clean Code | [`clean-code.mdc`](clean-code.mdc) | | Code Quality | [`codequality.mdc`](codequality.mdc) | | Git Flow | [`gitflow.mdc`](gitflow.mdc) | ## ๐ Quick Start ### Method 1: Copy Directly to Project (Recommended) ```bash # 1. Create rules directory in project root mkdir -p .cursor/rules # 2. Copy required rule files (e.g., Python + Clean Code) cp path/to/cursor-rules/python.mdc .cursor/rules/ cp path/to/cursor-rules/clean-code.mdc .cursor/rules/ # Cursor will automatically recognize and apply these rules โ ``` ### Method 2: Git Submodule (Easy Updates) ```bash # 1. Add this repo as a submodule git submodule add https://github.com/LessUp/cursor-rules.git .cursor/cursor-rules # 2. Symlink required rules to rules directory mkdir -p .cursor/rules ln -s ../cursor-rules/python.mdc .cursor/rules/python.mdc # Update later git submodule update --remote ``` ### Method 3: Import via Cursor Settings 1. Open Cursor editor. 2. Go to **Settings** โ **Cursor Settings** โ **Rules**. 3. Click **Add Rule** and paste the `.mdc` file content into the rule editor. ## ๐ Rule File Format Each `.mdc` file consists of two parts: ```markdown --- description: Brief description of the rule set purpose globs: **/*.py, src/**/*.py # Applicable file types --- # Rule Body: Specific coding standards and best practices ``` - **`globs` not empty** โ Rule only applies to matching file types (e.g., `**/*.py` only affects Python files). - **`globs` empty** โ Rule applies globally as a general standard. - The validator accepts two `globs` formats: - Unquoted comma-separated string: `**/*.py, src/**/*.py` - Quoted comma-separated string: `"**/*.c,**/*.cpp,Makefile"` ## โ Validation The repo includes a zero-dependency validator to check `.mdc` rule files structure. ```bash # Method 1: Using npm (recommended) npm test # or npm run validate # Method 2: Direct Node execution node scripts/validate-rules.mjs ``` Validate specific files: ```bash npm test -- python.mdc medusa.mdc # or node scripts/validate-rules.mjs python.mdc medusa.mdc ``` The validator checks: - File starts with `---` frontmatter and ends correctly - Contains `description` and `globs` - `description` is not empty - Non-empty `globs` parses as valid comma-separated entries - Body exists after frontmatter - Body contains at least one H1 heading The validator also gives non-blocking warnings: - Content before first H1 - Multiple H1 headings in same file - Unknown frontmatter fields ## ๐ค Contributing Before submitting a Pull Request, run the validator to ensure new or modified rule files comply with repo conventions. We welcome community contributions! ### How to Contribute - **Submit Issues**: Found a problem or have a new idea? Tell us in [Issues](https://github.com/LessUp/cursor-rules/issues). - **Submit Pull Requests**: 1. Fork this repository 2. Create feature branch: `git checkout -b feature/AmazingFeature` 3. Commit changes: `git commit -m 'Add some AmazingFeature'` 4. Push branch: `git push origin feature/AmazingFeature` 5. Open a Pull Request ### Rule Writing Guidelines When contributing new rules, follow this template: ```markdown --- description: Brief description of the rule set purpose globs: **/*.ext, src/**/*.ext --- # Technology Name Best Practices ## Section Title - Specific, actionable guidance (avoid vague descriptions) - Recommend specific tools, libraries, and commands - Provide code examples and configuration references ``` ## ๐ License This project is licensed under [MIT](LICENSE) โ free to use, modify, and distribute. ## โค๏ธ Acknowledgments Thanks to all developers who contributed to this project! --- <a name="ไธญๆ"></a> ## ๐ ็ฎๅฝ - [ๆ ธๅฟไผๅฟ](#-ๆ ธๅฟไผๅฟ) - [ๆฏๆ็ๆๆฏๆ ](#-ๆฏๆ็ๆๆฏๆ ) - [ๅฟซ้ๅผๅง](#-ๅฟซ้ๅผๅง) - [่งๅๆไปถ่ฏดๆ](#-่งๅๆไปถ่ฏดๆ) - [้ช่ฏ่งๅๆไปถ](#-้ช่ฏ่งๅๆไปถ) - [่ดก็ฎๆๅ](#-่ดก็ฎๆๅ) - [่ฎธๅฏ่ฏ](#-่ฎธๅฏ่ฏ) - [่ด่ฐข](#-่ด่ฐข) ## โจ ๆ ธๅฟไผๅฟ | | ็นๆง | ่ฏดๆ | | :---: | :--- | :--- | | โ๏ธ | **็ปไธ่ง่** | ้ตๅพชไธ็ๅนฟๆณ่ฎคๅฏ็ๆไฝณๅฎ่ทต๏ผ็กฎไฟๅข้ไปฃ็ ้ฃๆ ผไธ่ด | | ๐ | **ๅผ็ฎฑๅณ็จ** | ๅช้็ฎๅ้ ็ฝฎ๏ผๅณๅฏๅจ Cursor ็ผ่พๅจไธญๅฏ็จ | | ๐ก | **ๆบ่ฝๅฎกๆฅ** | ็ปๅ Cursor ็ AI ่ฝๅ๏ผๅฎๆถ่ทๅพไปฃ็ ๆน่ฟๅปบ่ฎฎ | | ๐งฉ | **้ซๅบฆๅฏๆฉๅฑ** | ่ฝปๆพๅฎๅถๆๆทปๅ ๆฐ่งๅ๏ผๆปก่ถณๅข้ไธชๆงๅ้ๆฑ | ## ๐ ๏ธ ๆฏๆ็ๆๆฏๆ ### ็ผ็จ่ฏญ่จ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | Python | [`python.mdc`](python.mdc) | | Java | [`java.mdc`](java.mdc) | | Go | [`go.mdc`](go.mdc) | | C# / .NET | [`csharp-dotnet.mdc`](csharp-dotnet.mdc) | | Ruby | [`ruby.mdc`](ruby.mdc) | | PHP | [`php.mdc`](php.mdc) | | C++ | [`cpp.mdc`](cpp.mdc) | | TypeScript | [`typescript.mdc`](typescript.mdc) | ### ๅ็ซฏๆกๆถ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | Node.js / Express | [`node-express.mdc`](node-express.mdc) | | Spring | [`spring.mdc`](spring.mdc) | | FastAPI | [`fastapi.mdc`](fastapi.mdc) | ### ๅ็ซฏๆกๆถ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | React | [`react.mdc`](react.mdc) | | Vue | [`vue.mdc`](vue.mdc) | | Svelte | [`svelte.mdc`](svelte.mdc) | | Next.js | [`nextjs.mdc`](nextjs.mdc) | | Tailwind CSS | [`tailwind.mdc`](tailwind.mdc) | | Medusa | [`medusa.mdc`](medusa.mdc) | ### ็งปๅจ็ซฏ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | Android | [`android.mdc`](android.mdc) | | iOS | [`ios.mdc`](ios.mdc) | | ๅพฎไฟกๅฐ็จๅบ | [`wechat-miniprogram.mdc`](wechat-miniprogram.mdc) | | NativeScript | [`nativescript.mdc`](nativescript.mdc) | ### ๅบ็ก่ฎพๆฝไธๅทฅ็จๅ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | ๆฐๆฎๅบ่ฎพ่ฎก | [`database.mdc`](database.mdc) | | Docker | [`docker.mdc`](docker.mdc) | ### ้็จ่ง่ | ๆๆฏ | ่งๅๆไปถ | | :--- | :--- | | ๆดๆดไปฃ็ | [`clean-code.mdc`](clean-code.mdc) | | ไปฃ็ ่ดจ้ | [`codequality.mdc`](codequality.mdc) | | Git Flow | [`gitflow.mdc`](gitflow.mdc) | ## ๐ ๅฟซ้ๅผๅง ### ๆนๅผไธ๏ผ็ดๆฅๅคๅถๅฐ้กน็ฎ๏ผๆจ่๏ผ ```bash # 1. ๅจ้กน็ฎๆ น็ฎๅฝไธๅๅปบ่งๅ็ฎๅฝ mkdir -p .cursor/rules # 2. ๅคๅถๆ้็่งๅๆไปถ๏ผไปฅ Python + Clean Code ไธบไพ๏ผ cp path/to/cursor-rules/python.mdc .cursor/rules/ cp path/to/cursor-rules/clean-code.mdc .cursor/rules/ # Cursor ไผ่ชๅจ่ฏๅซๅนถๅบ็จ่ฟไบ่งๅ โ ``` ### ๆนๅผไบ๏ผGit Submodule๏ผไพฟไบๅๆญฅๆดๆฐ๏ผ ```bash # 1. ๅฐๆฌไปๅบไฝไธบๅญๆจกๅๆทปๅ ๅฐ้กน็ฎไธญ git submodule add https://github.com/LessUp/cursor-rules.git .cursor/cursor-rules # 2. ๅฐๆ้่งๅ่ฝฏ้พๆฅๅฐ rules ็ฎๅฝ mkdir -p .cursor/rules ln -s ../cursor-rules/python.mdc .cursor/rules/python.mdc # ๅ็ปญๅๆญฅๆดๆฐ git submodule update --remote ``` ### ๆนๅผไธ๏ผ้่ฟ Cursor ่ฎพ็ฝฎๅฏผๅ ฅ 1. ๆๅผ Cursor ็ผ่พๅจใ 2. ่ฟๅ ฅ **Settings** โ **Cursor Settings** โ **Rules**ใ 3. ็นๅป **Add Rule**๏ผๅฐ `.mdc` ๆไปถ็ๅ ๅฎน็ฒ่ดดๅฐ่งๅ็ผ่พๅจไธญใ ## ๐ ่งๅๆไปถ่ฏดๆ ๆฏไธช `.mdc` ๆไปถ็ฑไธค้จๅ็ปๆ๏ผ ```markdown --- description: ่งๅ้็จ้็็ฎ็ญๆ่ฟฐ globs: **/*.py, src/**/*.py # ้็จ็ๆไปถ็ฑปๅ --- # ่งๅๆญฃๆ๏ผๅ ทไฝ็็ผ็ ่ง่ๅๆไฝณๅฎ่ทต ``` - **`globs` ไธไธบ็ฉบ** โ ่งๅไป ๅจๅน้ ็ๆไปถ็ฑปๅไธ็ๆ๏ผๅฆ `**/*.py` ๅชๅฏน Python ๆไปถ็ๆ๏ผใ - **`globs` ไธบ็ฉบ** โ ่งๅไฝไธบ้็จ่ง่ๅ จๅฑ็ๆใ - ๅฝๅ validator ๆฅๅไธค็ง `globs` ๅๆณ๏ผ - ไธๅธฆๆดไฝๅผๅท็้ๅทๅ้ๅญ็ฌฆไธฒ๏ผ`**/*.py, src/**/*.py` - ๅธฆๆดไฝๅผๅท็้ๅทๅ้ๅญ็ฌฆไธฒ๏ผ`"**/*.c,**/*.cpp,Makefile"` ## โ ้ช่ฏ่งๅๆไปถ ไปๅบๅ ็ฝฎไบไธไธช้ถไพ่ต็ validator๏ผ็จไบๆฃๆฅๆ น็ฎๅฝไธ `.mdc` ่งๅๆไปถ็ๅบๆฌ็ปๆๆฏๅฆๆญฃ็กฎใ ```bash # ๆนๅผไธ๏ผไฝฟ็จ npm๏ผๆจ่๏ผ npm test # ๆ npm run validate # ๆนๅผไบ๏ผ็ดๆฅไฝฟ็จ Node node scripts/validate-rules.mjs ``` ไนๅฏไปฅๅชๆ ก้ชๆๅฎๆไปถ๏ผ ```bash npm test -- python.mdc medusa.mdc # ๆ node scripts/validate-rules.mjs python.mdc medusa.mdc ``` validator ้ป่ฎคไผๆฃๆฅ๏ผ - ๆไปถๆฏๅฆไปฅ `---` frontmatter ๅผๅงๅนถๆญฃ็กฎ็ปๆ - ๆฏๅฆๅ ๅซ `description` ๅ `globs` - `description` ๆฏๅฆไธบ็ฉบ - ้็ฉบ `globs` ๆฏๅฆ่ฝ่งฃๆไธบๆๆ็้ๅทๅ้ๆก็ฎ - frontmatter ๅๆฏๅฆๅญๅจๆญฃๆ - ๆญฃๆไธญๆฏๅฆ่ณๅฐๅ ๅซไธไธช H1 ๆ ้ข validator ่ฟไผ็ปๅบ้้ปๅก warning๏ผไพๅฆ๏ผ - ้ฆไธช H1 ไนๅๅบ็ฐๆญฃๆๅ ๅฎน - ๅไธๆไปถไธญๅญๅจๅคไธช H1 - ๅบ็ฐๆช็ฅ frontmatter ๅญๆฎต ## ๐ค ่ดก็ฎๆๅ ๅจๆไบค Pull Request ๅ๏ผๅปบ่ฎฎๅ ่ฟ่กไธๆฌก validator๏ผ็กฎไฟๆฐๅขๆไฟฎๆน็่งๅๆไปถ็ฌฆๅไปๅบ็บฆๅฎใ ๆไปฌ้ๅธธๆฌข่ฟ็คพๅบ็่ดก็ฎ๏ผ ### ๅไธๆนๅผ - **ๆไบค Issue**๏ผๅ็ฐ้ฎ้ขๆๆๆฐๆณๆณ๏ผ่ฏทๅจ [Issues](https://github.com/LessUp/cursor-rules/issues) ไธญๅ่ฏๆไปฌใ - **ๆไบค Pull Request**๏ผ 1. Fork ๆฌไปๅบ 2. ๅๅปบ็นๆงๅๆฏ๏ผ`git checkout -b feature/AmazingFeature` 3. ๆไบคๆดๆน๏ผ`git commit -m 'Add some AmazingFeature'` 4. ๆจ้ๅๆฏ๏ผ`git push origin feature/AmazingFeature` 5. ๆๅผไธไธช Pull Request ### ็ผๅๆฐ่งๅ็่ง่ ่ดก็ฎๆฐ่งๅๆถ๏ผ่ฏท้ตๅพชไปฅไธๆจกๆฟ๏ผ ```markdown --- description: ็ฎ็ญๆ่ฟฐ่ฏฅ่งๅ้็็จ้ globs: **/*.ext, src/**/*.ext --- # ๆๆฏๅ็งฐ ๆไฝณๅฎ่ทต ## ็ซ ่ๆ ้ข - ๅ ทไฝใๅฏๆไฝ็ๆๅฏผ๏ผ้ฟๅ ็ฉบๆณ็ๆ่ฟฐ๏ผ - ๆจ่ๅ ทไฝ็ๅทฅๅ ทใๅบๅๅฝไปค - ๆไพไปฃ็ ็คบไพๅ้ ็ฝฎๅ่ ``` ## ๐ ่ฎธๅฏ่ฏ ๆฌ้กน็ฎ้็จ [MIT](LICENSE) ่ฎธๅฏ่ฏ โ ๅฏ่ช็ฑไฝฟ็จใไฟฎๆนๅๅๅใ ## โค๏ธ ่ด่ฐข ๆ่ฐขๆๆไธบ่ฟไธช้กน็ฎๅๅบ่ดก็ฎ็ๅผๅ่ ๏ผ --- <div align="center"> **Like this project? Give us a [โญ๏ธ Star](https://github.com/LessUp/cursor-rules/stargazers)!** </div>
์ค์น
https://github.com/LessUp/cursor-rules์์ ์คํฌ์ ์ค์นํด์ค์ด ์คํฌ์ ClawHub ๋ ์ง์คํธ๋ฆฌ์ ๊ฒ์๋์ง ์์์ต๋๋ค. ํ๋กฌํํธ๋ฅผ ์ฝ๋ฉ ์์ด์ ํธ(Claude Code, Cursor, Codex)์ ๋ถ์ฌ๋ฃ์ผ๋ฉด ์์ค ์ ์ฅ์์์ ๋ฐ๋ก ์คํฌ์ ์ค์นํฉ๋๋ค.
์ ์ฅ์ ์ด๊ธฐ