Cursor Rules
cursor rules
Installation
npx cursor-rulesAsk AI about Cursor Rules
Powered by Claude Β· Grounded in docs
I know everything about Cursor Rules. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
AIFlowML Cursor Rules
This repository contains a collection of Cursor rules used by AIFlowML for various projects. These rules help ensure consistent coding standards and provide AI assistants with project-specific knowledge.
π₯ See It In Action!
https://github.com/user-attachments/assets/bba88f6a-6672-4aa6-a78e-4d74ab0619ec
πΉ Click here to view the demo video (Download and watch locally)
Note: To properly embed the video on GitHub, the video needs to be uploaded via GitHub's drag-and-drop feature in the web editor. The video file is available in the
assets/folder for local viewing.
Watch how simple it is to install and use cursor rules in your VS Code projects!
One-Command Installation
Set up cursor rules in your project with a single command:
# Using curl
curl -s https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor.sh | bash
# Using wget
wget -qO- https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor.sh | bash
This will:
- Copy all rules to your project's
.cursor/rulesdirectory - Set up VS Code tasks for managing the rules
- Preserve any existing VS Code configuration
Contributing New Rules
After creating new rules in your project, you can easily contribute them back:
# Using curl
curl -s https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor_push.sh | bash
# Using wget
wget -qO- https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor_push.sh | bash
This will:
- Detect new or modified rules in your
.cursor/rulesdirectory - Push them to a new branch in the shared repository
- Provide a link to create a pull request
What Are Cursor Rules?
Cursor rules are instructions for the AI assistant in Cursor IDE that help it understand your codebase better. They provide context, conventions, and best practices specific to your project or technology stack.
Available Rules
Complete Rules Tree Structure
.cursor/rules/
βββ π Root Rules (Universal Development)
β βββ π cursor_rules.mdc # Meta rules for rule creation and maintenance
β βββ π dev_workflow.mdc # Development workflow and task management
β βββ π§ self_improve.mdc # Self-improvement patterns for rule evolution
β βββ π― taskmaster.mdc # TaskMaster project management integration
β βββ π poetry.mdc # Python Poetry package management
β
βββ π ElizaOS/ (AI Agent Framework - 15 rules)
β βββ ποΈ API Integration (3 rules)
β β βββ elizaos_v2_api_plugins_core.mdc # Core plugin architecture and setup
β β βββ elizaos_v2_api_client_integration.mdc # HTTP clients and API integration
β β βββ elizaos_v2_api_llm_providers.mdc # LLM provider integrations
β β
β βββ π§ Core Framework (3 rules)
β β βββ elizaos_v2_core_runtime.mdc # AgentRuntime and character config
β β βββ elizaos_v2_core_components.mdc # Actions, Providers, and Evaluators
β β βββ elizaos_v2_core_memory.mdc # Memory management and state
β β
β βββ π οΈ CLI & Development (3 rules)
β β βββ elizaos_v2_cli_project.mdc # Project management commands
β β βββ elizaos_v2_cli_config.mdc # Environment and configuration
β β βββ elizaos_v2_cli_agents.mdc # Agent lifecycle management
β β
β βββ π Plugin Development (2 rules)
β β βββ elizaos_v2_client_plugins.mdc # Discord, Twitter, Telegram clients
β β βββ elizaos_v2_onchain_plugins.mdc # Blockchain and crypto integrations
β β
β βββ π§ͺ Testing & Quality (3 rules)
β β βββ elizaos_v2_testing_unit.mdc # Unit testing patterns
β β βββ elizaos_v2_testing_integration.mdc # Integration testing workflows
β β βββ elizaos_v2_testing_e2e.mdc # End-to-end testing automation
β β
β βββ π Documentation (1 rule)
β βββ elizaos_v2_docs_architecture.mdc # Architecture documentation standards
β
βββ π AGNO/ (AI Agent Framework - 19 rules)
β βββ ποΈ Core Architecture (3 rules)
β β βββ AGNO_Core_Agent_Architecture.mdc # Basic agent structure and patterns
β β βββ AGNO_Agent_Parameters.mdc # Agent configuration and parameters
β β βββ agno-agent-state.mdc # Agent state management
β β
β βββ π§ Memory & Knowledge (4 rules)
β β βββ AGNO_Memory_Management.mdc # Memory system configuration
β β βββ AGNO_Knowledge_Integration.mdc # Knowledge base integration
β β βββ AGNO_Chunking_Strategies.mdc # Document chunking methods
β β βββ AGNO_VectorDB_Integration.mdc # Vector database management
β β
β βββ π§ Models & Integration (3 rules)
β β βββ AGNO_Models_Integration.mdc # 23+ model provider support
β β βββ AGNO_Embedder_Configuration.mdc # Embedding model configuration
β β βββ AGNO_Tools_Integration.mdc # Tool integration patterns
β β
β βββ π― Advanced Capabilities (5 rules)
β β βββ AGNO_Reasoning_Capabilities.mdc # Reasoning and logic patterns
β β βββ AGNO_Structured_Output.mdc # Structured data output
β β βββ AGNO_Multimodal_Capabilities.mdc # Image, audio, video processing
β β βββ AGNO_Workflows.mdc # Complex workflow automation
β β βββ agno-multimodal.mdc # Multimodal agent handling
β β
β βββ π₯ Team Development (2 rules)
β β βββ AGNO_Team_Modes.mdc # Multi-agent team configurations
β β βββ AGNO_Teams_Implementation.mdc # Team implementation patterns
β β
β βββ πΎ Session & Output (2 rules)
β βββ agno-session-storage.mdc # Session storage management
β βββ agno-structured-output.mdc # Structured output handling
β
βββ π Python/ (Production Standards - 2 rules)
β βββ python-production.mdc # Production-ready Python practices
β βββ python-testing.mdc # Comprehensive testing strategies
β
βββ π FastMCP_py/ (Python MCP Framework - 11 rules)
β βββ ποΈ Core Architecture (3 rules)
β β βββ fastMCP_py-core.mdc # Core MCP server implementation
β β βββ fastMCP_py-composition.mdc # Server composition patterns
β β βββ fastMCP_py-context.mdc # Context management
β β
β βββ π§ Tools & Resources (3 rules)
β β βββ fastMCP_py-tools.mdc # Tool implementation patterns
β β βββ fastMCP_py-resources.mdc # Resource management
β β βββ fastMCP_py-client.mdc # Client implementation
β β
β βββ π‘οΈ Quality & Reliability (3 rules)
β β βββ fastMCP_py-validation.mdc # Input validation patterns
β β βββ fastMCP_py-errors.mdc # Error handling strategies
β β βββ fastMCP_py-performance.mdc # Performance optimization
β β
β βββ π Operations (2 rules)
β βββ fastMCP_py-testing.mdc # Testing frameworks and patterns
β βββ fastMCP_py-deployment.mdc # Production deployment
β
βββ π FastMCP_ts/ (TypeScript MCP Framework - 9 rules)
β βββ ποΈ Core Implementation (3 rules)
β β βββ fastMCP_ts-core.mdc # Core TypeScript MCP patterns
β β βββ fastMCP_ts-session.mdc # Session management
β β βββ fastMCP_ts-content.mdc # Content handling
β β
β βββ π§ Tools & Resources (2 rules)
β β βββ fastMCP_ts-tools.mdc # Tool implementation
β β βββ fastMCP_ts-resources.mdc # Resource management
β β
β βββ π οΈ Development Tools (2 rules)
β β βββ fastMCP_ts-cli.mdc # CLI tooling
β β βββ fastMCP_ts-logging.mdc # Logging implementation
β β
β βββ π‘οΈ Quality Assurance (2 rules)
β βββ fastMCP_ts-errors.mdc # Error handling patterns
β βββ fastMCP_ts-testing.mdc # Testing strategies
β
βββ π DSPy/ (AI Programming Framework - 50+ rules)
βββ π― Foundation & Philosophy (2 rules)
β βββ 00_DSPy_Intro_and_Philosophy.mdc # Programming over prompting paradigm
β βββ 00_DSPy_Core_Workflow.mdc # Development lifecycle and workflow
β
βββ π§© Core Modules & Signatures (8 rules)
β βββ 01_DSPy_Signatures.mdc # Input/output specifications
β βββ 01_DSPy_Signatures_Custom.mdc # Advanced signature patterns
β βββ 01_DSPy_Modules_Overview.mdc # Module architecture overview
β βββ 01_DSPy_Module_Predict.mdc # Basic prediction module
β βββ 01_DSPy_Module_ChainOfThought.mdc # Reasoning with CoT
β βββ 01_DSPy_Module_ProgramOfThought.mdc # Code generation and execution
β βββ 01_DSPy_Module_ReAct_and_Tools.mdc # Tool-using agents
β βββ 01_DSPy_Composing_Modules.mdc # Complex program composition
β
βββ π§ Language Models & Configuration (4 rules)
β βββ 02_DSPy_LM_Configuration.mdc # Model setup and configuration
β βββ 02_DSPy_LM_Best_Practices.mdc # LM optimization patterns
β βββ 09_DSPY_LiteLLM_Models.mdc # 100+ LLM providers via LiteLLM
β βββ 03_DSPy_Data_Handling.mdc # Data processing and management
β
βββ π Retrieval & Knowledge (2 rules)
β βββ 03_DSPy_Retrieval_Overview.mdc # RAG and retrieval patterns
β βββ 03_DSPy_Retrieval_Clients.mdc # Vector DB and search clients
β
βββ β‘ Optimization & Compilation (4 rules)
β βββ 04_DSPy_Optimizers_Overview.mdc # Optimization strategies
β βββ 04_DSPy_BootstrapFewShot.mdc # Few-shot learning optimization
β βββ 04_DSPy_Advanced_Optimizers.mdc # Advanced optimization techniques
β βββ 04_DSPy_Signature_Optimizers.mdc # Signature-level optimization
β
βββ π Evaluation & Metrics (4 rules)
β βββ 05_DSPy_Evaluation_Workflow.mdc # Evaluation best practices
β βββ 05_DSPy_Standard_Metrics.mdc # Built-in evaluation metrics
β βββ 05_DSPy_Custom_Metrics.mdc # Custom metric development
β βββ 05_DSPy_Tracing_and_Debugging.mdc # Debugging and introspection
β
βββ π Production & Performance (5 rules)
β βββ 06_DSPy_Program_IO.mdc # Saving and loading programs
β βββ 06_DSPy_Caching_and_Performance.mdc # Performance optimization
β βββ 06_DSPy_Typed_Predictors.mdc # Type-safe predictions
β βββ 06_DSPy_Schema_Enforcement.mdc # Output validation and correction
β βββ 07_DSPy_Production_Best_Practices.mdc # MLOps and deployment
β
βββ π― Complete Examples (4 rules)
β βββ 08_DSPy_Example_Basic_RAG.mdc # Simple RAG implementation
β βββ 08_DSPy_Example_MultiHop_RAG.mdc # Complex multi-step RAG
β βββ 08_DSPy_Example_Agent_with_Tools.mdc # Tool-using agent example
β βββ 08_DSPy_Example_Structured_Summarization.mdc # Structured output example
β
βββ π Advanced Examples (17 rules)
βββ π§ Core Patterns (6 rules)
β βββ 001_dspy_basic_rag.mdc # Foundational RAG patterns
β βββ 002_dspy_multihop_search.mdc # Multi-step reasoning
β βββ 003_dspy_program_of_thought.mdc # Code generation examples
β βββ 004_dspy_classification_and_finetuning.mdc # Model fine-tuning
β βββ 005_dspy_entity_extraction.mdc # Information extraction
β βββ 006_dspy_saving_and_loading_programs.mdc # Program persistence
β
βββ β‘ Performance & Optimization (4 rules)
β βββ 007_dspy_caching_for_performance.mdc # Caching strategies
β βββ 008_dspy_output_refinement.mdc # Quality improvement techniques
β βββ 009_dspy_optimizer_tracking.mdc # MLflow integration
β βββ 010_dspy_optimizing_an_ai_program.mdc # End-to-end optimization
β
βββ π€ Agentic Systems (3 rules)
β βββ 011_dspy_tool_use_react.mdc # Dynamic tool-using agents
β βββ 012_dspy_agent_customer_service.mdc # Customer service automation
β βββ 013_dspy_agentic_game_playing.mdc # Game-playing agents
β
βββ π Advanced I/O (2 rules)
β βββ 014_dspy_streaming_responses.mdc # Real-time streaming
β βββ 015_dspy_async_operations.mdc # Asynchronous processing
β
βββ π¨ Multimodal (2 rules)
βββ 016_dspy_image_generation_prompting.mdc # Image generation
βββ 017_dspy_audio_processing.mdc # Audio processing
Rule Categories Detailed
ποΈ ElizaOS v2 Framework (15 rules)
Complete AI agent development framework for building social media bots and conversational AI:
- API Integration: HTTP clients, authentication, rate limiting, LLM provider integrations
- Core Framework: AgentRuntime setup, component architecture, memory management
- CLI Tools: Project management, environment configuration, agent lifecycle
- Plugin Development: Social media clients (Discord, Twitter, Telegram), blockchain integrations
- Testing: Unit, integration, and end-to-end testing patterns
- Documentation: Architecture documentation and best practices
π§ AGNO Framework (19 rules)
Lightweight AI agent framework with memory, knowledge, and reasoning capabilities:
- Core Architecture: Agent structure, parameters, state management
- Memory & Knowledge: Memory systems, knowledge integration, vector databases, chunking
- Models: Support for 23+ model providers, embedding configuration, tool integration
- Advanced Features: Reasoning, structured output, multimodal capabilities, workflows
- Team Development: Multi-agent systems and team coordination
- Session Management: Session storage and structured output handling
π Python Development (2 rules)
Production-ready Python development standards and practices:
- Production Standards: Type safety, error handling, configuration management, security
- Testing Strategies: Unit, integration, mock vs real data, testing loops
π§ FastMCP Frameworks (20 rules)
Model Context Protocol (MCP) server development in Python and TypeScript:
Python FastMCP (11 rules):
- Core server implementation, composition patterns, context management
- Tool and resource implementation, client development
- Validation, error handling, performance optimization
- Testing frameworks and production deployment
TypeScript FastMCP (9 rules):
- Core TypeScript patterns, session and content management
- Tool and resource implementation
- CLI tooling and logging systems
- Error handling and testing strategies
π§ DSPy Framework (50+ rules)
AI Programming Framework that replaces prompting with programming for LLM applications:
- Foundation: Programming over prompting paradigm, development lifecycle
- Core Modules: Signatures, predictors, chain-of-thought, program-of-thought, ReAct agents
- Language Models: Configuration, optimization, 100+ LLM providers via LiteLLM
- Retrieval & RAG: Vector databases, search clients, multi-hop reasoning
- Optimization: Few-shot learning, advanced optimizers, signature optimization
- Evaluation: Metrics, debugging, tracing, custom evaluation workflows
- Production: Caching, performance, type safety, schema enforcement, MLOps
- Examples: Complete implementations for RAG, agents, summarization, classification
- Advanced Patterns: Streaming, async operations, multimodal processing, agentic systems
π οΈ Development Workflow (5 rules)
Universal development practices applicable across all projects:
- Rule Management: Meta rules for creating and maintaining cursor rules
- Workflow: Task management, development process, TaskMaster integration
- Self-Improvement: Pattern recognition and rule evolution
- Package Management: Python Poetry configuration and best practices
Usage by Framework
For ElizaOS Development
# Focus on ElizaOS rules for agent development
curl -s https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor.sh | bash
# Use elizaos_v2_* rules for comprehensive agent development
For AGNO Development
# Use AGNO_* rules for lightweight agent development
# Perfect for research and prototyping AI agents
For FastMCP Development
# Use fastMCP_py-* for Python MCP servers
# Use fastMCP_ts-* for TypeScript MCP servers
For DSPy Development
# Use DSPy rules for AI programming with LLMs
# Perfect for building reliable LLM applications with optimization
# Covers everything from basic modules to production deployment
For General Python Development
# Use python-* rules for production-ready Python applications
# Use poetry.mdc for package management
Updating Rules
After installation, you can update the rules using VS Code tasks:
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type "Tasks: Run Task" and select "Update Cursor Rules"
Alternatively, run the installation script again to get the latest version.
Manual Installation
If you prefer to install manually:
# Clone this repository
git clone git@github.com:AIFlowML/cursor_rules.git
# Copy the rules to your project
mkdir -p /path/to/your/project/.cursor/rules
cp -r cursor_rules/.cursor/rules/* /path/to/your/project/.cursor/rules/
# Copy VS Code tasks (optional)
mkdir -p /path/to/your/project/.vscode
cp -r cursor_rules/.vscode/* /path/to/your/project/.vscode/
Creating Your Own Rules
Cursor rules are stored in .mdc files in the .cursor/rules directory. Each rule should:
- Have a descriptive filename
- Contain clear instructions for the AI assistant
- Include examples where helpful
Example rule structure:
# Rule Name
## Overview
Brief description of what this rule is for.
## Guidelines
- Guideline 1
- Guideline 2
## Examples
```code
// Example code
```
## Workflow
The recommended workflow for using these rules:
1. **Install rules** in your project: `curl -s https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor.sh | bash`
2. **Create new rules** specific to your project in `.cursor/rules/`
3. **Share your rules** with the team: `curl -s https://raw.githubusercontent.com/AIFlowML/cursor_rules/main/cursor_push.sh | bash`
4. **Update regularly** using the VS Code task or installation script
## Contributing
1. Fork this repository
2. Create a new branch (`git checkout -b my-new-rule`)
3. Add your rule to `.cursor/rules/`
4. Commit your changes (`git commit -am 'Add new rule'`)
5. Push to the branch (`git push origin my-new-rule`)
6. Create a new Pull Request
## License
MIT
