A curated showcase of modern Cursor Rules configurations for development teams
π― Evolution Notice: This repository demonstrates the transition from legacy
.cursorrulesfiles to the powerful new Cursor Rules system with MDC format, rule types, and advanced organizational features.
Cursor has revolutionized AI-assisted development by moving beyond the limitations of single-file .cursorrules:
Legacy .cursorrules |
New Cursor Rules |
|---|---|
| β Single file approach | β Organized rule directories |
| β Plain text only | β MDC format with metadata |
| β Always active | β Smart rule types (Always, Auto, Manual, Agent) |
| β No file organization | β Nested rules for complex projects |
| β Limited context | β File references and templates |
| β Hard to maintain | β Modular and scalable |
This repository serves as a living showcase of modern Cursor Rules implementations across various development scenarios:
awesome-cursorrules/
βββ π rules/ # Legacy .cursorrules files (migration source)
β βββ appium-mobile-test-automation-framework/
β βββ cypress-javascript-test-automation-framework/
β βββ k6-performance-test-framework/
β βββ playwright-javascript-test-automation-framework/
β βββ restassured-java-framework/
β βββ selenium-net-test-automation-framework/
β βββ selenium-python-test-automation-framework/
β βββ vitest-javascript-unit-test-framework/
βββ ποΈ frameworks/ # Framework .cursor/rules examples (with nested rules)
β βββ cypress/ # .cursor/rules/{core,patterns}/*.mdc
β βββ selenium-python/ # .cursor/rules/patterns/*.mdc
βββ π― example-structures/ # Flat, focused .mdc structure examples
β βββ cypress/ # testing-fundamentals, api-testing
β βββ next-js/ # app-router-patterns
β βββ react-typescript/ # component-development
β βββ selenium-python/ # architecture, page-objects, test-patterns
βββ π legacy-migration/ # Before/after migration guides
# Old way - Everything in one file
project/
βββ .cursorrules # 200+ lines of mixed rules
βββ src/
βββ tests/Problems with legacy approach:
- β Difficult to maintain as projects grow
- β No context awareness for different file types
- β All rules active all the time
- β Hard to share and collaborate on rules
- β No template or example integration
# New way - Organized, contextual, powerful
project/
βββ .cursor/rules/
β βββ core-standards.mdc # Always applied
β βββ testing-patterns.mdc # Auto-attached to test files
β βββ framework-specific.mdc # Context-aware activation
β βββ advanced-optimizations.mdc # Agent-requested when relevant
β βββ templates/
β βββ component-template.tsx
β βββ test-template.spec.js
β βββ api-endpoint.js
βββ src/
βββ tests/Benefits of modern approach:
- β Context-aware rule activation
- β Organized and maintainable structure
- β Template integration and file references
- β Team collaboration and version control friendly
- β Scalable for enterprise projects
Core standards that apply to every AI interaction:
---
description: Universal coding standards for all projects
alwaysApply: true
---
# Core Development Standards
- Use TypeScript for type safety across all projects
- Implement comprehensive error handling and logging
- Write self-documenting code with clear naming
- Follow established architectural patternsAutomatically activated based on file patterns:
---
description: React component development patterns
globs: **/*.tsx,**/components/**/*.js,**/hooks/**/*.ts
alwaysApply: false
---
# React Development Excellence
- Use functional components with React hooks
- Implement proper prop validation with TypeScript
- Follow component composition patterns
- Optimize performance with useMemo and useCallback
@react-component-template.tsx
@custom-hook-template.tsAI intelligently applies based on context:
---
description: Advanced performance optimization techniques
globs: **/*.js,**/*.ts,**/*.tsx
alwaysApply: false
---
# Performance Optimization Strategies
- Implement code splitting and lazy loading
- Use efficient algorithms and data structures
- Optimize bundle size and loading times
- Monitor and profile application performanceExplicitly invoked with @ruleName:
---
description: Complete test automation setup generator
alwaysApply: false
---
# Test Automation Project Generator
Creates a complete test automation project structure:
@selenium-project-structure
@cypress-configuration
@playwright-setup
@github-actions-ciAlongside .mdc rules, Cursor now supports AGENTS.md β a plain Markdown file (no frontmatter, no metadata) that Cursor reads as project guidance. It's the lowest-friction way to give the agent context, and it's portable across other AI coding tools that adopt the same convention.
project/
βββ AGENTS.md # Project-wide guidance (always read)
βββ frontend/
β βββ AGENTS.md # Frontend-specific guidance
βββ backend/
βββ AGENTS.md # Backend-specific guidanceHow it works:
- β Plain Markdown β just write instructions, no YAML frontmatter
- β
Nested directories: an
AGENTS.mddeeper in the tree takes precedence over a parent one for files in that subtree - β Great for tech-stack notes, conventions, and "how to run things" that should always be in context
AGENTS.md vs .mdc rules β when to use which:
Use AGENTS.md |
Use .cursor/rules/*.mdc |
|---|---|
| Always-on project context | Context-aware, file-scoped activation |
| Simple, portable, no metadata | globs, description, alwaysApply control |
| One file per directory | Multiple focused rules per project |
π‘ Note:
.cursor/rules/only loads files with the.mdcextension β a plain.mdplaced there is ignored, except when it's namedAGENTS.md.
# Selenium Python Test Automation Framework
- Use pytest as testing framework
- Implement Page Object Model pattern
- Follow PEP 8 style guide
- Use webdriver_manager for browser setup
- Implement proper logging
---
description: Advanced Selenium Python automation patterns
globs: **/*.py,**/test_*.py,**/pages/**/*.py,**/conftest.py
alwaysApply: false
---
# Selenium Python Excellence
## Architecture Patterns
- Implement advanced Page Object Model with base classes
- Use pytest fixtures for robust test data management
- Create reusable utility functions and custom assertions
- Implement proper WebDriver lifecycle management
## Code Quality Standards
- Follow PEP 8 with Black formatter integration
- Use type hints for better code maintainability
- Implement comprehensive error handling and logging
- Create detailed docstrings for all classes and methods
## Example Implementations:
@advanced-page-object.py
@pytest-configuration.py
@custom-assertions.py
@webdriver-factory.py---
description: Advanced Cypress testing patterns and best practices
globs: **/*.cy.js,**/*.cy.ts,**/cypress/**/*.js
alwaysApply: false
---
# Cypress Testing Excellence
## Smart Element Selection
- Use `data-cy` attributes for reliable, maintainable selectors
- Implement custom commands for complex user interactions
- Create reusable page object patterns for large applications
- Handle dynamic content with proper wait strategies
## API Testing Integration
- Use `cy.intercept()` for comprehensive network testing
- Mock external services for reliable test execution
- Implement request/response validation patterns
- Create data-driven test scenarios
@cypress-page-object.js
@custom-commands.js
@api-testing-helpers.jsenterprise-monorepo/
βββ .cursor/rules/ # Global company standards
β βββ security-compliance.mdc # Security guidelines for all teams
β βββ code-quality-standards.mdc # Universal quality requirements
β βββ documentation-rules.mdc # Documentation standards
β βββ performance-guidelines.mdc # Performance best practices
βββ backend/
β βββ .cursor/rules/ # Backend-specific rules
β βββ api-design-patterns.mdc # RESTful API standards
β βββ database-interactions.mdc # Database best practices
β βββ microservices-patterns.mdc # Service architecture
βββ frontend/
β βββ .cursor/rules/ # Frontend-specific rules
β βββ react-architecture.mdc # Component architecture
β βββ state-management.mdc # Redux/Context patterns
β βββ ui-accessibility.mdc # Accessibility standards
βββ mobile/
β βββ .cursor/rules/ # Mobile-specific rules
β βββ react-native-patterns.mdc # Mobile development
β βββ performance-mobile.mdc # Mobile optimization
βββ testing/
βββ .cursor/rules/ # Testing-specific rules
βββ e2e-strategies.mdc # End-to-end testing
βββ unit-testing-patterns.mdc # Unit test standards
βββ performance-testing.mdc # Load testing guidelines
- π― Consistent Standards: Shared rules ensure code consistency across teams
- β‘ Faster Onboarding: New developers get immediate context and guidance
- π Knowledge Sharing: Best practices are encoded and automatically shared
- π‘οΈ Quality Assurance: Automated compliance with company standards
- π Continuous Improvement: Rules evolve with team learnings
# Analyze your current .cursorrules
echo "Current .cursorrules content:"
cat .cursorrules
# Identify different rule categories
# - Core standards (always apply)
# - Framework-specific patterns (auto-attach)
# - Advanced techniques (agent-requested)
# - Templates and examples (manual)# Create modern structure
mkdir -p .cursor/rules/{core,frameworks,templates,advanced}
# Categorize existing rules
# Move content to appropriate MDC files
# Add metadata and glob patterns# Add file references and templates
# Implement different rule types
# Create project-specific examples
# Test rule activation patterns# Share with team members
# Gather feedback and iterate
# Create team-specific customizations
# Monitor effectiveness and improve# Clone the showcase repository
git clone https://github.com/your-org/awesome-cursor-rules
# Set up Selenium Python automation
cp -r example-structures/selenium-python/.cursor/rules/* .cursor/rules/
# Add Cypress for E2E testing
cp -r example-structures/cypress/.cursor/rules/* e2e/.cursor/rules/
# Include React TypeScript patterns
cp -r example-structures/react-typescript/.cursor/rules/* frontend/.cursor/rules/# Full-stack development setup
cp -r example-structures/react-typescript/.cursor/rules/* frontend/.cursor/rules/
cp -r example-structures/selenium-python/.cursor/rules/* backend-tests/.cursor/rules/
cp -r example-structures/cypress/.cursor/rules/* e2e-tests/.cursor/rules/# Large-scale monorepo setup - use enterprise patterns from README examples
mkdir -p .cursor/rules
# Copy relevant rules based on your tech stack
# Customize global standards for your organization
# Set up team-specific rules in subdirectories
# Integrate with CI/CD pipelines for consistency- π React + TypeScript + Testing Library: Complete frontend development stack
- π Python + Selenium + pytest: Comprehensive test automation framework
- π’ Enterprise Monorepo: Multi-team, multi-project organization
- π Educational: Learning-focused development with guided examples
"We reduced our code review cycle time by 40% after implementing shared Cursor Rules across our engineering teams. The AI now understands our patterns and generates code that follows our standards automatically."
β Sarah Chen, Engineering Manager at TechCorp
"New team members are productive on day one instead of week three. The rules provide immediate context about our coding patterns, testing strategies, and architectural decisions."
β Marcus Rodriguez, Senior Developer at StartupXYZ
- Research: Study framework best practices and common patterns
- Structure: Create organized rule directory with proper MDC format
- Examples: Include comprehensive template files and examples
- Documentation: Provide clear setup and usage instructions
- Testing: Validate rules with real-world projects
- Document Journey: Show before/after migration experience
- Measure Impact: Include metrics on productivity improvements
- Share Learnings: Explain what worked and what didn't
- Provide Templates: Create reusable configurations for similar teams
- Real-World Testing: Use rules in actual development projects
- Community Feedback: Gather input from diverse development teams
- Performance Optimization: Ensure rules don't slow down AI responses
- Regular Updates: Keep rules current with evolving best practices
- π Official Documentation: Cursor Rules Comprehensive Guide
- π₯ Video Tutorials: Migration Walkthrough Series
- π¬ Community Hub: Cursor Community Forum
- π§ Migration Tools: Automated Migration Scripts
- π Analytics: Rule Effectiveness Dashboard
The evolution from .cursorrules to Cursor Rules represents more than just a technical upgradeβit's a fundamental transformation in how AI understands and enhances the development process:
AI that truly understands your project structure, coding patterns, and team preferences
Faster feature development with AI that knows your exact requirements and standards
Shared knowledge base that ensures consistency across team members and projects
Rules that evolve and improve based on team feedback and project growth
Infrastructure that grows from individual projects to enterprise-scale monorepos
Start your journey from legacy .cursorrules to modern Cursor Rules:
- π Assess: Evaluate your current
.cursorrulessetup - ποΈ Plan: Choose the appropriate migration strategy
- β‘ Implement: Set up organized rule structure
- π― Optimize: Fine-tune rules based on team feedback
- π Scale: Expand to enterprise-level organization
π‘ Remember: The transition from
.cursorrulesto Cursor Rules isn't just about new syntaxβit's about unlocking the full potential of AI-assisted development for your team.
- π Structure Overview - Complete guide to modern flat structure organization
- π Before & After Migration - Real-world transformation examples
- π Selenium Python - Advanced test automation patterns
- π Cypress Testing - E2E testing excellence
- βοΈ React TypeScript - Modern component development
- β² Next.js App Router - Server Components, Route Handlers, Server Actions, and metadata API
- π Official Documentation - Cursor Rules comprehensive guide
- π₯ Video Tutorials - Step-by-step migration walkthrough
- π¬ Community Forum - Connect with other developers
- π’ Enterprise Patterns - Large-scale monorepo organization
- π Migration Strategy - Four-phase transformation approach
- π Community Showcase - Success stories and best practices
Begin with one framework example, then expand to your full tech stack
Collaborative rule creation ensures buy-in and better adoption
Track code review time, onboarding speed, and quality metrics
Regular rule updates keep pace with evolving best practices
Ready to revolutionize your development experience? Pick a framework above and start your transformation today! π