Generators

From rshankras/claude-code-apple-skills · View interactive version

Generators is an AI agent skill from the GitHub repository rshankras/claude-code-apple-skills. Code 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 notifications, deep

How to use this skill

Skill file

Code Generators

Production-ready code generators for iOS and macOS apps. Unlike advisory skills (review, audit), these skills generate working code tailored to your project.

When This Skill Activates

Use this skill when the user:

Key Principles

1. Context-Aware Generation

Before generating code, skills will:

2. Protocol-Based Architecture

Provider-dependent code uses protocols for easy swapping:

protocol AnalyticsService { ... }
class TelemetryDeckAnalytics: AnalyticsService { ... }
class FirebaseAnalytics: AnalyticsService { ... }
// Change provider by swapping ONE line

3. Platform Detection

Skills detect iOS vs macOS and App Store vs direct distribution to generate appropriate code.

Available Generators

Read relevant module files based on the user's needs:

logging-setup/

Replace print() statements with structured os.log/Logger.

analytics-setup/

Protocol-based analytics with swappable providers.

onboarding-generator/

Value-moment-first onboarding — races a new user to the first felt experience of the app's promised outcome.

review-prompt/

Smart App Store review prompts.

networking-layer/

Protocol-based API client with async/await.

auth-flow/

Complete authentication flow.

paywall-generator/

StoreKit 2 subscription paywall.

settings-screen/

Complete settings screen with modular sections.

persistence-setup/

SwiftData persistence with optional iCloud sync.

error-monitoring/

Protocol-based crash/error reporting.

ci-cd-setup/

CI/CD configuration for automated builds and deployment.

localization-setup/

Internationalization (i18n) infrastructure for multi-language apps.

push-notifications/

Push notification infrastructure with APNs setup.

deep-linking/

Deep linking with URL schemes, Universal Links, and App Intents.

test-generator/

Test templates for unit, integration, and UI tests.

preview-data-generator/

Sample data and a multi-variant #Preview matrix for SwiftUI views.

accessibility-generator/

Accessibility infrastructure for inclusive apps.

widget-generator/

WidgetKit widgets for home screen and lock screen.

app-icon-generator/

Programmatic app icon generation using CoreGraphics.

feature-flags/

Feature flag infrastructure with local and remote support.

live-activity-generator/

ActivityKit Live Activity with Dynamic Island and Lock Screen.

tipkit-generator/

TipKit inline and popover tips with rules and testing.

cloudkit-sync/

CKSyncEngine-based CloudKit sync (iOS 17+).

http-cache/

HTTP caching layer with Cache-Control, ETag, and offline fallback.

pagination/

Pagination infrastructure with offset and cursor patterns.

image-loading/

Image loading pipeline with caching and CachedAsyncImage view.

share-card/

Shareable image cards for social media sharing.

social-export/

Export content to social platforms with correct formats.

subscription-lifecycle/

StoreKit 2 subscription lifecycle management.

referral-system/

Referral and invite system with viral growth mechanics.

watermark-engine/

Watermark overlays for images with paywall integration.

streak-tracker/

Daily/weekly streak tracking with engagement mechanics.

milestone-celebration/

Achievement celebrations with confetti and badges.

whats-new/

What's New screen shown after app updates.

lapsed-user/

Lapsed user detection and re-engagement.

usage-insights/

User-facing usage statistics and activity summaries.

variable-rewards/

Variable reward system with gamification mechanics.

consent-flow/

GDPR/CCPA/DPDP privacy consent management.

account-deletion/

Apple-compliant account deletion flow.

permission-priming/

Pre-permission priming screens for higher grant rates.

force-update/

Minimum version enforcement with update prompts.

state-restoration/

State preservation and restoration across app launches.

debug-menu/

Developer debug menu (DEBUG builds only).

offline-queue/

Offline operation queue with automatic retry.

feedback-form/

In-app feedback collection with smart routing.

announcement-banner/

In-app announcement banners with remote configuration.

quick-win-session/

Guided first-action flows for fast time-to-value.

spotlight-indexing/

Core Spotlight indexing for system search integration.

app-clip/

App Clip target with invocation and upgrade flow.

screenshot-automation/

Automated App Store screenshot generation.

background-processing/

Background task infrastructure with BGTaskScheduler.

app-extensions/

App extension targets for Share, Action, Keyboard, and Safari.

data-export/

Data export/import infrastructure with JSON, CSV, and PDF support.

How to Use

  1. User requests a component (e.g., "add logging to my app")
  2. Read the relevant skill's SKILL.md
  3. Run pre-generation checks (conflicts, deployment target, etc.)
  4. Ask configuration questions via AskUserQuestion
  5. Generate code from templates, adapting to project context
  6. Provide integration instructions

Output Format

After generation, always provide:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.