$npx -y skills add rshankras/claude-code-apple-skills --skill generatorsCode generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push
| 1 | # Code Generators |
| 2 | |
| 3 | Production-ready code generators for iOS and macOS apps. Unlike advisory skills (review, audit), these skills generate working code tailored to your project. |
| 4 | |
| 5 | ## When This Skill Activates |
| 6 | |
| 7 | Use this skill when the user: |
| 8 | - Wants to add a common app component (logging, analytics, onboarding, etc.) |
| 9 | - Asks to "set up" or "add" infrastructure code |
| 10 | - Mentions replacing print() with proper logging |
| 11 | - Wants to add App Store review prompts |
| 12 | - Needs analytics or crash reporting setup |
| 13 | |
| 14 | ## Key Principles |
| 15 | |
| 16 | ### 1. Context-Aware Generation |
| 17 | Before generating code, skills will: |
| 18 | - Read existing project structure and patterns |
| 19 | - Detect deployment targets and Swift version |
| 20 | - Identify architecture patterns (MVVM, TCA, etc.) |
| 21 | - Check for existing implementations to avoid conflicts |
| 22 | |
| 23 | ### 2. Protocol-Based Architecture |
| 24 | Provider-dependent code uses protocols for easy swapping: |
| 25 | ```swift |
| 26 | protocol AnalyticsService { ... } |
| 27 | class TelemetryDeckAnalytics: AnalyticsService { ... } |
| 28 | class FirebaseAnalytics: AnalyticsService { ... } |
| 29 | // Change provider by swapping ONE line |
| 30 | ``` |
| 31 | |
| 32 | ### 3. Platform Detection |
| 33 | Skills detect iOS vs macOS and App Store vs direct distribution to generate appropriate code. |
| 34 | |
| 35 | ## Available Generators |
| 36 | |
| 37 | Read relevant module files based on the user's needs: |
| 38 | |
| 39 | ### logging-setup/ |
| 40 | Replace print() statements with structured os.log/Logger. |
| 41 | - Audit existing print() usage |
| 42 | - Generate AppLogger infrastructure |
| 43 | - Migrate print → Logger with proper privacy levels |
| 44 | |
| 45 | ### analytics-setup/ |
| 46 | Protocol-based analytics with swappable providers. |
| 47 | - TelemetryDeck, Firebase, Mixpanel support |
| 48 | - NoOp implementation for testing/privacy |
| 49 | - Easy provider switching |
| 50 | |
| 51 | ### onboarding-generator/ |
| 52 | Multi-step onboarding flow with persistence. |
| 53 | - Paged or stepped navigation |
| 54 | - @AppStorage persistence |
| 55 | - Skip option configuration |
| 56 | - Accessibility support |
| 57 | |
| 58 | ### review-prompt/ |
| 59 | Smart App Store review prompts. |
| 60 | - Platform detection (skips for non-App Store macOS) |
| 61 | - Configurable trigger conditions |
| 62 | - Smart timing logic |
| 63 | - Debug override for testing |
| 64 | |
| 65 | ### networking-layer/ |
| 66 | Protocol-based API client with async/await. |
| 67 | - Clean APIClient protocol for mocking/swapping |
| 68 | - Type-safe endpoint definitions |
| 69 | - Comprehensive error handling |
| 70 | - Environment-based configuration |
| 71 | |
| 72 | ### auth-flow/ |
| 73 | Complete authentication flow. |
| 74 | - Sign in with Apple integration |
| 75 | - Biometric authentication (Face ID/Touch ID) |
| 76 | - Secure Keychain storage |
| 77 | - Credential state monitoring |
| 78 | |
| 79 | ### paywall-generator/ |
| 80 | StoreKit 2 subscription paywall. |
| 81 | - Full StoreKit 2 implementation |
| 82 | - Product loading, purchasing, restoring |
| 83 | - Subscription status with Environment |
| 84 | - Beautiful paywall UI |
| 85 | |
| 86 | ### settings-screen/ |
| 87 | Complete settings screen with modular sections. |
| 88 | - Centralized AppSettings with @AppStorage |
| 89 | - Appearance, Notifications, Account, About, Legal sections |
| 90 | - Cross-platform (iOS/macOS) |
| 91 | - Reusable row components |
| 92 | |
| 93 | ### persistence-setup/ |
| 94 | SwiftData persistence with optional iCloud sync. |
| 95 | - SwiftData container configuration |
| 96 | - Repository pattern for testability |
| 97 | - Optional CloudKit/iCloud sync |
| 98 | - Sync status monitoring |
| 99 | - Migration support |
| 100 | |
| 101 | ### error-monitoring/ |
| 102 | Protocol-based crash/error reporting. |
| 103 | - Sentry and Firebase Crashlytics support |
| 104 | - NoOp implementation for testing/privacy |
| 105 | - Breadcrumbs for debugging context |
| 106 | - User context (anonymized) |
| 107 | - Easy provider swapping |
| 108 | |
| 109 | ### ci-cd-setup/ |
| 110 | CI/CD configuration for automated builds and deployment. |
| 111 | - GitHub Actions workflows (build, test, TestFlight, App Store) |
| 112 | - Xcode Cloud scripts and setup guide |
| 113 | - fastlane lanes for advanced automation |
| 114 | - Code signing and secrets management |
| 115 | - macOS notarization support |
| 116 | |
| 117 | ### localization-setup/ |
| 118 | Internationalization (i18n) infrastructure for multi-language apps. |
| 119 | - String Catalogs (iOS 16+, recommended) |
| 120 | - Type-safe L10n enum for compile-time safety |
| 121 | - Pluralization and interpolation patterns |
| 122 | - RTL layout support |
| 123 | - SwiftUI preview helpers for testing locale |