A curated collection of advanced .mdc rules for Cursor IDE that optimize AI agent behavior, memory management, and development workflows.
This repository contains production-ready Cursor project rules (.mdc files) designed to:
- Optimize AI Memory Management: Intelligent context pruning and pattern recognition
- Enhance Development Workflows: Session coordination and decision tracking
- Improve Debugging Efficiency: Minimize tool calls while maximizing effectiveness
- Enforce Best Practices: Common sense rules and mistake prevention
- Maintain Session Continuity: Seamless handoffs and context retention
cursor_prompts/
βββ README.md # This file
βββ .cursor/rules/ # Advanced Cursor project rules
β βββ memory-management.mdc # Intelligent memory & context management
β βββ session-coordinator.mdc # Session continuity and handoffs
β βββ development-journal.mdc # Development pattern tracking
β βββ ADR.mdc # Architectural Decision Records automation
β βββ debugging.mdc # Efficient debugging optimization
β βββ efficiency.mdc # Tool call and resource optimization
β βββ commonsense.mdc # Best practices and mistake prevention
β βββ javascript.mdc # JavaScript ES2022+ best practices
β βββ typescript.mdc # TypeScript patterns and type system mastery
β βββ terminal.mdc # Terminal operation optimization
β βββ audit.mdc # Comprehensive code quality assurance
βββ examples/ # Usage guides and documentation
βββ use_cases/
βββ cursor-mdc-rules-guide.md # Comprehensive usage guide
Use the provided installation scripts for easy setup:
# Unix/macOS
./scripts/install.sh
# Windows PowerShell
.\scripts\install.ps1Installation Tiers:
- Essential: Core rules for any project (5 rules)
- Language: Essential + JavaScript/TypeScript patterns (7 rules)
- Team: Language + team coordination (9 rules)
- All: Complete feature set (11 rules)
-
Copy to your project:
git clone https://github.com/DVC2/cursor_prompts.git cp -r cursor_prompts/.cursor/rules/ /your/project/.cursor/
-
Restart Cursor IDE to load the new rules
-
Rules activate automatically based on context and file patterns
Check that rules are loaded:
- Open Cursor IDE
- Use
Cmd+Shift+Pβ "Show Active Rules" (if available) - Rules will appear in the context when relevant files are accessed
| Rule | Purpose | Key Features |
|---|---|---|
| memory-management.mdc | Advanced memory management with intelligent context pruning | Context layers, smart pruning, pattern recognition, performance monitoring |
| session-coordinator.mdc | Session continuity and context coordination | State management, session recovery, context transfer, knowledge retention |
| development-journal.mdc | Development pattern tracking and workflow optimization | Decision logging, pattern learning, workflow optimization, metrics tracking |
| Rule | Purpose | Key Features |
|---|---|---|
| ADR.mdc | Intelligent Architectural Decision Record automation | Decision detection, template-based ADR creation, decision tracking |
| debugging.mdc | Highly efficient debugging with minimal tool calls | Tool call optimization, pattern-based debugging, duplication prevention |
| efficiency.mdc | Minimize premium tool calls while maintaining productivity | Command batching, file operation efficiency, resource conservation |
| commonsense.mdc | Common sense development practices and mistake prevention | Best practice enforcement, mistake prevention, quality guidelines |
| terminal.mdc | Terminal operation optimization for AI agents | Command chaining, output optimization, state verification |
| audit.mdc | Comprehensive code quality assurance with surgical precision | Recursive audit loop, thinking protocols, surgical intervention |
| Rule | Purpose | Key Features |
|---|---|---|
| javascript.mdc | JavaScript ES2022+ best practices and modern patterns | Modern syntax, async patterns, performance optimization, functional programming |
| typescript.mdc | TypeScript patterns and type system mastery | Type safety, advanced types, strict mode, architecture patterns |
.mdc files are Cursor's MDC (Markdown with metadata) project rules format:
---
description: Brief description of what this rule does
globs: ["**/*", "specific/path/**/*"] # File patterns this rule applies to
alwaysApply: true # or false for conditional application
---
# Rule content in Markdown format
Your rule instructions for the AI agent...- Adjust glob patterns to match your project structure
- Customize rule content for your development style
- Enable/disable specific features within each rule
- Add project-specific patterns and preferences
---
description: Memory management optimized for React projects
globs: ["src/**/*.tsx", "src/**/*.ts", "components/**/*"]
alwaysApply: true
---
# React-specific optimizations...- Context Layers: Critical β Important β Historical β Archive
- Smart Pruning: Relevance-based context optimization
- Pattern Recognition: Code smell and architecture drift detection
- Performance Monitoring: Regression detection and optimization
- State Persistence: Maintain context across sessions
- Intelligent Recovery: Resume development workflows seamlessly
- Knowledge Transfer: Share insights between team members
- Context Prediction: Preload relevant information
- Pattern Learning: Automatically discover and optimize workflows
- Decision Tracking: Log and learn from development decisions
- Workflow Optimization: Continuous improvement of development processes
- Metrics Collection: Track and analyze development patterns
- Complete Usage Guide: Comprehensive documentation for using these rules
- Quick Reference Guide: Fast commands and patterns with performance metrics
- Language-Specific Rules Guide: JavaScript and TypeScript rules documentation
- Integration Guide: How to combine rules for maximum efficiency
- Troubleshooting Guide: Common issues and diagnostic procedures
- Metrics Dashboard: Track your productivity improvements
- Cursor Official Documentation: Official Cursor rules documentation
This repository is kept simple for easy use:
- Just copy rules from
.cursor/rules/to your project - No Node.js, npm, or extra tooling required
- All validation is handled by GitHub Actions before merging
All changes are automatically validated through GitHub Actions before merging.
- Test thoroughly in real projects before submitting
- Document your changes and use cases clearly
- Follow the existing rule format and conventions
- Provide examples of how the rules improve workflows
Perfect for:
- Large codebases requiring intelligent context management
- Team projects needing consistent AI behavior
- Long development sessions requiring memory optimization
- Complex debugging scenarios demanding efficiency
- Quality-focused development preventing common mistakes
This repository is public domain. Feel free to use, modify, and distribute these rules for any purpose.
- Cursor IDE - AI-powered code editor
- Cursor Documentation - Official documentation
- Cursor Community Forum - Community discussions
These rules represent advanced Cursor usage patterns developed through extensive real-world usage. They're designed to work together as an integrated system for optimal AI-assisted development.