permission-priming
БесплатноБез исполняемых скриптовНе проверенGenerates pre-permission priming screens that explain benefits before showing iOS system permission dialogs. Use when user wants to increase permission grant…
от rshankras★ 922 звезды на GitHubОб этом скилле
Permission Priming Generator
Generate pre-permission priming screens — shown before iOS system permission dialogs to explain WHY the app needs access. Dramatically increases permission grant rates vs. cold-prompting users with the system alert.
When This Skill Activates
Use this skill when the user:
- Asks to "add permission priming" or "pre-permission screen"
- Mentions "explain permissions" or "permission request screen"
- Wants to "ask for camera permission" or "notification permission"
- Asks about "location permission explanation" or "permission grant rate"
- Wants to "prime before requesting access" or "improve opt-in rates"
- Mentions "permission dialog" or "permission flow"
Pre-Generation Checks
1. Project Context Detection
- Check deployment target (iOS 16+ / macOS 13+)
- Check for @Observable support (iOS 17+ / macOS 14+)
- Identify source file locations
2. Existing Permission Code
Search for existing permission handling:
Glob: **/*Permission*.swift, **/*Authorization*.swift
Grep: "requestAuthorization" or "AVCaptureDevice" or "UNUserNotificationCenter" or "CLLocationManager" or "PHPhotoLibrary"
If existing permission code found:
- Ask if user wants to wrap existing calls with priming screens or replace entirely
- If wrapping, integrate priming views upstream of existing request calls
3. Info.plist Usage Description Strings
Search for required usage description keys:
Grep: "NSCameraUsageDescription" or "NSMicrophoneUsageDescription" or "NSLocationWhenInUseUsageDescription" or "NSPhotoLibraryUsageDescription" or "NSContactsUsageDescription" or "NSHealthShareUsageDescription"
If missing keys found for requested permissions:
- Warn user that the app will crash without the corresponding Info.plist entry
- Provide the required key and a suggested description string
Configuration Questions
Ask user via AskUserQuestion:
Which permissions to prime? (multi-select)
- Push Notifications
- Camera
- Photo Library
- Location (When In Use)
- Location (Always)
- Microphone
- Contacts
- Health (HealthKit)
- App Tracking Transparency (ATT)
Priming style?
- Full-screen (dedicated view with illustration, title, benefits, CTA) — recommended
- Alert-style (compact alert-like overlay before system prompt)
- Inline (embedded card within existing content)
Include "Not Now" option?
- Yes (recommended — reduces user frustration, can re-prompt later)
- No (only "Enable" button — more aggressive)
Show benefits illustration?
- SF Symbol (simple, matches system style)
- Custom illustration area (placeholder for designer asset)
- None (text only)
Generation Process
Step 1: Read Templates
Read templates.md for production Swift code.
Step 2: Create Core Files
Generate these files:
PermissionType.swift— Enum of all permission types with metadataPermissionStatus.swift— Unified status enum wrapping platform-specific statusesPermissionManager.swift— @Observable class that checks, requests, and opens Settings
Step 3: Create UI Files
PermissionPrimingView.swift— Pre-permission screen with benefits and CTAPermissionStatusTracker.swift— Monitors status changes from Settings
Step 4: Create Modifier Files
PermissionGatedModifier.swift— ViewModifier that gates content behind permission check
Step 5: Determine File Location
Check project structure:
- If
Sources/exists ->Sources/Permissions/ - If
App/exists ->App/Permissions/ - Otherwise ->
Permissions/
Output Format
After generation, provide:
Files Created
Permissions/
├── PermissionType.swift # Permission enum with metadata
├── PermissionStatus.swift # Unified status wrapper
├── PermissionManager.swift # Check, request, open Settings
├── PermissionPrimingView.swift # Pre-permission priming screen
├── PermissionStatusTracker.swift # Monitor status changes
└── PermissionGatedModifier.swift # Gate content behind permission
Integration Steps
Basic priming before system prompt:
// Show priming screen, then request system permission on tap
PermissionPrimingView(permissionType: .notifications) {
// User granted — proceed with feature
startSendingNotifications()
} onDenied: {
// User denied or tapped "Not Now"
showLaterPrompt()
}
Gate a feature behind permission:
// Camera feature gated behind permission
CameraView()
.permissionGated(.camera) {
// Priming screen shown automatically if not yet authorized
}
In onboarding flow:
struct OnboardingPermissionsView: View {
@State private var permissionManager = PermissionManager()
var body: some View {
VStack(spacing: 32) {
PermissionPrimingView(permissionType: .notifications) {
// Move to next permission
} onDenied: {
//
Установить permission-priming в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл permission-priming?
Generates pre-permission priming screens that explain benefits before showing iOS system permission dialogs. Use when user wants to increase permission grant rates, add pre-permission screens, or explain why the app needs access.
Как установить скилл permission-priming?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл permission-priming запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
patterns
Find patterns worth sharing from recent PRs and repo history, both repeats to fix and good practices worth spreading. Use when a champion wants to know what…
от Anthropiccopilot-cli-quickstart
Use this skill when someone wants to learn GitHub Copilot CLI from scratch. Offers interactive step-by-step tutorials with separate Developer and…
от GitHubvardoger-analyze
Use when the user asks to personalize the GitHub Copilot CLI assistant, adapt Copilot to their style, use vardoger, or analyze their Copilot CLI conversation…
от GitHubpolicy-lookup
Find and explain company policies in plain language. Trigger with "what's our PTO policy", "can I work remotely from another country", "how do expenses work"…
от Anthropic