Back to Skills

push-notification-setup

verified

Implements push notifications across iOS, Android, and web using Firebase Cloud Messaging and native services. Use when adding notification capabilities, handling background messages, or setting up notification channels.

View on GitHub

Marketplace

claude-skills

secondsky/claude-skills

Plugin

push-notification-setup

web

Repository

secondsky/claude-skills
28stars

plugins/push-notification-setup/skills/push-notification-setup/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/push-notification-setup/skills/push-notification-setup/SKILL.md -a claude-code --skill push-notification-setup

Installation paths:

Claude
.claude/skills/push-notification-setup/
Powered by add-skill CLI

Instructions

# Push Notification Setup

Implement push notifications across mobile and web platforms.

## Firebase Cloud Messaging (React Native)

```javascript
import messaging from '@react-native-firebase/messaging';

// Request permission
async function requestPermission() {
  const status = await messaging().requestPermission();
  if (status === messaging.AuthorizationStatus.AUTHORIZED) {
    const token = await messaging().getToken();
    await sendTokenToServer(token);
  }
}

// Handle foreground messages
messaging().onMessage(async message => {
  console.log('Foreground message:', message);
  showLocalNotification(message);
});

// Handle background/quit messages
messaging().setBackgroundMessageHandler(async message => {
  console.log('Background message:', message);
});

// Handle token refresh
messaging().onTokenRefresh(token => {
  sendTokenToServer(token);
});
```

## iOS Native (Swift)

```swift
import UserNotifications

func requestAuthorization() {
    UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in
        if granted {
            DispatchQueue.main.async {
                UIApplication.shared.registerForRemoteNotifications()
            }
        }
    }
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
    sendTokenToServer(token)
}
```

## Android (Kotlin)

```kotlin
class MyFirebaseService : FirebaseMessagingService() {
    override fun onNewToken(token: String) {
        sendTokenToServer(token)
    }

    override fun onMessageReceived(message: RemoteMessage) {
        message.notification?.let {
            showNotification(it.title, it.body)
        }
    }

    private fun showNotification(title: String?, body: String?) {
        val channelId = "default"
        val notification = NotificationCompat.Builder(this, channelId)
            .setContentTi

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2170 chars