A carefully crafted collection of rules that optimize your Cursor AI experience. These rules enforce consistent practices, improve AI assistance quality, and streamline common development workflows.
Note: This is an opinionated preset designed to enhance productivity. Feel free to adapt these rules to your personal preferences! ✨
The apply-rules.sh
script allows you to download rules directly to your project without cloning the entire repository:
# Download the script
curl -o apply-rules.sh https://raw.githubusercontent.com/ver0-project/cursor-rules/master/apply-rules.sh && chmod +x apply-rules.sh
# Basic usage - download rules to target directory
./apply-rules.sh /path/to/your/project
# Overwrite existing rules
./apply-rules.sh --ow /path/to/your/project
Parameters:
--ow
: Optional flag to overwrite existing rules<target_directory>
: Required path where rules will be downloaded
After running the script:
- Reindex the project, so new rules are applied.
- Enjoy enhanced AI interactions!
- Structured Organization - Logically organized rules by domain and purpose
- Improved AI Responses - Guidelines for more helpful and consistent AI assistance
- Development Workflows - Optimized patterns for git, directory management, and more
- Language-Specific Rules - Specialized rules for Markdown and other languages
- Customizable Framework - Easily extend with your own rules
Rules are organized in specific directories:
Directory | Purpose |
---|---|
core/ |
Core rules for Cursor behavior and rules system |
local/ |
Personal rules (gitignored) |
global/ |
Rules applied to every context |
overview/ |
Project overviews and descriptions |
testing/ |
Testing approach guidelines |
tools/ |
OS-specific utilities and common tools |
lng/ |
Language-specific rules in subdirectories |
coding-principles.mdc
- Guidelines for writing high-quality, maintainable codecursor-rules.mdc
- Guidelines for creating and updating Cursor rulesemoji-usage.mdc
- Best practices for using emojis in AI responses
commit-message.mdc
- Guidelines for semantic git commit messagesgit.mdc
- Settings for proper git output display without pagerunix-directory-listing.mdc
- Standards for directory listings on Unix/Linux/macOSwindows-directory-listing.mdc
- Standards for directory listings on Windows
lng/markdown/formatting.mdc
- Guidelines for consistent Markdown formattinglng/markdown/readme-formatting.mdc
- Best practices for README.md files
For optimal experience with .mdc
files and to avoid flaky behavior of Cursor's MDC editor:
{
"files.associations": {
"*.mdc": "markdown"
},
"workbench.editorAssociations": {
"*.mdc": "default"
}
}
This configuration sets the default text editor for .mdc
files and enables markdown syntax highlighting.
During active development of your rules:
# Add to .cursorindexignore
.cursor/rules/*
This prevents rules from being embedded in the index while they're changing rapidly. After finalizing your rules, remove this entry and manually rebuild the index for better rule accessibility.
- Just ask agent to create new rule, outlining desired properties and application plain.
- Review and work on the rule with agent.
- Save and commit.
When creating or deleting rules (excluding rules in the overview/
directory):
- Update the
RULES
array in theapply-rules.sh
script to keep it synchronized - Follow the existing categorization structure and alphabetical order
- Commit both the rule changes and script updates together
See the rules-synchronization.mdc file for more details.
For Cursor to apply updated or newly created rules:
- Restart the context so rules can be re-indexed, or
- Explicitly specify the updated rule files for Cursor to reindex them
The .ai/meta-prompt-example.md
file provides a sample "User rule" that implements a self-questioning reasoning framework. This approach enhances the AI's problem-solving capabilities through structured internal dialogue.
Important: This approach is optimized for Cursor and not recommended for other AI platforms that may bill differently based on output token usage. The self-questioning framework generates substantial output tokens which could result in higher costs on platforms with different billing models.
Contributions are welcome! If you have ideas for new rules or improvements to existing ones, please:
- Fork the repository
- Create your feature branch
- Submit a pull request