Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
Cursor ruleSafeAgent workflow & memoryBeginner friendly

awesome-cursorrules

tugkanboz · tugkanboz/awesome-cursorrules

A curated list showcasing modern Cursor Rules configurations in MDC format, providing examples for various testing frameworks and development scenarios.

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

22 stars9License: MITUpdated 19 days ago0 opens

Preview

▍

What you can do with it

  • Quickly find and implement Cursor rules for specific testing frameworks like Cypress or Playwright.
  • Learn best practices for organizing Cursor rules using the new MDC format.
  • Enhance Cursor AI's understanding of project structure and coding conventions by importing relevant rule sets.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

Awesome Cursor Rules 🚀

A curated showcase of modern Cursor Rules configurations for development teams

🎯 Evolution Notice: This repository demonstrates the transition from legacy .cursorrules files to the powerful new Cursor Rules system with MDC format, rule types, and advanced organizational features.

🌟 What Changed: From .cursorrules to Cursor Rules

Cursor has revolutionized AI-assisted development by moving beyond the limitations of single-file .cursorrules:

Legacy .cursorrulesNew 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

🎪 Repository Overview

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

🔄 The Great Migration: Before & After

Legacy .cursorrules Approach

# 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

Modern Cursor Rules System

# 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

🎨 Understanding Rule Types

🔄 Always Rules

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 patterns

🎯 Auto Attached Rules

Automatically 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.ts

🤖 Agent Requested Rules

AI 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 performance

📝 Manual Rules

Explicitly 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-ci

📄 AGENTS.md: The Simpler Alternative

Alongside .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 guidance

How it works:

  • ✅ Plain Markdown — just write instructions, no YAML frontmatter
  • ✅ Nested directories: an AGENTS.md deeper 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

View source on GitHub