Cometchat Flutter V6 Push
cometchat/cometchat-skills
Add push notifications to a Flutter app with CometChat — FCM on Android, FCM/APNs on iOS, registered through CometChatNotifications with the Dashboard provider as the sender.
A skill your agent uses when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install evanca/flutter-ai-rules firebase-messaging --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/firebase-messaging .claude/skills/firebase-messaging && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .claude/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messagingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install evanca/flutter-ai-rules firebase-messaging --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/firebase-messaging .agents/skills/firebase-messaging && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .agents/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install evanca/flutter-ai-rules firebase-messaging --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/firebase-messaging .cursor/skills/firebase-messaging && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .cursor/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/evanca/flutter-ai-rules.git --path skills/firebase-messaging--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install evanca/flutter-ai-rules firebase-messaging --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/firebase-messaging .gemini/skills/firebase-messaging && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .gemini/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install evanca/flutter-ai-rules firebase-messagingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/firebase-messaging .github/skills/firebase-messaging && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .github/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install evanca/flutter-ai-rules firebase-messaging --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/firebase-messaging .opencode/skills/firebase-messaging && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "firebase-messaging" agent skill from https://github.com/evanca/flutter-ai-rules/tree/main/skills/firebase-messaging into .opencode/skills/firebase-messaging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "firebase-messaging", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
firebase-messagingA skill your agent uses when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).
Firebase Messaging is an agent skill from evanca/flutter-ai-rules. Use when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering Backend development. It works with Firebase, iOS, Android and Flutter. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
flutterFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
googleapis.comfcm.googleapis.comgstatic.comoauth2.googleapis.comAlso links to:
firebase.google.comconsole.firebase.google.compub.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Firebase Messaging loads about 3.2k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,011 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 1,011 words, ~3,201 tokens.
.claude/skills/firebase-messaging/SKILL.md (or your agent's skills folder).This skill defines how to correctly use Firebase Cloud Messaging (FCM) in Flutter applications.
Use this skill when:
flutter pub add firebase_messagingiOS:
Android:
onCreate() and onResume().Web:
firebase-messaging-sw.js in your web/ directory:importScripts("https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js");
importScripts("https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js");
firebase.initializeApp({ /* your config */ });
const messaging = firebase.messaging();
messaging.onBackgroundMessage((message) => {
console.log("onBackgroundMessage", message);
});Foreground messages:
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
print('Foreground message data: ${message.data}');
if (message.notification != null) {
print('Notification: ${message.notification}');
}
});Background messages:
@pragma('vm:entry-point')
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
// Initialize Firebase before using other Firebase services in background
await Firebase.initializeApp();
print("Background message: ${message.messageId}");
}
void main() {
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
runApp(MyApp());
}Background handler rules:
@pragma('vm:entry-point') (Flutter 3.3.0+) to prevent removal during tree shaking in release mode.Firebase.initializeApp() before using any other Firebase services.NotificationSettings settings = await FirebaseMessaging.instance.requestPermission(
alert: true,
badge: true,
sound: true,
announcement: false,
carPlay: false,
criticalAlert: false,
provisional: false,
);
print('Authorization status: ${settings.authorizationStatus}');authorizationStatus returns authorized if the user has not disabled notifications in OS settings.provisional: true) to let users choose notification types after receiving their first notification.Get FCM registration token (use to send messages to a specific device):
final fcmToken = await FirebaseMessaging.instance.getToken();Web — provide VAPID key:
final fcmToken = await FirebaseMessaging.instance.getToken(
vapidKey: "BKagOny0KF_2pCJQ3m....moL0ewzQ8rZu"
);Listen for token refresh:
FirebaseMessaging.instance.onTokenRefresh.listen((fcmToken) {
// Send updated token to your application server
}).onError((err) {
// Handle error
});Apple platforms — ensure APNS token is available before FCM calls:
final apnsToken = await FirebaseMessaging.instance.getAPNSToken();
if (apnsToken != null) {
// Safe to make FCM plugin API requests
}Token Lifecycle (Auth State): Tokens should be tied to user sessions. Save the token to your database when a user signs in, and delete the token (or remove it from the user's document) when they sign out. An FCM token is device-specific, not inherently tied to user auth data — failing to clear it on sign-out means the next user on that device might receive the previous user's notifications.
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: true,
badge: true,
sound: true,
);onMessage stream and manually display a visual cue (using your own UI logic or a local notifications plugin).meta-data to your <application> block in AndroidManifest.xml:<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="high_importance_channel" />Disable auto-init — iOS (Info.plist):
FirebaseMessagingAutoInitEnabled = NODisable auto-init — Android (AndroidManifest.xml):
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false" />
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />Re-enable at runtime:
await FirebaseMessaging.instance.setAutoInitEnabled(true);Important: The iOS simulator does not display images in push notifications. Test on a physical device.
Messaging.serviceExtension().populateNotificationContent() in the extension for image handling.FirebaseMessaging Swift package to your extension target.Firebase/Messaging pod to your Podfile.When a user taps a notification, the app opens (or is brought to the foreground). Handle the interaction in both cases:
App was terminated:
RemoteMessage? initialMessage =
await FirebaseMessaging.instance.getInitialMessage();
if (initialMessage != null) {
// Navigate based on message content
}App was in background:
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
// Navigate based on message content
});Always handle both scenarios to ensure a smooth user experience regardless of app state when the notification was received.
// Subscribe
await FirebaseMessaging.instance.subscribeToTopic("weather_alerts");
// Unsubscribe
await FirebaseMessaging.instance.unsubscribeFromTopic("weather_alerts");Note:
subscribeToTopic()andunsubscribeFromTopic()are not supported for web clients via the Flutter plugin.
The official Firebase documentation often obscures the exact steps for sending a test push notification. To fire a push (test or real) using the Firebase Console:
+ icon to add it.To send real automated push notifications to production users, you must use a server implementation (via the FCM HTTP v1 API or the Firebase Admin SDK) rather than the console.
The legacy FCM server key endpoint was deprecated in June 2024 — HTTP v1 is the only supported option for sending pushes.
To authenticate server-to-server calls for HTTP v1, you need a Service Account:
.json file).FIREBASE_SERVICE_ACCOUNT) to your backend.To send an FCM HTTP v1 message, your backend must:
https://www.googleapis.com/auth/firebase.messaging, endpoint https://oauth2.googleapis.com/token).POST a JSON payload to https://fcm.googleapis.com/v1/projects/{project_id}/messages:send.Here is a minimal, complete working example using Node.js and the google-auth-library:
const { GoogleAuth } = require('google-auth-library');
// Read the securely-stored service account JSON from environment
const credentials = JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT);
async function getAccessToken() {
const auth = new GoogleAuth({
credentials,
scopes: ['https://www.googleapis.com/auth/firebase.messaging']
});
const client = await auth.getClient();
const token = await client.getAccessToken();
return token.token;
}
async function sendPushNotification(fcmToken, title, body) {
const accessToken = await getAccessToken();
const projectId = credentials.project_id;
const url = `https://fcm.googleapis.com/v1/projects/${projectId}/messages:send`;
const payload = {
message: {
token: fcmToken,
notification: {
title: title,
body: body,
},
// Target specific platform features (e.g., channel on Android, sound on iOS)
android: {
notification: {
channel_id: 'high_importance_channel',
}
},
apns: {
payload: {
aps: {
sound: 'default',
}
}
}
}
};
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
return response.json();
}© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/firebase-messaging of evanca/flutter-ai-rules.
Open the folder on GitHubat commit 7b9cce2
Firebase Messaging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Firebase Messaging this skillevanca/flutter-ai-rules | 649 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Cometchat Flutter V6 Pushcometchat/cometchat-skills | 130 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Web3authWeb3Auth/web3auth-examples | 144 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Engine Whats Newflutter/flutter | 179k | — | ~978 | Automated safety check: Pass | BSD-3-Clause | |
| Mobilevc InstallerJayCRL/MobileVC | 209 | — | ~1.2k | Automated safety check: Pass | MIT | |
| SimdeckNativeScript/SimDeck | 152 | — | ~3.6k | Automated safety check: Pass | MIT |
cometchat/cometchat-skills
Add push notifications to a Flutter app with CometChat — FCM on Android, FCM/APNs on iOS, registered through CometChatNotifications with the Dashboard provider as the sender.
Web3Auth/web3auth-examples
Integrates MetaMask Embedded Wallets (Web3Auth) for non-custodial wallets via social login or custom JWT (Firebase, Auth0, Cognito).
flutter/flutter
Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).
JayCRL/MobileVC
Install and start MobileVC — a Claude Code mobile workspace launcher that lets the user run Claude Code on a phone (iOS / Android) with their dev machine as the backend.
NativeScript/SimDeck
A skill your agent uses for simulator lifecycle, app install/launch, live viewing, UI inspection, touch/keyboard automation, screenshots, recordings, logs, pasteboard, hardware controls, and…
software-mansion-labs/skills
Complete onboarding guide for developers who are new to Detour, the open-source deferred deep linking SDK by Software Mansion.
evanca/flutter-ai-rules
A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
evanca/flutter-ai-rules
A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.
evanca/flutter-ai-rules
A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…
evanca/flutter-ai-rules
A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.
evanca/flutter-ai-rules
A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.
evanca/flutter-ai-rules
A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…
Categories
A skill your agent uses when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1). Firebase Messaging is an agent skill from evanca/flutter-ai-rules. Use when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).
Firebase Messaging fits situations like: setting up Firebase Cloud Messaging; managing permissions and tokens; handling background/foreground notification taps; dispatching messages server-side (HTTP v1).
Run `npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a claude-code`. Or copy the skill folder (skills/firebase-messaging in evanca/flutter-ai-rules) into .claude/skills/firebase-messaging in your project. Claude Code loads it when a task matches its description.
Run `npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a codex`. Or copy the skill folder (skills/firebase-messaging in evanca/flutter-ai-rules) into .agents/skills/firebase-messaging in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill firebase-messaging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/firebase-messaging, .gemini/skills/firebase-messaging, .github/skills/firebase-messaging and .opencode/skills/firebase-messaging in your project.
Going by SKILL.md and its folder, Firebase Messaging needs the command-line tools its instructions call (flutter). Our summary lists: Node.js.
SKILL.md names 7 domains. In commands or code: googleapis.com, fcm.googleapis.com, gstatic.com and oauth2.googleapis.com; the agent is likely to contact these when it follows the instructions. As links in the text: firebase.google.com, console.firebase.google.com and pub.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Firebase Messaging is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Firebase Messaging: Cometchat Flutter V6 Push (cometchat/cometchat-skills, 130 stars), Web3auth (Web3Auth/web3auth-examples, 144 stars), Engine Whats New (flutter/flutter, 179k stars) and Mobilevc Installer (JayCRL/MobileVC, 209 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 649 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.
Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.