Skip to content
Skill Authoring
Skill

/push-notification-setup

Implement push notifications for iOS and Android. Covers Firebase Cloud Messaging, Apple Push Notification service, handling notifications, and backend integration.

From plugin
useful-ai-prompts
309200 skills
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill push-notification-setup --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/push-notification-setup

Context preview

The summary Claude sees to decide when to auto-load this skill.

Implement push notifications for iOS and Android. Covers Firebase Cloud Messaging, Apple Push Notification service, handling notifications, and backend integration.

SKILL.md

push-notification-setup.SKILL.md
name: push-notification-setup
description: >
  Implement push notifications for iOS and Android. Covers Firebase Cloud
  Messaging, Apple Push Notification service, handling notifications, and
  backend integration.

Push Notification Setup

Table of Contents

  • [Overview](#overview)
  • [When to Use](#when-to-use)
  • [Quick Start](#quick-start)
  • [Reference Guides](#reference-guides)
  • [Best Practices](#best-practices)

Overview

Implement comprehensive push notification systems for iOS and Android applications using Firebase Cloud Messaging and native platform services.

When to Use

  • Sending real-time notifications to users
  • Implementing user engagement features
  • Deep linking from notifications to specific screens
  • Handling silent/background notifications
  • Tracking notification analytics

Quick Start

Minimal working example:

import messaging from "@react-native-firebase/messaging";
import { Platform } from "react-native";

export async function initializeFirebase() {
  try {
    if (Platform.OS === "ios") {
      const permission = await messaging().requestPermission();
      if (permission === messaging.AuthorizationStatus.AUTHORIZED) {
        console.log("iOS notification permission granted");
      }
    }

    const token = await messaging().getToken();
    console.log("FCM Token:", token);
    await saveTokenToBackend(token);

    messaging().onTokenRefresh(async (newToken) => {
      await saveTokenToBackend(newToken);
    });

    messaging().onMessage(async (remoteMessage) => {
      console.log("Notification received:", remoteMessage);
      showLocalNotification(remoteMessage);
    });

// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents | |---|---| | [Firebase Cloud Messaging Setup](references/firebase-cloud-messaging-setup.md) | Firebase Cloud Messaging Setup | | [iOS Native Setup with Swift](references/ios-native-setup-with-swift.md) | iOS Native Setup with Swift | | [Android Setup with Kotlin](references/android-setup-with-kotlin.md) | Android Setup with Kotlin | | [Flutter Implementation](references/flutter-implementation.md) | Flutter Implementation |

Best Practices

✅ DO

  • Request permission before sending notifications
  • Implement token refresh handling
  • Use different notification channels by priority
  • Validate tokens regularly
  • Track notification delivery
  • Implement deep linking
  • Handle notifications in all app states
  • Use silent notifications for data sync
  • Store tokens securely on backend
  • Provide user notification preferences
  • Test on real devices

❌ DON'T

  • Send excessive notifications
  • Send without permission
  • Store tokens insecurely
  • Ignore notification failures
  • Send sensitive data in payload
  • Use notifications for spam
  • Forget to handle background notifications
  • Make blocking calls in handlers
  • Send duplicate notifications
  • Ignore user preferences
Read more
Ships withuseful-ai-prompts

488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.

Get the whole plugin