Production-grade Cursor rules for 15+ languages and cloud platforms
Comprehensive, battle-tested Cursor IDE rules for professional software engineering. Curated .mdc files covering languages, cloud platforms, DevOps tools, and engineering patterns.
- 100-core.mdc - Core coding standards and review guidelines
- 010-workflow.mdc - Development workflow patterns
- 020-agent-audit.mdc - Agent audit requirements
- 130-git.mdc - Git conventions and commit standards
- 200-python.mdc - Python best practices (PEP 8, type hints, async)
- 210-go.mdc - Go patterns (error handling, concurrency, generics)
- 230-javascript.mdc - JavaScript/Node.js (ES modules, async/await)
- 240-typescript.mdc - TypeScript (type safety, advanced types)
- 220-rust.mdc - Rust (ownership, borrowing, async)
- 140-bash.mdc - Shell scripting (POSIX compliance, safety)
- 410-aws.mdc - AWS (EKS, VPC Lattice, Zero Trust, IAM)
- 430-azure.mdc - Azure (Bicep, Key Vault, App Service)
- 420-gcp.mdc - GCP (Cloud Run, GKE, Secret Manager)
- 400-cloudflare.mdc - Cloudflare (Workers, Rules Engine)
- 500-ai-ml.mdc - LLM integration (OpenAI, Claude, Bedrock, Vertex AI)
- 510-mcp-servers.mdc - Model Context Protocol servers
- 180-terraform.mdc - Terraform (modules, state, validation)
- 170-cloudformation.mdc - CloudFormation templates
- 450-kubernetes.mdc - Kubernetes & EKS patterns
- 160-github-actions.mdc - GitHub Actions (workflows, security, OIDC)
- 190-ansible.mdc - Ansible (playbooks, roles, idempotency)
- 460-helm.mdc - Helm charts and templating
- 440-docker.mdc - Docker & containers (multi-stage builds, security)
- 150-justfile.mdc - Justfile patterns (modern command runner)
- 310-security.mdc - OWASP Top 10, secret management
- 300-testing.mdc - Unit/Integration/E2E testing strategies
- 320-api-design.mdc - REST API design patterns
- 330-observability.mdc - Logging, metrics, tracing
- 470-postgresql.mdc - PostgreSQL patterns
- 810-documentation.mdc - Documentation standards
- 820-open-source.mdc - Open source project patterns
- 250-cli.mdc - CLI application patterns
- 110-configuration.mdc - Configuration management
- 120-utilities.mdc - CLI utilities (lynx, curl, jq, ripgrep, fd, fzf)
- 800-markdown.mdc - Markdown & Mermaid diagrams
Utility scripts for Cursor maintenance:
- cursor-maintenance.sh - Clean cache, logs, and temp files to reclaim disk space
# Preview cleanup
./scripts/cursor-maintenance.sh --dry-run
# Run cleanup
./scripts/cursor-maintenance.shSee scripts/README.md for details.
Workflow commands for explicit phase transitions. Type /command in Cursor chat to trigger.
| Command | Purpose |
|---|---|
/init |
Initialize task - analyze project, detect complexity |
/plan |
Enter planning phase - analyze, design, document approach |
/creative |
Enter creative phase - explore design options for complex tasks |
/qa |
Run QA validation - check dependencies, config, environment |
/build |
Enter implementation phase - write code following approved plan |
/review |
Enter review phase - verify implementation, suggest improvements |
/self-review |
Comprehensive local PR review (compare branch to main) |
/quick-review |
Fast critical issues check (pre-commit validation) |
/check-progress |
Review work progress, propose commit message |
/archive |
Archive task - document lessons learned, update knowledge base |
Installation:
# Copy to your project
cp -r /path/to/cursor-engineering-rules/commands .cursor/commands
# Or symlink
ln -s /path/to/cursor-engineering-rules/commands .cursor/commandsWorkflow:
Simple: /init -> /build -> /review
Moderate: /init -> /plan -> /qa -> /build -> /review
Complex: /init -> /plan -> /creative -> /qa -> /build -> /review -> /archive
See commands/README.md for detailed documentation.
Model Context Protocol (MCP) server for Cursor and other MCP-compatible AI clients.
# Install
cd mcp/cursor-rules-mcp
npm install
npm run build
npm link
# Configure Claude Desktop
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cursor-engineering-rules": {
"command": "cursor-rules-mcp"
}
}
}Features:
- Fetch workflow guide (Plan/Implement/Review)
- Fetch specific rules by category/topic
- List all available rules
- Just-in-time rule loading (load only what you need)
See mcp/cursor-rules-mcp/README.md for full documentation.
Cursor supports two ways to load rules. Choose based on your needs:
Rules with alwaysApply: true in their frontmatter load automatically when placed in .cursor/rules/.
Best for: Personal setup, global rules across all projects
# Symlink to your home directory (applies to all projects)
mkdir -p ~/.cursor
ln -s /path/to/cursor-engineering-rules/rules ~/.cursor/rules
# Or symlink per-project
mkdir -p .cursor
ln -s /path/to/cursor-engineering-rules/rules .cursor/rulesRules that auto-load (alwaysApply: true):
| Rule | Purpose |
|---|---|
010-workflow.mdc |
Plan/Build/Review workflow |
020-agent-audit.mdc |
Agent audit requirements |
100-core.mdc |
Core coding standards |
110-configuration.mdc |
Configuration management |
120-utilities.mdc |
CLI tools |
130-git.mdc |
Git conventions |
310-security.mdc |
Security best practices |
800-markdown.mdc |
Markdown formatting |
Other rules load based on file patterns or explicit request.
Use a .cursorrules file for explicit control over which rules load.
Best for: Team projects, project-specific subsets, version-controlled config
# .cursorrules - Option 1: Load all rules from directory
rulesDirectory: .cursor/rules
# .cursorrules - Option 2: Explicit rule list
rules:
- .cursor/rules/100-core.mdc
- .cursor/rules/200-python.mdc
- .cursor/rules/410-aws.mdcNote
When using .cursorrules, rules with alwaysApply: true still load automatically in addition to your explicit list.
See examples/.cursorrules-example for tech-stack templates.
For workspaces with many repositories, rules load based on file patterns. Open a .py file and Python rules load; open a .go file and Go rules load. Most repos need zero per-repo configuration.
See Multi-Repo Workspaces for detailed guidance.
Copy specific rules to your project:
# Create Cursor rules directory
mkdir -p .cursor/rules
# Copy specific rules you need
cp path/to/cursor-engineering-rules/rules/200-python.mdc .cursor/rules/
cp path/to/cursor-engineering-rules/rules/410-aws.mdc .cursor/rules/
# (Optional) Copy workflow templates (tasks, active-context, etc.)
mkdir -p .cursor/rules/templates
cp path/to/cursor-engineering-rules/rules/templates/*.template .cursor/rules/templates/If you keep a shared checkout of this repo, you can bootstrap a workspace with:
/path/to/cursor-engineering-rules/setup-workspace.sh -S -l .Add to your .cursorrules file:
rules:
- .cursor/rules/200-python.mdc
- .cursor/rules/410-aws.mdcSymlink the entire rules directory:
# From your project root
ln -s /absolute/path/to/cursor-engineering-rules/rules .cursor/rulesConfigure .cursorrules:
# Load all rules
rulesDirectory: .cursor/rules
# Or be selective with alwaysApply rules
rules:
- .cursor/rules/100-core.mdc
- .cursor/rules/200-python.mdc
- .cursor/rules/310-security.mdcCreate a custom .cursorrules that includes only relevant rules:
# Python + AWS project
rules:
- .cursor/rules/100-core.mdc
- .cursor/rules/130-git.mdc
- .cursor/rules/200-python.mdc
- .cursor/rules/410-aws.mdc
- .cursor/rules/180-terraform.mdc
- .cursor/rules/310-security.mdc
- .cursor/rules/300-testing.mdcRules have alwaysApply flags and priority levels:
- Always Apply: Core standards (100-core, 130-git, 310-security)
- High Priority: Language-specific rules for your stack
- Medium Priority: Platform/tool-specific rules
- Low Priority: Documentation and utility guides
See rules/INDEX.md for complete categorization.
- Battle-tested patterns from real-world projects
- Security-first approach (OWASP Top 10, secret scanning)
- Performance-focused (benchmarks, optimization patterns)
- 6 programming languages (Python, Go, TypeScript, JavaScript, Rust, Bash)
- 4 major cloud platforms (AWS, Azure, GCP, Cloudflare)
- 10+ DevOps tools (Terraform, K8s, Docker, Ansible, Helm, GitHub Actions)
- AI/ML integration (OpenAI, Claude, Bedrock, Vertex AI)
- Real-world examples for every pattern
- Good vs Bad comparisons
- Common mistakes and anti-patterns
- Quick reference sections
- Latest versions (Python 3.12+, Go 1.25+, Node 22+)
- Modern patterns (async/await, generics, type safety)
- Current tools (ripgrep, fd, fzf, just, jq)
Use 999-local-overrides.mdc for project-specific rules:
# Copy to your project
cp rules/999-local-overrides.mdc .cursor/rules/999-local-overrides.mdc
# Edit to add project-specific rules
vim .cursor/rules/999-local-overrides.mdcFollow the standard format:
---
title: My Custom Rule
description: Project-specific patterns
priority: 900
alwaysApply: false
files:
include:
- "**/*.py"
---
# My Custom Rule
## Pattern 1
[Your custom patterns here]Contributions are welcome! Please see .github/CONTRIBUTING.md for guidelines.
- Additional language support (Java, C#, Ruby, PHP)
- More cloud platform patterns
- Industry-specific patterns (fintech, healthcare, etc.)
- Performance benchmarks
- Additional code examples
MIT License - see LICENSE for details.
This project was inspired by and incorporates patterns from:
- AI Developer Guide: https://github.com/dwmkerr/ai-developer-guide - Workflow patterns and context management
- Cursor Memory Bank: https://github.com/vanzan01/cursor-memory-bank - Context file management patterns
- Shellwright: https://github.com/dwmkerr/shellwright - Terminal automation MCP server patterns and PTY session management
Thanks to @DaKaZ for suggesting the commands-based workflow approach.
- dotcursorrules.com - Community directory of framework-specific cursor rules (Next.js, Laravel, React, etc.). Use dotcursorrules for framework recipes and this repo for engineering discipline.
- ACE-FCA - Advanced Context Engineering for Coding Agents. Excellent methodology on context management, "frequent intentional compaction", and Research -> Plan -> Implement workflows.
- Cursor Memory Bank - Command-based workflow system using Cursor's
/commandsfeature for progressive rule loading. - Shellwright - Playwright for the shell. MCP server for terminal automation, screenshots, and GIF recording. Excellent example of MCP server implementation with PTY session management.
- eslint-config-airbnb - JavaScript style guide
- google-styleguides - Google's style guides
- uber-go-guide - Uber's Go style guide
Note
Three Ways to Load Context: This repo supports multiple approaches:
- Rules (
.mdcfiles) - Auto-load based onalwaysApplyflags and file patterns - Commands (
/plan,/build, etc.) - Explicit phase transitions for progressive disclosure - MCP Server - On-demand rule loading via tool calls
Use all three together for maximum flexibility, or pick what works for your workflow.