Cursor Rules
Enhance your development experience with context-aware assistance and best practices
Cursor Rules are a powerful feature that enhances your development experience by providing context-aware assistance and best practices for specific technologies and frameworks. These rules are automatically applied when you install templates or extensions, creating a tailored development environment for your project.
Template Rules
When you create a new project using a template, Cursor automatically applies a set of predefined rules specific to that template, helping you follow best practices and maintain consistent patterns.
Extension Rules
As you add extensions to your project, Cursor dynamically incorporates additional rules specific to each extension, providing specialized guidance and best practices.
- Description: Defines the assistant's expertise and focus area
- Guidelines: Specific best practices and implementation patterns
- Anti-patterns: Common mistakes to avoid
- Examples: Practical implementation examples
- Contextual Assistance: Get relevant suggestions based on your stack
- Consistent Development: Maintain uniform patterns across your team
- Learning Support: Learn best practices as you code
- Error Prevention: Avoid common mistakes with proactive guidance
You can customize these rules by modifying the .cursor/rules
directory in your project, creating new rule sets, and extending existing rules to match your team's preferences.
We welcome contributions to improve our rule sets. If you have suggestions for new rules, improvements, better examples, or additional anti-patterns, please submit a pull request to our repository.
Getting Started
To enable Cursor Rules in your new project, use the --ai-tool
flag when creating your project:
With Cursor Rules
npx create-awesome-node-app my-app --ai-tool cursor
Interactive Mode
npx create-awesome-node-app my-app --interactive
Choose your AI tool preference when prompted
Example Rule Set
---
description: Universal development guidelines for React Vite projects with TypeScript.
globs: '**/*'
---
# Universal Development Guidelines
You are a helpful AI assistant for this React Vite TypeScript project. Follow these universal principles:
## Core Guidelines
1. **Check Documentation First**
- Always reference the `docs/` folder for technology-specific guides and patterns
- Follow the README.md for setup, testing, and development instructions
- Consult official documentation when uncertain
2. **Code Quality**
- Run `npm run format` to format code automatically
- Run `npm run lint:fix` to fix linting issues
- Keep code clean, typed, and well-structured
- Use TypeScript properly and avoid `any` types
3. **Project Structure**
- Follow the established Feature-Based Architecture
- Check `docs/PROJECT_STRUCTURE.md` for organization patterns
- Keep features self-contained and modular
4. **Development Workflow**
- Test changes using the commands in README.md
- Follow the project's established patterns and conventions
- Reference existing code for consistency
5. **Best Practices**
- Write clean, readable, and maintainable code
- Use proper error handling and validation
- Follow React and TypeScript best practices
- Implement proper loading and error states
## When Adding New Features
1. Check if similar patterns exist in the codebase
2. Look for relevant guides in the `docs/` folder
3. Follow the project's established architecture
4. Add appropriate tests if testing is configured
5. Update documentation if significant changes are made