/cometchat-skills:cometchat-flutter-v6-pushfrom cometchat-skills
Adds push notifications to a Flutter app with CometChat — FCM on Android, FCM/APNs on iOS. Fetches Firebase setup from CometChat docs; bakes SDK symbols and token lifecycle.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ground truth — DOCS-FIRST. Push is an EXTERNAL integration (a Firebase project, native config on both platforms, and a Dashboard provider), not a UI Kit widget. The current setup lives in CometChat's notifications docs — FETCH them, via
../cometchat-flutter-v6-core/references/docs-map.md→/notifications/push-overview·/notifications/flutter-push-notifications-android·/notifications/flutter-push-notifications-ios. (The old singular/notifications/flutter-push-notificationsnow redirects to a legacy page — use the per-platform pages above.) This skill bakes ONLY the SDK symbols (verified vscometchat_sdk5.0.6) and the hardening deltas. Symbols baked; the step-by-step is fetched.
cometchat-flutter-v6-core — install, credentials, init→login→render. This skill ASSUMES it (push registers AFTER login, on the SAME SDK).cometchat-flutter-v6-events — the listener lifecycle; a push registration is a lifecycle-bound side effect."add push notifications", "FCM push", "notify me when the app is closed / backgrounded".
google-services.json / GoogleService-Info.plist placement, the Gradle/Podfile changes, and (iOS) the APNs key upload. If the docs are wrong or missing a step, that is a DOCS gap — flag it (RULES.md §20), don't bake a permanent workaround.flutter pub add firebase_core firebase_messaging. CometChatNotifications ships with the already-installed cometchat_sdk — no extra CometChat package.import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
// Register AFTER login, with the token you got from firebase_messaging getToken().
Future<void> registerPush(String fcmToken, String providerId) async {
await CometChatNotifications.registerPushToken(
PushPlatforms.FCM_FLUTTER_ANDROID, // FCM_FLUTTER_IOS on iOS; for a raw APNs token use APNS_FLUTTER_DEVICE / APNS_FLUTTER_VOIP (there is NO plain PushPlatforms.APNS)
providerId: providerId, // from the Dashboard provider you configured
fcmToken: fcmToken,
onSuccess: (res) {},
onError: (e) {},
);
}
// On logout — otherwise the device keeps receiving the previous user's messages.
Future<void> unregisterPush() async {
await CometChatNotifications.unregisterPushToken(onSuccess: (res) {}, onError: (e) {});
}
PushPlatformsis an enum with per-platform Flutter variants — pick the one matching the running platform and the token type (fcmTokenvsdeviceTokenvsvoipToken). Do not pass an FCM token as adeviceToken.
login succeeds — a token registered against no user goes nowhere.onTokenRefresh and re-register, or delivery silently stops days later.CometChatUIKit.logout() — otherwise the next user of that device receives the previous user's notifications. This is a privacy bug, not just a nuisance.On a REAL device: permission granted → the token registers after login (no error) → background the app → a message from another user produces a notification → tapping it opens the app → logging out stops delivery to that device. Nothing arriving with a clean client almost always means the Dashboard provider or the platform credential (APNs key / google-services.json), not your Dart.
Live delivery is a manual device check — it cannot be automated here. Say so honestly rather than claiming verification you did not do.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'./cometchat-analyticsSee what your chat is doing — pull usage & message metrics via REST, stream real-time events to your data/observability stack via webhooks, monitor client-side errors & the init/login path, and read push/call logs. Cross-family: metrics/webhooks are server-side; client error monitoring wires per family. Triggers: 'chat analytics', 'usage metrics', 'message volume', 'monitor cometchat', 'observability', 'send chat events to datadog/segment/bigquery', 'track delivery', 'error monitoring for chat', 'dashboards for chat'./cometchat-android-v5-calls-sdkAdd voice & video calling to any Android app FROM SCRATCH with the headless CometChat Calls SDK v5 (`com.cometchat:calls-sdk-android:5.0.4`) — no UI Kit. Kotlin: initFromSettings→login→generateToken→joinSession into a RelativeLayout, lifecycle-bound listeners, meet-style session rooms AND 1:1 ringing (Chat SDK v5 signaling + Calls SDK media), call logs, layouts, audio modes, recording, PiP, background service. Triggers: 'add calling from scratch android', 'standalone video call kotlin', 'headless calls sdk android', 'build my own call UI android', 'meeting room join by session id android', 'one-on-one ringing call without uikit android'./cometchat-android-v5-sdkBuild chat on Android with the headless CometChat Chat SDK v5 and your OWN UI — init/login ordering, the method map, request-builder pagination, listener lifecycle, and a production-ready app surface (optimistic updates, error states, sized shell). Use when the app needs custom UI instead of the drop-in UI Kit. Triggers: 'cometchat android sdk', 'chat with my own ui android', 'headless cometchat android', 'send message with chat-sdk-android', 'cometchat message listener kotlin'./cometchat-android-v6-builder-settingsThe CometChat Android v6 settings and session API reference — the assets/cometchat-settings.json file that initFromSettings reads (appId, region, credentials, uiKit toggles), the legacy UIKitSettings builder, and the CometChatUIKit session methods (login, loginWithAuthToken, logout, getLoggedInUser, createUser). Use when configuring init options or wiring auth beyond the core golden path. Triggers: 'cometchat settings json android', 'uikitsettings builder options', 'login with auth token android', 'create a cometchat user from the app', 'enable calling in settings'.Other plugins' skills for the same job