A collection of standardized rules and guidelines for maintaining high-quality code using Cursor IDE.
This repository contains a set of rules that help maintain consistency and quality in codebases using Cursor IDE. These rules cover various aspects of development including:
- Code organization and file structure
- Naming conventions
- Git commit standards
- SOLID principles implementation
- Conversation style guidelines
- And more...
- Conventional Commits - Standards for commit message formatting
- Community Projects - Standards for initializing and maintaining community-focused open source projects
- Conversation Style - Guidelines for AI-human interaction in Cursor
- Cursor Rules Location - Standards for rule file placement
- File Organization - Guidelines for code organization
- Git Commit Workflow - Process for validating and committing changes
- Naming Conventions - Standards for naming files and code elements
- SOLID Principles - Implementation of SOLID design principles
-
Create a
.cursor/rules
directory in your project root:mkdir -p .cursor/rules
-
Copy the desired rule files into the
.cursor/rules
directory:cp path/to/rules/*.mdc .cursor/rules/
In the event that the rules do not load automatically, I have found that the best way to load them is to open the agent composer and say:
For the remainder of this session, remember the following @rules
It will then respond with:
🦄 Let me fetch the rules
🦄 I understand and will follow all the provided rules for our session. Here's a summary of how I'll incorporate them:
1. Conversation Style: I'll start each message with 🦄 and maintain a structured response format.
2. Naming Conventions: I'll ensure all files, types, and functions follow the specified patterns:
- Files in kebab-case
- Types in PascalCase
- Functions in camelCase
3. SOLID Principles: Follow:
- Single Responsibility: One reason to change
- Open/Closed: Open for extension, closed for modification
- Liskov Substitution: Derived classes must be substitutable
- Interface Segregation: Keep interfaces focused
- Dependency Inversion: Depend on abstractions
4. Conventional Commits: Format commits as `type(scope): description` with proper body and footer. Types include feat, fix, docs, style, refactor, perf, test, build, ci, chore.
5. Cursor Rules Location: Place all `.mdc` rule files in `.cursor/rules/` directory using kebab-case naming.
6. File Organization: One definition per file, use kebab-case filenames with appropriate suffixes (`.interface.ts`, `.service.ts`), group related files in feature-based directories, organize imports (external/internal/relative).
7. Git Commit Workflow: Run tests, type checks, and build before committing. Follow sequence: validate → test → type-check → build → check changes → stage → commit.
8. Community Projects: I'll ensure any project work follows the community standards with proper README.md, CONTRIBUTING.md, LICENSE, and CODE_OF_CONDUCT.md files.
Once installed, these rules will be automatically applied when using Cursor IDE. The rules provide guidance for:
- File naming and organization
- Code structure and design
- Git commit messages
- Development workflows
- And more...
We welcome contributions! Please see our Contributing Guidelines for details.
This project follows a Code of Conduct. By participating, you are expected to uphold this code.
This project is licensed under the MIT License - see the LICENSE file for details.