An open API service indexing awesome lists of open source software.

https://github.com/brunogama/my-opinionated-ios-cursor-rules

Well let's get into the hype train
https://github.com/brunogama/my-opinionated-ios-cursor-rules

ai cursor development ios swift swiftui vibe-coding

Last synced: 5 months ago
JSON representation

Well let's get into the hype train

Awesome Lists containing this project

README

          


Banner

![GitHub last commit](https://img.shields.io/github/last-commit/brunogama/my-opinionated-ios-cursor-rules?display_timestamp=author&style=flat)

# Cursor Swift Rules

A comprehensive collection of Cursor rules specifically designed for Swift and iOS development. These rules enhance your development experience by providing intelligent assistance for common iOS development tasks, testing, security, and best practices.

## ๐Ÿš€ Quick Start

Install the rules using the provided installation script:

```bash
curl -o- https://raw.githubusercontent.com/yourusername/cursor-swift-rules/main/install.sh | bash
```

Or download and run manually:

```bash
git clone https://github.com/yourusername/cursor-swift-rules.git
cd cursor-swift-rules
./install.sh
```

## ๐Ÿ“ฑ iOS Development Rules

### `with-swift.mdc`
Enforces Swift coding standards and best practices:
- Naming conventions (Swift API Design Guidelines)
- Memory management patterns
- Error handling best practices
- Swift idioms and patterns
- Protocol-oriented programming
- Value vs Reference types usage

### `with-ios.mdc`
iOS-specific development patterns and architectural guidance:
- UIKit vs SwiftUI decision making
- App lifecycle management
- Device capabilities handling
- Accessibility implementation
- iOS data management strategies
- Memory warnings and state preservation
- Background task handling

### `with-ddd-swift.mdc`
Domain-Driven Design principles adapted for Swift:
- Strategic and tactical patterns for Swift
- Entity and value object implementation
- Aggregate design in Swift
- Repository pattern implementation
- Domain events in Swift applications

### `clean-architecture-swift.mdc`
Clean Architecture implementation in Swift:
- Layer separation (Domain, Application, Interface, Infrastructure)
- Dependency rule enforcement
- Use case implementation
- Interface adapters in Swift
- Dependency injection techniques

## ๐Ÿงช Testing and QA Rules

### `create-tests-swift.mdc`
Guidelines for creating effective Swift tests:
- XCTest framework usage
- UI Testing best practices
- Performance testing
- Network request mocking
- Asynchronous code testing
- Test data management
- Code coverage requirements

### `swift-testing-policy.mdc`
Project-specific testing standards:
- Test coverage requirements
- Test naming conventions
- Test organization guidelines
- Mock object creation patterns
- CI/CD test integration

### `object-calisthenics-swift.mdc`
Code quality improvement through constraints:
- Single level of indentation
- No else keyword usage
- Encapsulated collections
- Small entities
- First-class collections
- Implementation specific to Swift patterns

## ๐Ÿ“ฆ Release and Deployment Rules

### `create-ios-release.mdc`
Comprehensive guide for iOS app deployment:
- App Store submission checklist
- TestFlight distribution
- Code signing management
- Fastlane integration
- CI/CD pipeline setup
- Version and build number management

### `create-release.mdc`
Handles iOS app release process:
- Version bumping
- Changelog management
- Documentation updates
- Git branching and tagging
- Release notes generation

### `create-commit-message.mdc`
Standardized commit message formatting:
- Conventional commits structure
- Semantic versioning integration
- Issue/ticket referencing
- Co-author attribution
- Changelog integration

## ๐Ÿ”ง Development Workflow Rules

### `finalize.mdc`
Post-development cleanup and validation:
- Dead code elimination
- Documentation completeness
- Resource optimization
- Memory leak checking
- Unused import removal

### `main-refactoring-rules.mdc`
Code refactoring guidance:
- Code smell detection
- Refactoring techniques for Swift
- Performance optimization patterns
- Legacy code modernization
- Swift idiom implementation

### `recover.mdc`
Error recovery procedures:
- Common Swift error patterns
- Debugging strategies
- Crash report analysis
- Memory issue resolution
- Network problem debugging

## ๐Ÿ“‹ Planning and Documentation Rules

### `prepare.mdc`
Pre-development research and planning:
- Architecture planning
- Component design
- API documentation
- Resource estimation
- Technical spike planning

### `propose.mdc`
Feature and solution proposal structure:
- Requirements analysis
- Technical approach
- Implementation strategy
- Risk assessment
- Timeline estimation

### `create-prompt.mdc`
AI prompt generation for iOS development:
- Feature implementation prompts
- Bug fix descriptions
- Test case generation
- Documentation requests
- Code review guidelines

## ๐Ÿ— Project Management Rules

### `command-rules.mdc`
Custom command system for iOS projects:
- Build commands
- Test automation
- Deployment scripts
- Code generation
- Resource management

### `knowledge-management-rule.mdc`
Project knowledge base management:
- Swift best practices
- iOS patterns
- Common solutions
- Learning resources
- Team guidelines

### `specification-management-rule.mdc`
Requirements and specification handling:
- Feature specifications
- API documentation
- UI/UX requirements
- Performance criteria
- Security requirements

### `visualization-rule.mdc`
Project visualization tools:
- Architecture diagrams
- Workflow charts
- UI flow diagrams
- Data model visualization
- Dependency graphs

## ๐Ÿ”„ Project Organization Rules

### `location-rule.mdc`
File and directory organization:
- Swift file organization
- Resource management
- Project structure
- Module organization
- Asset management

### `on-load-rule.mdc`
Project initialization and setup:
- Environment configuration
- Dependency setup
- Initial checks
- Project validation
- Setup verification

### `project-onboarding-rule.mdc`
New developer onboarding:
- Project setup guide
- Development workflow
- Tool configuration
- Access management
- Environment setup

## ๐Ÿค Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project.

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- The Swift and iOS development community
- Contributors to the Cursor project
- Apple's Swift and iOS documentation

## ๐Ÿ“ฎ Support

For support, please:
1. Check the [documentation](.cursor/docs)
2. Search [existing issues](https://github.com/yourusername/cursor-swift-rules/issues)
3. Create a new issue if needed

---

Made with โค๏ธ for Swift and iOS developers