mobile-push-notifications
Use when the user asks about push notifications, APNs, FCM HTTP v1, device push tokens, notification payloads, notification channels, silent pushes or Android…
от j4flmao★ 47 звёзд на GitHub
Установить mobile-push-notifications в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Mobile Push Notifications
Purpose
Implement push notifications with correct permission flow, token management, payload design, and foreground/background handling across all mobile platforms.
Agent Protocol
Trigger
User request includes: push notification, APNs, FCM, remote notification, push token, notification payload, notification channel.
Input Context
- Platform (iOS, Android, Flutter, React Native)
- Push service (APNs, FCM, or both)
- Existing notification infrastructure
Output Artifact
A markdown document containing permission flow, token registration and refresh, payload structure (alert, data, silent), foreground/background handling, notification channels (Android), and platform-specific considerations.
Response Format
Code-first. One code block per platform (Swift, Kotlin, Dart/TS) with full implementation. Summarize platform divergence points in bullet list. No preamble. No postamble. No explanations.
Completion Criteria
- Permission flow implemented for all target platforms
- Token registration and refresh handled
- Foreground and background notification handling implemented
- Notification channels defined (Android)
- Payload structure documented (alert, data, silent)
Max Response Length
4096 tokens
Decision Trees
Push Service Selection
Which push service?
├── iOS-only → APNs directly (simpler, no extra dependency)
├── Android-only → FCM directly (required for Play Store apps)
├── iOS + Android → FCM (unified, single server endpoint)
│ └── FCM handles APNs relay for iOS automatically
├── Cross-platform (Flutter/RN) → Firebase Cloud Messaging SDK
│ └── flutter-fire / react-native-firebase handles both platforms
└── Need advanced analytics → Firebase + BigQuery / custom analytics
Notification Type Selection
What type of notification?
├── User-facing alert (new message, order update, reminder)
│ ├── iOS: alert payload with aps.alert, badge, sound
│ └── Android: notification channel with importance level
├── Silent data sync (content sync, cache refresh)
│ ├── iOS: content-available:1, no alert/badge/sound
│ ├── Android: data-only payload, no notification key
│ └── Triggers background processing (30s iOS, variable Android)
├── Rich notification (image, actions, reply)
│ ├── iOS: UNNotificationServiceExtension for media download
│ └── Android: BigPictureStyle, InboxStyle, action buttons
└── Critical alert (health, safety, security)
└── iOS: critical alert entitlement + critical:1 in payload
Permission Strategy
When to request permission?
├── On first launch (preferred: explain why first)
│ ├── Show custom UI explaining notification benefits
│ ├── Then call system permission dialog
│ └── If denied: never prompt again (iOS), can re-prompt (Android)
├── On value moment (after user completes key action)
│ ├── "Enable notifications for order updates?"
│ └── Higher grant rate but later token registration
└── Proactive re-prompt (Android only)
└── Use shouldShowRequestPermissionRationale to check
Workflow
Step 1: Implement Permission Flow
App Launch → Explain why notifications → Request Authorization → Grant → Register Token
Deny → Handle restricted state (show settings link)
Step 2: Register Token and Handle Refresh
Step 3: Handle Foreground vs Background Notifications
Step 4: Define Notification Channels (Android)
Step 5: Configure Server-Side Sending
Step 6: Add Rich Media and Interactive Actions
Permission Flow
iOS — UNUserNotificationCenter
import UserNotifications
import UIKit
class NotificationService: NSObject {
static let shared = NotificationService()
func requestPermission() {
// Show custom pre-permission dialog first for higher grant rate
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound, .badge, .criticalAlert]) { granted, error in
if granted {
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
} else {
// Log denial — may want to show settings redirect later
}
}
}
func getPermissionStatus(completion: @escaping (UNAuthorizationStatus) -> Void) {
UNUserNotificationCenter.current().getNotificationSettings { settings in
completion(settings.authorizationStatus)
}
}
}
Android — NotificationCompat
class NotificationHelper(private val context: Context) {
companion object {
const val CHANNEL_ORDERS = "orders"
const val CHANNEL_CHAT = "chat"
const val CHANNEL_PROMO = "promotions"
}
fun createChannels() {
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val channels = listOf(
NotificationChannel(CHANNEL_ORDERS, "Orders", NotificationManager.IMPORTANCE_HIGH).a
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/apns-guide.md
- references/fcm-guide.md
- references/local-notifications.md
- references/notification-analytics.md
- references/notification-delivery-optimization.md
- references/payload-design.md
- references/permission-flow.md
- references/push-notifications.md
FAQ
Что делает скилл mobile-push-notifications?
Use when the user asks about push notifications, APNs, FCM HTTP v1, device push tokens, notification payloads, notification channels, silent pushes or Android 13 notification permission. Produces permission flow, token handling and server send code. Not for in-app deep link routing (use mobile-deep-linking).
Как установить скилл mobile-push-notifications?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mobile-push-notifications запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…