Skip to content
Open
154 changes: 97 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,46 @@

<p align="center">
<a href="https://patrickjs.com" target="_blank">
<img src="/cursor-ai-logo.png" alt="Awesome CursorRules" />
<img src="/cursor-ai-logo.png" alt="Awesome CursorRules"/>
</a>
</p>

A curated list of awesome .cursorrules files for enhancing your Cursor AI experience.

[Cursor AI](https://cursor.sh/) is an AI-powered code editor. `.cursorrules` files define custom rules for Cursor AI to follow when generating code, allowing you to tailor its behavior to your specific needs and preferences.

## Why .cursorrules?

`.cursorrules` is a powerful feature in Cursor AI that allows developers to define project-specific instructions for the AI. Here's why you might want to use it:

1. **Customized AI Behavior**: `.cursorrules` files help tailor the AI's responses to your project's specific needs, ensuring more relevant and accurate code suggestions.

2. **Consistency**: By defining coding standards and best practices in your `.cursorrules` file, you can ensure that the AI generates code that aligns with your project's style guidelines.
<p align="center">
<b>Supercharge Your Cursor AI Experience with Custom Rules</b>
</p>

3. **Context Awareness**: You can provide the AI with important context about your project, such as commonly used methods, architectural decisions, or specific libraries, leading to more informed code generation.
<p align="center">
<a href="#contents">Contents</a> •
<a href="#rules">Rules</a> •
<a href="#how-to-use">How to Use</a> •
<a href="#contributing">Contributing</a> •
<a href="#license">License</a>
</p>

4. **Improved Productivity**: With well-defined rules, the AI can generate code that requires less manual editing, speeding up your development process.
<p align="center">
<img src="https://img.shields.io/github/stars/sk3pp3r/awesome-cursorrules?style=social" alt="Stars" />
<img src="https://img.shields.io/github/forks/sk3pp3r/awesome-cursorrules?style=social" alt="Forks" />
<img src="https://img.shields.io/github/issues/sk3pp3r/awesome-cursorrules" alt="Issues" />
<img src="https://img.shields.io/github/license/sk3pp3r/awesome-cursorrules" alt="License" />
</p>

5. **Team Alignment**: For team projects, a shared `.cursorrules` file ensures that all team members receive consistent AI assistance, promoting cohesion in coding practices.
## 🚀 Why .cursorrules?

6. **Project-Specific Knowledge**: You can include information about your project's structure, dependencies, or unique requirements, helping the AI to provide more accurate and relevant suggestions.
.cursorrules files are your secret weapon for supercharging Cursor AI's capabilities. They act as repository-specific "Rules for AI" that help Cursor AI understand your project's context, coding standards, and best practices. These rules are automatically appended to your global "Rules for AI" settings when working in a repository.

By creating a `.cursorrules` file in your project's root directory, you can leverage these benefits and enhance your coding experience with Cursor AI.
### Key Benefits:
- 🎯 **Project-Specific Context**: Tailor AI behavior to your project's needs
- 📚 **Best Practices**: Enforce coding standards and patterns
- 🔄 **Consistency**: Maintain uniform code style across your team
- 🚀 **Productivity**: Speed up development with AI-powered assistance
- 🛠️ **Customization**: Fine-tune AI responses to match your workflow

## Contents
## 📋 Contents

- [Awesome CursorRules ](#awesome-cursorrules-)
- [Why .cursorrules?](#why-cursorrules)
- [Contents](#contents)
- [Rules](#rules)
- [Awesome CursorRules](#awesome-cursorrules-)
- [Why .cursorrules?](#-why-cursorrules)
- [Contents](#-contents)
- [Rules](#-rules)
- [Frontend Frameworks and Libraries](#frontend-frameworks-and-libraries)
- [Backend and Full-Stack](#backend-and-full-stack)
- [Mobile Development](#mobile-development)
Expand All @@ -44,16 +52,15 @@ By creating a `.cursorrules` file in your project's root directory, you can leve
- [Hosting and Deployments](#hosting-and-deployments)
- [Build Tools and Development](#build-tools-and-development)
- [Language-Specific](#language-specific)
- [DevOps and Administration](#devops-and-administration)
- [Other](#other)
- [Utilities](#utilities)
- [Directories](#directories)
- [How to Use](#how-to-use)
- [Method One](#method-one)
- [Method Two](#method-two)
- [Contributing](#contributing)
- [License](#license)
- [How to Use](#-how-to-use)
- [Contributing](#-contributing)
- [License](#-license)

## Rules
## 🎯 Rules

### Frontend Frameworks and Libraries

Expand Down Expand Up @@ -211,6 +218,30 @@ By creating a `.cursorrules` file in your project's root directory, you can leve
- [TypeScript (Clasp App Script)](./rules/typescript-clasp-cursorrules-prompt-file/.cursorrules)
- [C++ Programming Guidelines](./rules/cpp-programming-guidelines-cursorrules-prompt-file/.cursorrules)

### DevOps and Administration

#### DevOps
- [DevOps Engineer](./rules/devops/devops-engineer.cursorrules) - Best practices for DevOps engineering tasks
- [DevOps Engineer - Enhanced](./rules/devops/devops-engineer-enhanced.cursorrules) - Best practices for DevOps engineering tasks - Enhanced
- [SRE Engineer](./rules/devops/sre-engineer.cursorrules) - Best practices for Site Reliability Engineering

#### Database Administration
- [PostgreSQL DBA](./rules/admin/database/postgresql-dba.cursorrules) - Best practices for PostgreSQL database administration
- [MySQL DBA](./rules/admin/database/mysql-dba.cursorrules) - Best practices for MySQL database administration
- [MongoDB DBA](./rules/admin/database/mongodb-dba.cursorrules) - Best practices for MongoDB database administration
- [Redis DBA](./rules/admin/database/redis-dba.cursorrules) - Best practices for Redis database administration

Comment on lines +228 to +233
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Alphabetize the Database Administration list

The current order is not alphabetical (PostgreSQL, MySQL, MongoDB, Redis).
Re-ordering improves scan-ability and keeps the file consistent with the project’s alphabetical-ordering guideline.

-#### Database Administration
-- [PostgreSQL DBA](./rules/admin/database/postgresql-dba.cursorrules) - Best practices for PostgreSQL database administration
-- [MySQL DBA](./rules/admin/database/mysql-dba.cursorrules) - Best practices for MySQL database administration
-- [MongoDB DBA](./rules/admin/database/mongodb-dba.cursorrules) - Best practices for MongoDB database administration
-- [Redis DBA](./rules/admin/database/redis-dba.cursorrules) - Best practices for Redis database administration
+#### Database Administration
+- [MongoDB DBA](./rules/admin/database/mongodb-dba.cursorrules) - Best practices for MongoDB database administration
+- [MySQL DBA](./rules/admin/database/mysql-dba.cursorrules) - Best practices for MySQL database administration
+- [PostgreSQL DBA](./rules/admin/database/postgresql-dba.cursorrules) - Best practices for PostgreSQL database administration
+- [Redis DBA](./rules/admin/database/redis-dba.cursorrules) - Best practices for Redis database administration
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### Database Administration
- [PostgreSQL DBA](./rules/admin/database/postgresql-dba.cursorrules) - Best practices for PostgreSQL database administration
- [MySQL DBA](./rules/admin/database/mysql-dba.cursorrules) - Best practices for MySQL database administration
- [MongoDB DBA](./rules/admin/database/mongodb-dba.cursorrules) - Best practices for MongoDB database administration
- [Redis DBA](./rules/admin/database/redis-dba.cursorrules) - Best practices for Redis database administration
#### Database Administration
- [MongoDB DBA](./rules/admin/database/mongodb-dba.cursorrules) - Best practices for MongoDB database administration
- [MySQL DBA](./rules/admin/database/mysql-dba.cursorrules) - Best practices for MySQL database administration
- [PostgreSQL DBA](./rules/admin/database/postgresql-dba.cursorrules) - Best practices for PostgreSQL database administration
- [Redis DBA](./rules/admin/database/redis-dba.cursorrules) - Best practices for Redis database administration
🤖 Prompt for AI Agents
In README.md around lines 228 to 233, the list under "Database Administration"
is not in alphabetical order. Reorder the entries so that they appear
alphabetically by database name: MySQL, MongoDB, PostgreSQL, Redis. This will
improve readability and maintain consistency with the project's alphabetical
ordering guideline.

#### Scripts
- [PowerShell](./rules/scripts/powershell/powershell-script.cursorrules) - Best practices for PowerShell scripting
- [PowerCLI](./rules/scripts/powercli/powercli-script.cursorrules) - Best practices for PowerCLI scripting
- [POSIX (Bash)](./rules/scripts/posix/bash-script.cursorrules) - Best practices for POSIX bash scripting
- [POSIX (Zsh)](./rules/scripts/posix/zsh-script.cursorrules) - Best practices for POSIX zsh scripting

#### Administration
- [VMware Admin](./rules/admin/vmware/vmware-admin.cursorrules) - Best practices for VMware administration
- [Network Engineer](./rules/admin/network/network-engineer.cursorrules) - Best practices for Network Engineering
- [System Engineer](./rules/admin/system/system-engineer.cursorrules) - Best practices for System Engineering

### Other

- [ASCII Simulation Game](./rules/ascii-simulation-game-cursorrules-prompt-file/.cursorrules)
Expand All @@ -226,46 +257,55 @@ By creating a `.cursorrules` file in your project's root directory, you can leve

- [Cursor Watchful Headers](https://github.com/johnbenac/cursor-watchful-headers) - A Python-based file watching system that automatically manages headers in text files and maintains a clean, focused project tree structure. Perfect for maintaining consistent file headers and documentation across your project, with special features to help LLMs maintain better project awareness.

## Directories
## 📚 Directories

- [CursorList](https://cursorlist.com)
- [CursorDirectory](https://cursor.directory/)
- [CursorList](https://cursorlist.com) - A curated list of Cursor AI resources
- [CursorDirectory](https://cursor.directory/) - Directory of Cursor AI tools and plugins

## How to Use
## 🚀 How to Use

### Method One
### Method One: Manual Installation

1. Install [Cursor AI](https://cursor.sh/) if you haven't already.
2. Browse the rules above to find a `.cursorrules` file that suits your needs.
3. Copy the chosen `.cursorrules` file to your project's root directory.
4. Customize the rules as needed for your specific project requirements.
1. Install [Cursor AI](https://cursor.sh/) if you haven't already
2. Browse the rules above to find a `.cursorrules` file that suits your needs
3. Copy the chosen `.cursorrules` file to your project's root directory
4. Customize the rules as needed for your specific project requirements

### Method Two
### Method Two: VS Code Extension

1. Install [Cursor AI](https://cursor.sh/) if you haven't already.
2. Install [vscode-cursor-rules](https://marketplace.visualstudio.com/items?itemName=BeilunYang.cursor-rules) extension.
3. Open the command palette (Cmd+Shift+P or Ctrl+Shift+P) and type `Cursor Rules: Add .cursorrules`.
4. Select and download the `.cursorrules` file that suits your needs.
5. Customize the rules as needed for your specific project requirements.
1. Install [Cursor AI](https://cursor.sh/) if you haven't already
2. Install [vscode-cursor-rules](https://marketplace.visualstudio.com/items?itemName=BeilunYang.cursor-rules) extension
3. Open the command palette (Cmd+Shift+P or Ctrl+Shift+P) and type `Cursor Rules: Add .cursorrules`
4. Select and download the `.cursorrules` file that suits your needs
5. Customize the rules as needed for your specific project requirements

## Contributing
## 🤝 Contributing

Contributions are welcome! If you have a great `.cursorrules` file to share:
We welcome contributions! If you have a great `.cursorrules` file to share:

1. Fork this repository.
2. Create a new folder in the `rules` directory. The folder name should follow this pattern:
1. Fork this repository
2. Create a new folder in the `rules` directory following this pattern:
`technology-focus-cursorrules-prompt-file`
For example: `react-typescript-cursorrules-prompt-file`
3. Add your `.cursorrules` file to the new folder.
4. Optionally, include a README.md in the folder to provide credit and a brief description.
5. Update the main README.md file, adding your contribution to the appropriate category.
6. Ensure your contribution follows the guidelines in the [`.cursorrules`](./.cursorrules) file at the root of this repository.
7. Submit a pull request.
Example: `react-typescript-cursorrules-prompt-file`
3. Add your `.cursorrules` file to the new folder
4. Optionally, include a README.md in the folder to provide credit and a brief description
5. Update the main README.md file, adding your contribution to the appropriate category
6. Ensure your contribution follows the guidelines in the [`.cursorrules`](./.cursorrules) file
7. Submit a pull request

### Contribution Guidelines:
- 🎯 Keep rules focused and specific
- 📝 Include clear documentation
- 🔄 Follow existing naming conventions
- ✅ Test your rules thoroughly
- 📚 Update the main README.md appropriately

## 📄 License

Please ensure your contribution is original or properly credited if based on existing work. Refer to the `.cursorrules` file in the root of this repository for detailed guidelines on formatting, naming conventions, and best practices for contributions.
[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)

---

## License

[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)
<p align="center">
Made with ❤️ by the Cursor AI Community
</p>
42 changes: 42 additions & 0 deletions rules/admin/database/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Database Administration Rules

This directory contains Cursor AI rules for database administration (DBA) tasks across different database management systems. These rules are designed to help Cursor AI provide better assistance when working with various database technologies.

## Contents

- `mysql-dba.cursorrules` - Rules for MySQL database administration
- `postgresql-dba.cursorrules` - Rules for PostgreSQL database administration
- `mongodb-dba.cursorrules` - Rules for MongoDB database administration
- `redis-dba.cursorrules` - Rules for Redis database administration

## Purpose

These rules help Cursor AI understand:
- Database administration best practices
- Database security and access control
- Performance optimization and tuning
- Backup and recovery procedures
- Database monitoring and maintenance
- Query optimization
- Database design principles
- Database automation and scripting

## Usage

These rules are automatically loaded by Cursor AI when working in a database administration context. They provide guidance and best practices for:
- Managing database configurations
- Implementing security measures
- Optimizing database performance
- Handling backup and recovery
- Monitoring database health
- Writing efficient queries
- Automating database tasks
- Following database standards

## Contributing

Feel free to contribute to these rules by:
1. Adding new database administration related rules
2. Improving existing rules
3. Adding more specific use cases
4. Updating best practices
72 changes: 72 additions & 0 deletions rules/admin/database/mongodb-dba.cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// MongoDB Database Administration Best Practices
// This file contains rules and guidelines for MongoDB DBA tasks

Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Move file to conform with repository layout rules.

Per coding_guidelines: “Place each .cursorrules file directly in the ‘rules’ folder.”
rules/admin/database/mongodb-dba.cursorrules violates that contract and will not be auto-discovered by Cursor AI.

Suggested action:

rules/mongodb-dba-cursorrules-prompt-file.cursorrules   # or similar descriptive name
🤖 Prompt for AI Agents
In rules/admin/database/mongodb-dba.cursorrules at lines 1 to 3, the file is
incorrectly placed in a nested folder and will not be auto-discovered. Move this
file directly into the top-level rules folder and rename it to a descriptive
name like mongodb-dba-cursorrules-prompt-file.cursorrules to comply with
repository layout rules.

// Database Design
- Use proper document structure
- Implement proper indexing strategies
- Use proper sharding
- Implement proper validation
- Use proper data types

// Performance Tuning
- Implement proper query optimization
- Use proper index maintenance
- Set up proper connection pooling
- Implement proper caching
- Use proper performance monitoring

// Backup and Recovery
- Implement proper backup strategies
- Use proper point-in-time recovery
- Set up proper replication
- Implement proper failover
- Use proper backup verification

// Security
- Implement proper access control
- Use proper encryption
- Set up proper SSL/TLS
- Implement proper audit logging
- Use proper security policies

// Monitoring
- Implement proper performance monitoring
- Use proper resource monitoring
- Set up proper alerting
- Implement proper logging
- Use proper monitoring tools

// Maintenance
- Implement proper index maintenance
- Use proper compaction
- Set up proper statistics updates
- Implement proper optimization
- Use proper maintenance scheduling

// High Availability
- Implement proper replication
- Use proper failover
- Set up proper load balancing
- Implement proper sharding
- Use proper HA documentation

// Disaster Recovery
- Implement proper backup procedures
- Use proper recovery procedures
- Set up proper failover procedures
- Implement proper disaster recovery testing
- Use proper recovery documentation

// Documentation
- Document all configurations
- Document all procedures
- Document all policies
- Document all changes
- Document all incidents

// Best Practices
- Use proper naming conventions
- Implement proper procedures
- Use proper documentation
- Implement proper training
- Use proper communication
Comment on lines +4 to +72
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Bullets are too generic; remove “proper”, add actionable specifics.

Every line starts with “Use/Implement proper …”, which is vague and repetitive. Replace with concise, imperative advice and, where possible, concrete examples (e.g., “Create compound indexes on fields frequently used together”, “Enable WiredTiger compression for cold data”, “Schedule mongodump with --oplog for PITR”). This yields clearer guidance and complies with “Use clear and concise language” from coding_guidelines.

- Use proper document structure
+ Model documents around access patterns; keep closely-related data in the same document

Apply the same rewrite pattern throughout the file.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Database Design
- Use proper document structure
- Implement proper indexing strategies
- Use proper sharding
- Implement proper validation
- Use proper data types
// Performance Tuning
- Implement proper query optimization
- Use proper index maintenance
- Set up proper connection pooling
- Implement proper caching
- Use proper performance monitoring
// Backup and Recovery
- Implement proper backup strategies
- Use proper point-in-time recovery
- Set up proper replication
- Implement proper failover
- Use proper backup verification
// Security
- Implement proper access control
- Use proper encryption
- Set up proper SSL/TLS
- Implement proper audit logging
- Use proper security policies
// Monitoring
- Implement proper performance monitoring
- Use proper resource monitoring
- Set up proper alerting
- Implement proper logging
- Use proper monitoring tools
// Maintenance
- Implement proper index maintenance
- Use proper compaction
- Set up proper statistics updates
- Implement proper optimization
- Use proper maintenance scheduling
// High Availability
- Implement proper replication
- Use proper failover
- Set up proper load balancing
- Implement proper sharding
- Use proper HA documentation
// Disaster Recovery
- Implement proper backup procedures
- Use proper recovery procedures
- Set up proper failover procedures
- Implement proper disaster recovery testing
- Use proper recovery documentation
// Documentation
- Document all configurations
- Document all procedures
- Document all policies
- Document all changes
- Document all incidents
// Best Practices
- Use proper naming conventions
- Implement proper procedures
- Use proper documentation
- Implement proper training
- Use proper communication
// Database Design
- Model documents around access patterns; keep closely-related data in the same document
- Implement proper indexing strategies
- Use proper sharding
- Implement proper validation
- Use proper data types
🤖 Prompt for AI Agents
In rules/admin/database/mongodb-dba.cursorrules from lines 4 to 72, the bullet
points are overly generic and repetitive, all starting with "Use/Implement
proper ...". Replace these phrases with clear, concise, and actionable
instructions that specify exact steps or examples, such as "Create compound
indexes on fields frequently queried together" or "Schedule mongodump with
--oplog for point-in-time recovery". Revise every bullet to remove vague terms
and provide concrete, imperative guidance throughout the entire file.

72 changes: 72 additions & 0 deletions rules/admin/database/mysql-dba.cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// MySQL Database Administration Best Practices
// This file contains rules and guidelines for MySQL DBA tasks

Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

File location violates directory convention.

Move to rules/mysql-dba-cursorrules-prompt-file.cursorrules (or similar) to ensure automatic loading.

🤖 Prompt for AI Agents
In rules/admin/database/mysql-dba.cursorrules at lines 1 to 3, the file location
does not follow the required directory convention for automatic loading. Move
this file to the root rules directory and rename it to something like
mysql-dba-cursorrules-prompt-file.cursorrules to comply with the naming and
placement conventions for prompt files.

// Database Design
- Use proper table normalization
- Implement proper indexing strategies
- Use proper partitioning
- Implement proper constraints
- Use proper data types

// Performance Tuning
- Implement proper query optimization
- Use proper index maintenance
- Set up proper buffer pool tuning
- Implement proper query cache
- Use proper performance monitoring

// Backup and Recovery
- Implement proper backup strategies
- Use proper point-in-time recovery
- Set up proper replication
- Implement proper failover
- Use proper backup verification

// Security
- Implement proper access control
- Use proper encryption
- Set up proper SSL/TLS
- Implement proper audit logging
- Use proper security policies

// Monitoring
- Implement proper performance monitoring
- Use proper resource monitoring
- Set up proper alerting
- Implement proper logging
- Use proper monitoring tools

// Maintenance
- Implement proper table maintenance
- Use proper index maintenance
- Set up proper statistics updates
- Implement proper optimization
- Use proper maintenance scheduling

// High Availability
- Implement proper replication
- Use proper failover
- Set up proper load balancing
- Implement proper clustering
- Use proper HA documentation

// Disaster Recovery
- Implement proper backup procedures
- Use proper recovery procedures
- Set up proper failover procedures
- Implement proper disaster recovery testing
- Use proper recovery documentation

// Documentation
- Document all configurations
- Document all procedures
- Document all policies
- Document all changes
- Document all incidents

// Best Practices
- Use proper naming conventions
- Implement proper procedures
- Use proper documentation
- Implement proper training
- Use proper communication
Loading