{"id":31285616,"url":"https://github.com/jimmypocock/cursor-rules","last_synced_at":"2025-09-24T08:03:54.007Z","repository":{"id":291023610,"uuid":"976333897","full_name":"jimmypocock/cursor-rules","owner":"jimmypocock","description":"Best practices for Cursor IDE with AWS, Next.js, and React Native","archived":false,"fork":false,"pushed_at":"2025-05-01T23:44:22.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T00:25:43.569Z","etag":null,"topics":["ai-assistant","aws","cursor","cursor-rules","nextjs","react-native","serverless","typescript"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimmypocock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-01T23:28:42.000Z","updated_at":"2025-05-01T23:41:40.000Z","dependencies_parsed_at":"2025-05-02T00:36:49.203Z","dependency_job_id":null,"html_url":"https://github.com/jimmypocock/cursor-rules","commit_stats":null,"previous_names":["jimmypocock/cursor-rules"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jimmypocock/cursor-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmypocock%2Fcursor-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmypocock%2Fcursor-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmypocock%2Fcursor-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmypocock%2Fcursor-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimmypocock","download_url":"https://codeload.github.com/jimmypocock/cursor-rules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmypocock%2Fcursor-rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276714447,"owners_count":25691396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","aws","cursor","cursor-rules","nextjs","react-native","serverless","typescript"],"created_at":"2025-09-24T08:01:49.851Z","updated_at":"2025-09-24T08:03:53.992Z","avatar_url":"https://github.com/jimmypocock.png","language":"Shell","readme":"# Cursor Rules for AWS Serverless \u0026 Modern Applications\n\nA comprehensive set of rules and best practices for the Cursor IDE to guide AI-assisted development of serverless applications, web frontends, and mobile apps.\n\n## Quick Installation\n\nAdd these rules to your existing project with a single command:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jimmypocock/cursor-rules/main/install.sh | bash\n```\n\nThis will download and install only the necessary rule files into your project's `.cursor/rules` directory.\n\n## Overview\n\nThis repository contains a collection of configuration files for [Cursor IDE](https://cursor.sh/) that provides context-specific guidance to the AI assistant. These rules help ensure that all code generated by the AI follows consistent patterns, best practices, and architectural principles across your projects.\n\n## Key Components\n\n1. **Base Rules** - Core development principles that apply across all projects, including coding conventions, error handling, and security best practices.\n\n2. **TypeScript Rules** - Specific guidelines for TypeScript development, including type definitions, modern features, and organization patterns.\n\n3. **AWS Serverless Rules**:\n   - **Lambda Functions** - Best practices for design, performance, cold start mitigation, and error handling\n   - **DynamoDB** - Data modeling principles, key design, query optimization, and cost efficiency\n   - **IAM** - Security best practices, least privilege principles, and role design\n   - **CloudFormation/SAM** - Infrastructure as code patterns and deployment practices\n   - **GameLift** - Game server integration, matchmaking, and fleet management\n   - **Bedrock** - Foundation model integration, prompt engineering, and agent design\n   - **SageMaker** - ML pipeline design, model deployment, and monitoring\n   - **VPC** - Network architecture, security, and connectivity patterns\n   - **EventBridge** - Event-driven design, rule configuration, and integration patterns\n\n4. **Web Development Rules**:\n   - **Next.js** - App Router architecture, component design, data fetching, and performance optimization\n   - **React** - Component patterns, hooks usage, state management, and performance optimization\n\n5. **Mobile Development Rules**:\n   - **React Native** - Project setup, component architecture, navigation, and performance optimization\n   - **Expo** - Expo ecosystem integration, EAS services, and deployment strategies\n\n6. **Supporting Tools**:\n   - Installation script for easy adoption\n   - GitHub workflow for automated maintenance\n   - Validation tools to ensure rule quality\n   - Best practice checkers to keep rules updated\n   - Comprehensive documentation\n\n## Benefits of This Approach\n\n- **Comprehensive Coverage**: Rules for all major aspects of modern application development\n- **Modularity**: Each rule file focuses on a specific technology or concept\n- **Maintainability**: Clear organization makes rules easy to update as best practices evolve\n- **Automation**: Tools to validate and distribute rules across projects\n- **Knowledge Sharing**: Captures expert knowledge in a format that benefits the entire team\n\n## Implementation Details\n\nThe rules follow the modern MDC (Markdown Configuration) format introduced in Cursor v0.45+, which allows:\n\n1. **Domain-specific configurations** targeting specific file patterns\n2. **Hierarchical rule inheritance** with base rules extended by more specialized ones\n3. **Agent-centric instructions** treating the AI as a specialized coding assistant\n\n## Directory Structure\n\n```\n.\n├── .cursor/\n│   └── rules/\n│       ├── base.mdc                  # Core development principles\n│       ├── typescript.mdc            # TypeScript best practices\n│       ├── aws-lambda.mdc            # Lambda function guidelines\n│       ├── aws-dynamodb.mdc          # DynamoDB patterns and practices\n│       ├── aws-iam.mdc               # IAM security best practices\n│       ├── aws-sam.mdc               # SAM template configuration\n│       ├── aws-cloudformation.mdc    # CloudFormation best practices\n│       ├── aws-vpc.mdc               # VPC network architecture\n│       ├── aws-gamelift.mdc          # GameLift integration patterns\n│       ├── aws-bedrock.mdc           # Bedrock AI implementation\n│       ├── aws-sagemaker.mdc         # SageMaker ML development\n│       ├── aws-eventbridge.mdc       # EventBridge event-driven patterns\n│       ├── nextjs.mdc                # Next.js application development\n│       ├── react.mdc                 # React component patterns\n│       ├── react-native.mdc          # React Native mobile development\n│       └── expo.mdc                  # Expo ecosystem integration\n├── .github/\n│   ├── workflows/\n│   │   └── cursor-rules.yml          # GitHub workflow for maintenance\n│   └── scripts/\n│       ├── validate-rules.js         # Rule validation script\n│       ├── check-aws-best-practices.js        # Checks AWS best practices\n│       ├── check-frontend-best-practices.js   # Checks frontend best practices\n│       ├── check-mobile-best-practices.js     # Checks mobile best practices\n│       └── package.json              # Dependencies for scripts\n├── install.sh                        # Installation script\n├── LICENSE                           # MIT License\n└── README.md                         # This file\n```\n\n## Installation Options\n\n### Option 1: One-Line Installation (Recommended)\n\nThe easiest way to add these rules to your project is using our installation script:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jimmypocock/cursor-rules/main/install.sh | bash\n```\n\nThis script will:\n- Download only the necessary rule files\n- Create a `.cursor/rules` directory in your project if it doesn't exist\n- Copy the rules into your project\n- Clean up any temporary files\n- Detect your project type and provide feedback\n\n### Option 2: Manual Installation\n\nIf you prefer a manual approach:\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/jimmypocock/cursor-rules.git\n   ```\n\n2. Copy the rules directory to your project:\n   ```bash\n   cp -r cursor-rules/.cursor/rules your-project/.cursor/\n   ```\n\n3. Open your project in Cursor IDE.\n\n## Customizing Rules\n\nThese rules are designed to be a starting point. You should customize them to match your team's specific needs:\n\n1. Open any `.mdc` file in the `.cursor/rules` directory\n2. Modify the rules to match your specific requirements\n3. Save the file and Cursor will immediately use the updated rules\n\n## Rule Types\n\n### Base Rules\n\nThe `base.mdc` file contains core development principles that apply to all code, regardless of technology:\n\n- Code organization and naming conventions\n- Error handling and logging\n- Security principles\n- Performance optimization\n- Documentation standards\n\n### Technology-Specific Rules\n\nOther files contain rules tailored to specific technologies, such as:\n\n- **aws-lambda.mdc** - Lambda function design and implementation\n- **aws-dynamodb.mdc** - DynamoDB data modeling and access patterns\n- **nextjs.mdc** - Next.js application architecture and components\n- **react-native.mdc** - React Native mobile development\n\n## Recommended Attachment Modes\n\nFor optimal AI guidance and performance, we recommend configuring these rules with specific attachment modes in Cursor IDE:\n\n### Setting Up Attachment Modes\n\n1. Open Cursor IDE\n2. Go to Settings \u003e Rules\n3. Find each rule file and set its attachment mode as recommended below\n\n### Recommended Configuration\n\n| Rule Type | Recommended Mode | Explanation |\n|-----------|------------------|-------------|\n| **Core Rules** | Always | These fundamental rules should apply to all development |\n| `base.mdc` | Always | Core development principles apply universally |\n| `readme-documentation.mdc` | Always | Documentation standards should be consistent throughout |\n| **Technology-Specific Rules** | Auto Attached or Agent Requested | These should only activate when relevant |\n| AWS service rules | Auto Attached or Agent Requested | Provides AWS guidance only when working with related files |\n| Web/mobile rules | Auto Attached or Agent Requested | Offers framework-specific advice when in relevant files |\n\nThis configuration ensures:\n- **Consistent Standards**: Core best practices are always applied\n- **Contextual Guidance**: Specialized rules appear only when relevant\n- **Reduced Noise**: You won't get AWS advice when working on frontend code\n- **Better Performance**: Reduces context size by only including pertinent rules\n\nTo manually override these settings for a specific interaction, you can use the Rules dropdown menu in the chat interface.\n\n## Team Collaboration\n\nFor teams, we recommend:\n\n1. **Centralize Rules** - Maintain rules in a dedicated repository\n2. **Review Process** - Establish a process for reviewing and updating rules\n3. **Automation** - Use the included GitHub workflow to sync rules across projects\n4. **Documentation** - Document why certain rules exist to build understanding\n\n## Validation Tools\n\nThis repository includes tools to validate and maintain your cursor rules:\n\n1. **Rule Validator**: Ensures all rule files follow the correct format\n   ```bash\n   cd .github/scripts\n   npm install\n   node validate-rules.js\n   ```\n\n2. **Best Practice Checkers**: Scripts to check for updates to best practices\n   ```bash\n   node check-aws-best-practices.js\n   node check-frontend-best-practices.js\n   node check-mobile-best-practices.js\n   ```\n\n## GitHub Integration\n\nThe included GitHub workflow automates:\n\n1. **Validation**: Ensures all rules follow the correct format\n2. **Distribution**: Syncs rules to other repositories you maintain\n3. **Updates**: Checks for new best practices and creates issues\n\n## Compatibility\n\n- Cursor IDE v0.45 or later (supports MDC format)\n- Earlier versions can still use the `.cursorrules` format (deprecated)\n\n## Contributing\n\nWe welcome contributions to improve these rules! Please submit a pull request with your suggested changes.\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Cursor IDE team for creating a fantastic AI-assisted development tool\n- AWS for their serverless best practices documentation\n- Next.js, React, and React Native communities for their valuable guidance","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmypocock%2Fcursor-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmypocock%2Fcursor-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmypocock%2Fcursor-rules/lists"}