-
Notifications
You must be signed in to change notification settings - Fork 151
/
.cursorrules
82 lines (73 loc) · 3.74 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Awesome CursorRules
// A curated list of awesome .cursorrules files for enhancing Cursor AI experience
// General guidelines
Always use Markdown for documentation and README files
Maintain the existing structure of the README.md file
// README.md structure
Maintain the following structure in the README.md file:
1. Title and Awesome badge
2. Logo
3. Short description
4. "Why .cursorrules?" section
5. Table of Contents
6. Rules section
- Frontend Frameworks and Libraries
- Backend and Full-Stack
- Mobile Development
- CSS and Styling
- State Management
- Database and API
- Testing
- Build Tools and Development
- Language-Specific
- Other
7. How to Use section
8. Contributing section
9. License section
// Organization of rules
Organize .cursorrules files into the following main categories within the 'rules' directory:
- Frontend Frameworks and Libraries
- Backend and Full-Stack
- Mobile Development
- CSS and Styling
- State Management
- Database and API
- Testing
- Build Tools and Development
- Language-Specific
- Other
Place each .cursorrules file directly in the 'rules' folder
The folder name for each .cursorrules file should describe the category and content of the file
Refer to the README in each folder for guidance on naming conventions and descriptions
// Naming and formatting
Use descriptive names for .cursorrules files and their folders, following the pattern: 'technology-focus-cursorrules-prompt-file'
Maintain alphabetical order within each category in the README.md file
Use consistent formatting for list items in the README.md file
// Content guidelines
When creating or editing .cursorrules files, focus on project-specific instructions and best practices
Include comments in .cursorrules files to explain complex rules or provide context
Use clear and concise language in all documentation and .cursorrules files
Provide context on what you're building, style guidelines, or info on commonly-used methods
// Optional README for credit and description
Each .cursorrules file may have an accompanying README.md file in its folder
Use this README to provide credit to the original author and a brief description of the .cursorrules file's purpose
// Maintenance and updates
Update the README.md file when adding new .cursorrules files, placing them in the correct category
Ensure all links in the README.md file are relative and correct
When updating the README.md, ensure the table of contents remains accurate
When adding new categories, update both the 'Contents' and 'Rules' sections of the README.md
Regularly review and update categorization as the repository grows
// Best practices
Maintain consistency in capitalization and punctuation throughout the repository
When referencing Cursor AI, always use the correct capitalization and spacing
When adding examples or explanations, focus on practical use cases for Cursor AI users
If a .cursorrules file fits multiple categories, place it in the most relevant one and cross-reference in others if necessary
Keep the 'Other' category for .cursorrules files that don't fit neatly into the main categories
// Additional insights
.cursorrules files are repo-specific "Rules for AI"
.cursorrules files should be placed in the root of the repository
The content of .cursorrules files will be appended to the global "Rules for AI" settings in Cursor
Focus on providing repo-level context and guidelines, not just general coding practices
.cursorrules can include information about project structure, architectural decisions, and commonly used libraries or methods
Consider including rules for handling specific file types or coding patterns unique to your project
Rules can cover both code generation and code understanding aspects for Cursor AI