协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate smart App Store review prompting with configurable trigger conditions, platform detection, and proper timing logic.
Use this skill when the user:
This skill only applies to App Store distributed apps.
Detection steps:
com.apple.application-identifier entitlementSearch for existing implementations:
Grep: "requestReview" or "SKStoreReviewController" or "StoreKit"
Glob: **/*Review*.swift
If found, ask user:
Ask user via AskUserQuestion:
Trigger conditions? (multi-select)
Minimum thresholds?
Cool-down period?
Debug mode?
Generate these files:
ReviewPromptManager.swift - Core logic and timingReviewPromptCondition.swift - Configurable conditionsReviewPromptStorage.swift - Persistence for trackingCheck project structure:
Sources/ exists → Sources/Reviews/App/ exists → App/Reviews/Reviews/For macOS, include:
#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
After generation, provide:
Sources/Reviews/
├── ReviewPromptManager.swift # Core logic
├── ReviewPromptCondition.swift # Conditions enum
└── ReviewPromptStorage.swift # UserDefaults persistence
Option 1: Automatic (Recommended)
@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
// After user completes a significant action
func completeTask() {
// ... task completion logic ...
ReviewPromptManager.shared.recordPositiveAction()
ReviewPromptManager.shared.requestReviewIfAppropriate()
}
ReviewPromptManager.debugAlwaysShow = trueReviewPromptStorage.reset()For custom UI or macOS direct distribution:
// 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