push-notifications
БесплатноБез исполняемых скриптовНе проверенGenerate push notification infrastructure with APNs registration, handling, and rich notifications. Use when adding push notifications, configuring APNs…
от rshankras★ 922 звезды на GitHubОб этом скилле
Push Notifications Generator
Generate push notification infrastructure with APNs registration, handling, and rich notifications.
When This Skill Activates
- User wants to add push notifications to their app
- User mentions APNs (Apple Push Notification service)
- User asks about notification categories or actions
- User wants rich notifications with images or custom UI
Pre-Generation Checks
Before generating, verify:
Existing Notification Code
# Check for existing notification handling grep -r "UNUserNotificationCenter\|registerForRemoteNotifications" --include="*.swift" | head -5Entitlements
# Check for push notification entitlement find . -name "*.entitlements" -exec grep -l "aps-environment" {} \;App Delegate or SwiftUI App
# Determine app structure grep -r "@main\|UIApplicationDelegate" --include="*.swift" | head -5
Configuration Questions
1. Notification Types
- Basic - Simple alerts with title/body
- Rich - Include images, custom UI (requires Notification Service Extension)
- Both - Full notification support
2. Notification Actions
- None - Just display notifications
- Simple Actions - Quick action buttons
- Custom Categories - Multiple action categories
3. Silent Notifications
- Yes - Background data updates
- No - User-visible only
Generated Files
Core Infrastructure
Sources/Notifications/
├── NotificationManager.swift # Central notification management
├── NotificationDelegate.swift # UNUserNotificationCenterDelegate
├── NotificationCategories.swift # Action categories definition
└── NotificationPayload.swift # Type-safe payload parsing
Rich Notifications (Optional)
NotificationServiceExtension/
├── NotificationService.swift # Modify notifications before display
└── Info.plist # Extension configuration
Content Extension (Optional)
NotificationContentExtension/
├── NotificationViewController.swift # Custom notification UI
├── MainInterface.storyboard
└── Info.plist
Key Features
Registration Flow
@MainActor
final class NotificationManager {
static let shared = NotificationManager()
func requestAuthorization() async throws -> Bool {
let center = UNUserNotificationCenter.current()
let options: UNAuthorizationOptions = [.alert, .badge, .sound]
return try await center.requestAuthorization(options: options)
}
func registerForRemoteNotifications() {
UIApplication.shared.registerForRemoteNotifications()
}
}
Handling Notifications
// Foreground notification
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification
) async -> UNNotificationPresentationOptions {
return [.banner, .sound, .badge]
}
// Notification tap/action
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse
) async {
let userInfo = response.notification.request.content.userInfo
await handleNotificationAction(response.actionIdentifier, userInfo: userInfo)
}
Action Categories
enum NotificationCategory: String {
case message = "MESSAGE_CATEGORY"
case reminder = "REMINDER_CATEGORY"
var actions: [UNNotificationAction] {
switch self {
case .message:
return [
UNNotificationAction(identifier: "REPLY", title: "Reply", options: []),
UNNotificationAction(identifier: "MARK_READ", title: "Mark as Read", options: [])
]
case .reminder:
return [
UNNotificationAction(identifier: "COMPLETE", title: "Complete", options: []),
UNNotificationAction(identifier: "SNOOZE", title: "Snooze", options: [])
]
}
}
}
Notification Design (WWDC18)
"Interrupting people is a real privilege… a trust relationship." Design the strategy before the infrastructure:
| Decision | Rule |
|---|---|
| Authorization | Use provisional authorization (add .provisional to the options — delivered quietly to Notification Center, no prompt) for passive content like likes and comments; reserve the explicit prompt for time-critical content |
| When to prompt | Never at first launch. Explain the value first, then ask at a contextually meaningful moment — right after the order is placed, not before the user has ordered |
| Content bar | Every notification carries a specific message or a completable task — never an empty "open the app" nudge |
| Timing | Deliver at relevant times; use time- and location-based delivery where it fits |
| Settings | Offer granular per-topic toggles in-app, and add .providesAppNotificationSettings so "Manage" in system settings deep-links to your page |
| Grouping | App-level grouping is th |
Установить push-notifications в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл push-notifications?
Generate push notification infrastructure with APNs registration, handling, and rich notifications. Use when adding push notifications, configuring APNs, notification categories/actions, or rich notifications with images and custom UI.
Как установить скилл push-notifications?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл push-notifications запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic