dentvega/firebase-agent-skills/firebase-messaging
Claude Code and agent skill by dentvega/firebase-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Configures Firebase Cloud Messaging (FCM) for push notifications — APNs key setup, Android FCM v1, requesting permission, getting and storing device tokens, topic subscriptions, sending from Cloud Functions, and deep-linking from notification taps. Use whenever the user wants to send remote push notifications to a web, iOS, or Android app.
Install
npx vskill@latest install dentvega/firebase-agent-skills/firebase-messagingSKILL.md
The same SKILL.md was published earlier as dentvega/firebase-agent-skills/firebase-messaging.
Firebase Cloud Messaging (FCM)
Minimum viable example
Plus an APNs key uploaded to Firebase Console for iOS. Everything else (topics, rich notifications, background handlers) builds on this.
1. Provider setup
iOS (APNs)
- In Apple Developer portal: Keys → create an APNs Authentication Key (.p8). Download once — non-recoverable.
- Firebase Console → Project Settings → Cloud Messaging → Apple app config → upload the .p8, Key ID, and Team ID.
aps-environment must match the build:
developmentfor dev builds / TestFlight internalproductionfor App Store / TestFlight external
Android
FCM works automatically when google-services.json is wired (see firebase-expo). Newer FCM uses HTTP v1; the legacy server key path is deprecated — don't use fcm.googleapis.com/fcm/send from new code.
2. Client setup (Expo / React Native)
Rebuild after editing app.json:
3. Request permission and get token
Store tokens as an array per user (not a single field) — users have multiple devices. Prune dead tokens on send failure (see "sending" below).
4. Receiving messages
Foreground
Background → app opened from notification
Always read routing info from msg.data (custom payload), not msg.notification — the latter is the visible text and may be empty for data-only messages.
Background message handler
Register at the top of index.js (outside React):
5. Sending from a Cloud Function
Always handle the response and prune dead tokens, otherwise the array grows unbounded and every send hits failed deliveries.
6. Topics
For broadcast notifications (e.g. "users who follow team X"), use topics instead of token lists:
Topic names must match [a-zA-Z0-9-_.~%]+. Max 5 topics per device for direct subscriptions, but server-side topic management has no limit.
For Android notification channels, custom sounds, rich notifications with images, and action buttons see references/notification-channels.md.
7. Common mistakes
- Using `expo-notifications` for remote push. It's for local notifications only. Remote FCM requires
@react-native-firebase/messaging. - Not uploading the APNs key. iOS pushes silently fail; Android works fine — easy to miss in testing.
- Reading routing info from `notification` instead of `data`. Data-only messages have no
notificationfield. - Storing one token per user. Users have phones + tablets; store an array and prune on send failures.
- Forgetting `aps-environment`. App Store builds without
"production"will not receive any pushes. - Sending to >500 tokens with `send()`. Use
sendEachForMulticast(up to 500 per call, chunk for more).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/firebase-messaging/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dentvega/firebase-agent-skills/firebase-messaging)