Last active
December 4, 2025 21:59
-
-
Save andreimacavei/fc80bfcc79fbe482acdbcf97405d25a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| description: | |
| globs: | |
| alwaysApply: false | |
| --- | |
| --- | |
| description: How to add or edit Cursor rules in our project | |
| globs: | |
| alwaysApply: false | |
| --- | |
| # Cursor Rules Location | |
| How to add new cursor rules to the project | |
| 1. Always place rule files in PROJECT_ROOT/.cursor/rules/: | |
| ``` | |
| .cursor/rules/ | |
| ├── your-rule-name.mdc | |
| ├── another-rule.mdc | |
| └── ... | |
| ``` | |
| 2. Follow the naming convention: | |
| - Use kebab-case for filenames | |
| - Always use .mdc extension | |
| - Make names descriptive of the rule's purpose | |
| 3. Directory structure: | |
| ``` | |
| PROJECT_ROOT/ | |
| ├── .cursor/ | |
| │ └── rules/ | |
| │ ├── your-rule-name.mdc | |
| │ └── ... | |
| └── ... | |
| ``` | |
| 4. Never place rule files: | |
| - In the project root | |
| - In subdirectories outside .cursor/rules | |
| - In any other location | |
| 5. Cursor rules have the following structure: | |
| ```` | |
| --- | |
| description: Short description of the rule's purpose | |
| globs: optional/path/pattern/**/* | |
| alwaysApply: false | |
| --- | |
| # Rule Title | |
| Main content explaining the rule with markdown formatting. | |
| 1. Step-by-step instructions | |
| 2. Code examples | |
| 3. Guidelines | |
| Example: | |
| ```typescript | |
| // Good example | |
| function goodExample() { | |
| // Implementation following guidelines | |
| } | |
| // Bad example | |
| function badExample() { | |
| // Implementation not following guidelines | |
| } | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment