review-prompt

Generates smart App Store review prompt infrastructure with configurable conditions and platform detection. Use when user wants to add review prompts, request ratings, or implement StoreKit reviews.

110 stars

Best use case

review-prompt is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generates smart App Store review prompt infrastructure with configurable conditions and platform detection. Use when user wants to add review prompts, request ratings, or implement StoreKit reviews.

Teams using review-prompt should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/review-prompt/SKILL.md --create-dirs "https://raw.githubusercontent.com/gustavscirulis/snapgrid/main/.claude/skills/skills/generators/review-prompt/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/review-prompt/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How review-prompt Compares

Feature / Agentreview-promptStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generates smart App Store review prompt infrastructure with configurable conditions and platform detection. Use when user wants to add review prompts, request ratings, or implement StoreKit reviews.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Review Prompt Generator

Generate smart App Store review prompting with configurable trigger conditions, platform detection, and proper timing logic.

## When This Skill Activates

Use this skill when the user:
- Asks to "add review prompt" or "request reviews"
- Mentions "App Store rating" or "app reviews"
- Wants to "prompt for ratings" or "ask for reviews"
- Asks about "StoreKit review" or "SKStoreReviewController"

## Platform Detection (CRITICAL)

**This skill only applies to App Store distributed apps.**

### iOS Apps
- Always applicable (iOS apps require App Store)

### macOS Apps
Detection steps:
1. Check for `com.apple.application-identifier` entitlement
2. Look for Mac App Store related code
3. If unclear, **ASK THE USER**:
   - "Is this app distributed via Mac App Store or direct download?"

### If NOT App Store:
- Explain that StoreKit reviews only work for App Store apps
- Offer alternative: In-app feedback form
- Skip generation or generate feedback form instead

## Pre-Generation Checks

### 1. Project Context Detection
- [ ] Determine platform (iOS/macOS)
- [ ] Check distribution method (App Store vs direct)
- [ ] Search for existing review prompt code
- [ ] Identify App entry point

### 2. Conflict Detection
Search for existing implementations:
```
Grep: "requestReview" or "SKStoreReviewController" or "StoreKit"
Glob: **/*Review*.swift
```

If found, ask user:
- Replace existing implementation?
- Enhance with better timing logic?

## Configuration Questions

Ask user via AskUserQuestion:

1. **Trigger conditions?** (multi-select)
   - Session count (e.g., after 5 sessions)
   - Days since install (e.g., after 3 days)
   - Positive actions (e.g., after completing a task)
   - Feature usage (e.g., after using key feature 3 times)

2. **Minimum thresholds?**
   - Sessions before first prompt: 3-5 (default: 3)
   - Days before first prompt: 2-7 (default: 3)

3. **Cool-down period?**
   - Days between prompts: 30-90 (default: 60)
   - Apple limits to 3 prompts/year anyway

4. **Debug mode?**
   - Include debug override for testing?

## Generation Process

### Step 1: Create Core Files

Generate these files:
1. `ReviewPromptManager.swift` - Core logic and timing
2. `ReviewPromptCondition.swift` - Configurable conditions
3. `ReviewPromptStorage.swift` - Persistence for tracking

### Step 2: Determine File Location

Check project structure:
- If `Sources/` exists → `Sources/Reviews/`
- If `App/` exists → `App/Reviews/`
- Otherwise → `Reviews/`

### Step 3: Add Platform Guards

For macOS, include:
```swift
#if os(macOS)
// Check if running from App Store
guard Bundle.main.appStoreReceiptURL?.lastPathComponent != "sandboxReceipt" else {
    // Running in sandbox but not App Store - skip
    return
}
#endif
```

## Output Format

After generation, provide:

### Files Created
```
Sources/Reviews/
├── ReviewPromptManager.swift      # Core logic
├── ReviewPromptCondition.swift    # Conditions enum
└── ReviewPromptStorage.swift      # UserDefaults persistence
```

### Integration Steps

**Option 1: Automatic (Recommended)**
```swift
@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .onAppear {
                    ReviewPromptManager.shared.incrementSession()
                }
        }
    }
}

// In relevant places (after positive actions):
ReviewPromptManager.shared.recordPositiveAction()
ReviewPromptManager.shared.requestReviewIfAppropriate()
```

**Option 2: Manual Trigger Points**
```swift
// After user completes a significant action
func completeTask() {
    // ... task completion logic ...

    ReviewPromptManager.shared.recordPositiveAction()
    ReviewPromptManager.shared.requestReviewIfAppropriate()
}
```

### Apple's Guidelines
- System limits to 3 prompts per 365-day period
- Prompt appears at system's discretion (not guaranteed)
- Never prompt after negative experience
- Don't prompt on first launch
- Don't interrupt user's workflow

### Testing Instructions

1. **Debug Mode**: Set `ReviewPromptManager.debugAlwaysShow = true`
2. **Reset State**: Call `ReviewPromptStorage.reset()`
3. **Simulate**: Increment sessions/actions in debug builds
4. **Note**: Actual prompt may not show in Simulator

### App Store Review URL (Alternative)
For custom UI or macOS direct distribution:
```swift
// Deep link to App Store review page
let appID = "YOUR_APP_ID"
let url = URL(string: "https://apps.apple.com/app/id\(appID)?action=write-review")!
NSWorkspace.shared.open(url)  // macOS
UIApplication.shared.open(url)  // iOS
```

## References

- **storekit-patterns.md** - Best practices and timing strategies
- **templates/** - All template files

Related Skills

release-review

110
from gustavscirulis/snapgrid

Senior developer-level release review for macOS/iOS apps. Identifies security, privacy, UX, and distribution issues with actionable fixes. Use when preparing an app for release, want a critical review, or before App Store submission.

ui-review-tahoe

110
from gustavscirulis/snapgrid

Comprehensive UI/UX review for macOS Tahoe apps. Covers Liquid Glass design, HIG compliance, SwiftUI patterns, and accessibility. Use when reviewing macOS UI or checking HIG compliance.

ui-review

110
from gustavscirulis/snapgrid

Review SwiftUI code for iOS/watchOS Human Interface Guidelines compliance, font usage, Dynamic Type support, and accessibility. Use when user mentions UI review, HIG, accessibility audit, font checks, or wants to verify interface design against Apple standards.

Review Response Writer

110
from gustavscirulis/snapgrid

Write professional, empathetic responses to App Store reviews that build trust and turn critics into fans.

swiftui-ui-patterns

110
from gustavscirulis/snapgrid

Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.

watchOS

110
from gustavscirulis/snapgrid

watchOS development guidance including SwiftUI for Watch, Watch Connectivity, complications, and watch-specific UI patterns. Use for watchOS code review, best practices, or Watch app development.

visionos-widgets

110
from gustavscirulis/snapgrid

visionOS widget patterns including mounting styles, glass/paper textures, proximity-aware layouts, and spatial widget families. Use when creating or adapting widgets for visionOS.

test-data-factory

110
from gustavscirulis/snapgrid

Generate test fixture factories for your models. Builder pattern and static factories for zero-boilerplate test data. Use when tests need sample data setup.

test-contract

110
from gustavscirulis/snapgrid

Generate protocol/interface test suites that any implementation must pass. Define the contract once, test every implementation. Use when designing protocols or swapping implementations.

tdd-refactor-guard

110
from gustavscirulis/snapgrid

Pre-refactor safety checklist. Verifies test coverage exists before AI modifies existing code. Use before asking AI to refactor anything.

tdd-feature

110
from gustavscirulis/snapgrid

Red-green-refactor scaffold for building new features with TDD. Write failing tests first, then implement to pass. Use when building new features test-first.

tdd-bug-fix

110
from gustavscirulis/snapgrid

Fix bugs using red-green-refactor — reproduce the bug as a failing test first, then fix it. Use when fixing bugs to ensure they never regress.