Back to list
fotescodev

notification-expert

by fotescodev

⌚ Claude Watch The first wearable interface for AI-assisted coding. Approve code changes from your wrist. No phone. No laptop. Just tap.

0🍴 0📅 Jan 24, 2026

SKILL.md


name: notification-expert description: Push notification and UNUserNotificationCenter expert. Use when working with APNs, actionable notifications, notification categories, or local notifications on watchOS/iOS. allowed-tools: Read, Write, Edit, Grep, Glob

Push Notification Expert

Instructions

When working with notifications:

  1. Understand the notification flow (APNs -> App -> User)
  2. Properly configure notification categories and actions
  3. Handle both foreground and background delivery
  4. Test notification handling thoroughly

watchOS Notification Patterns

Permission Request

UNUserNotificationCenter.current().requestAuthorization(
    options: [.alert, .sound, .badge]
) { granted, error in
    if granted {
        // Register for remote notifications
        WKExtension.shared().registerForRemoteNotifications()
    }
}

Notification Categories

// Define actions
let approveAction = UNNotificationAction(
    identifier: "APPROVE",
    title: "Approve",
    options: [.foreground]
)

let rejectAction = UNNotificationAction(
    identifier: "REJECT",
    title: "Reject",
    options: [.destructive]
)

// Create category
let category = UNNotificationCategory(
    identifier: "ACTION_CATEGORY",
    actions: [approveAction, rejectAction],
    intentIdentifiers: [],
    options: [.customDismissAction]
)

// Register
UNUserNotificationCenter.current().setNotificationCategories([category])

Handling Responses

extension AppDelegate: UNUserNotificationCenterDelegate {
    func userNotificationCenter(
        _ center: UNUserNotificationCenter,
        didReceive response: UNNotificationResponse,
        withCompletionHandler completionHandler: @escaping () -> Void
    ) {
        switch response.actionIdentifier {
        case "APPROVE":
            // Handle approval
        case "REJECT":
            // Handle rejection
        case UNNotificationDefaultActionIdentifier:
            // User tapped notification body
        case UNNotificationDismissActionIdentifier:
            // User dismissed notification
        default:
            break
        }
        completionHandler()
    }
}

Local Notifications

let content = UNMutableNotificationContent()
content.title = "Action Required"
content.body = "Claude needs your approval"
content.categoryIdentifier = "ACTION_CATEGORY"
content.userInfo = ["action_id": "abc123"]

let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false)
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)

UNUserNotificationCenter.current().add(request)

Best Practices

  • Always handle notification permissions gracefully
  • Use actionable notifications for quick responses
  • Include relevant data in userInfo dictionary
  • Test with both app foreground and background
  • Handle notification dismissal appropriately

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon