cometchat
SkillProductivityEntry 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', '
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the cometchat skill
What this skill tells your AI
The instructions your AI receives, as published by cometchat/cometchat-skills in skills/cometchat/SKILL.md and read by ahel’s review.
Ground truth: the
cometchat detect --jsonoutput + the per-platform*-coreskills this dispatcher routes to + thepackages/registrycatalogs. (Official docs linked below.) Verify symbols against the installed package/source before relying on them.
Use this skill when
The user wants to add CometChat to any kind of project. Trigger phrases:
/cometchat(or invoke the cometchat skill via your agent's mechanism — keyword "cometchat" or "integrate chat" works in most agents)- "add cometchat", "integrate cometchat", "add chat to my app"
- "add messaging", "add chat ui", "add in-app chat"
- Customize an existing CometChat integration — "make the chat match my brand", "change the chat colors / theme", "style the message bubbles", "translate the chat / add a language", "change the notification (or call) sounds". These route through this dispatcher too: detect the framework, then load the family's
*-theming+*-customization(+cometchat-i18nfor localization) skills. If.cometchat/state.jsonalready exists, jump to the Step 7 iteration menu's customization options instead of re-running Phase A.
This is the entry point for every framework. Do NOT invoke framework-specific skills directly — this dispatcher detects the framework first and routes to the right ones.
Supported frameworks:
| Family | Frameworks |
|---|---|
| Web | React (Vite/CRA), Next.js, React Router v6/v7, Astro |
| React Native | Expo (managed + Expo Router), bare RN CLI |
| Angular | Angular 17-21 (standalone components; @cometchat/chat-uikit-angular@5) |
| Android | V6 stable (Compose + Kotlin Views, chatuikit-{compose,kotlin}-android:6.x) / V5 legacy (Java + Kotlin Views, chat-uikit-android:5.x) |
| Flutter | V6 stable (Bloc-based, cometchat_chat_uikit:^6.0) / V5 legacy (GetX-based, cometchat_chat_uikit:^5.2) |
| iOS | V5 stable (Swift; SwiftUI + UIKit hosting; CometChatUIKitSwift:~> 5.1) |
The web family loads @cometchat/chat-uikit-react + @cometchat/chat-sdk-javascript. The RN family loads @cometchat/chat-uikit-react-native + @cometchat/chat-sdk-react-native. The Angular family loads @cometchat/chat-uikit-angular + @cometchat/chat-sdk-javascript. The Android family loads com.cometchat:chatuikit-{compose,kotlin}-android:6.x (V6 — stable, recommended) or com.cometchat:chat-uikit-android:5.x (V5 — legacy) from Maven Central. The Flutter family loads cometchat_chat_uikit:^6.0 (V6 — stable, recommended; calls fold into the same package) or cometchat_chat_uikit:^5.2 (V5 — legacy; pair with cometchat_calls_uikit:^5.0 for calls) from the Cloudsmith Dart pub-hosted registry. The dispatcher decides which set after Step 1's detection.
How v3 works
v3 skills are interactive and conversational. You don't just detect the framework and dump code. You have a conversation with the developer to understand their project, their use case, and exactly where chat should go — THEN you write code that fits.
Pattern skills (loaded from your context as plain files — not via your agent's skill-loading mechanism):
cometchat-core(web) /cometchat-native-core(RN) /cometchat-angular-core(Angular) /cometchat-android-{v5,v6}-core(Android) /cometchat-flutter-{v5,v6}-core(Flutter) — init, login, provider chain, env vars, anti-patternscometchat-components(web) /cometchat-native-components(RN) /cometchat-angular-components(Angular) /cometchat-android-v5-componentsorcometchat-android-v6-{compose,kotlin}-components(Android) /cometchat-flutter-v6-components(V6 only — V5 splits into-conversations/-messages/-users-groups) — component catalog, props, compositioncometchat-placement(web) /cometchat-native-placement(RN) /cometchat-angular-placement(Angular) /cometchat-android-v5-placementorcometchat-android-v6-{compose,kotlin}-placement(Android) /cometchat-flutter-v6-placement(V6 only) — WHERE to put chat- One per-framework skill (
cometchat-{react,nextjs,react-router,astro}-patterns,cometchat-native-{expo,bare}-patterns,cometchat-angular-patterns, the v5/v6 Android sub-tree, or the Flutter v5/v6 sub-tree) — framework-specific details
Key principle: ask, don't assume. Every piece of information you need from the user should be asked explicitly. Don't guess the route path, don't guess where the trigger button goes, don't guess the auth system.
Steps
Clarification contract (ALL coding agents) — read
references/asking-questions.md. Everywhere the steps below say "ask the user", "render anAskUserQuestion", "MUST ask", or "NON-NEGOTIABLE prompt", they mean: follow that contract.AskUserQuestionis only Claude Code's name for it — on Codex / Cursor / Gemini CLI / Windsurf / any agent without that primitive, render the question as a numbered text list and WAIT for a real answer (never default, never infer; auto/approval mode does not authorize skipping). Map the answer by value/label, not ordinal position, accept a free-text fallback, and if running headless, STOP and emit the question rather than guessing. This contract governs every prompt in this skill and all skills it routes to.
Step 1 — Detect framework + map the project
If the CLI itself can't run — degrade, don't dead-end. Every step below calls
npx @cometchat/skills-cli …. That can fail to launch (no network to fetch the package, npx/Node absent, a sandbox that blocks process spawn or the npm registry) — distinct from the CLI running and returning a JSONerror(handled in the error-handling section near the end). When a command can't launch at all:
detect→ detect by hand. Everything the CLI's detector keys on is in the files this step already tells you to read:package.jsondeps (@cometchat/chat-uikit-react→ web,…-react-native→ RN,…-angular→ Angular),pubspec.yaml(Flutter),build.gradle(Android),Podfile/Package.swift(iOS), plus the router/version markers. Determine the framework + version from those and continue.config show→ treat as no saved config; read.cometchat/config.jsondirectly if it exists, else proceed greenfield and ask the questions.- Action commands (
auth login,apply-feature,builder export,verify) genuinely need the CLI. If one can't run, don't silently skip it — tell the user it's unavailable, give the manual dashboard equivalent (e.g. fetch creds from app.cometchat.com → Credentials; toggle the extension in Extensions), and continue best-effort. Never STOP the whole flow just becausenpxis unavailable — manual detection + reading the project is a complete substitute for routing.
First, check if .cometchat/config.json exists:
npx @cometchat/skills-cli config show --json
If config exists with previous answers, tell the user:
"I see you've set up CometChat before. Using your saved config: Framework: {framework}, App: {appId}, Intent: {intent}. Want to continue with these, or start fresh?"
If no config, run detection:
npx @cometchat/skills-cli detect --json
The JSON output includes framework (one of reactjs, nextjs, react-router, astro, expo, react-native, angular, android, flutter, ios, or null), framework-specific fields (router, expo_mode, react_native_version, android_version, flutter_version, env_prefix), and a compatibility.supported flag. If supported is false, stop and surface the warnings.
If framework === null — greenfield with no project at all (ENG-35718)
A null framework means the working directory has no recognizable scaffold — no package.json, no pubspec.yaml, no AndroidManifest.xml, no Podfile, no Xcode project. The earlier behavior dumped the user into a vague "want me to create one?" with two unlabeled options. Replace it with a named-scaffold prompt so the user picks a target deterministically:
"I don't see a project here yet. Want me to create one? Pick the closest match — you can change details after:
- React (Vite) — fastest web demo;
npm create vite@latest cometchat-demo -- --template react-ts- Next.js (App Router) — production-grade web with SSR;
npx create-next-app@latest cometchat-demo --typescript --app- Expo (managed) — fastest mobile demo;
npx create-expo-app@latest cometchat-demo --template- Other — tell me what framework you're using and I'll skip the scaffold step.
What sounds right?"
Render this as an AskUserQuestion with the same 4 options. After the user picks, run the scaffold command, cd into the new directory, then re-run detect so the rest of the dispatcher behaves as if framework had been detected normally. Do NOT proceed to Step 2 without a real framework — every step below assumes one exists.
If the user declines all four (chooses "Other" and then says "no, I just wanted to look around"), stop politely and tell them: "You can run /cometchat again from inside a React / Next.js / Expo / Angular / Android / iOS / Flutter project and I'll detect it automatically." Don't try to integrate into an empty directory — every subsequent step will fail.
Android — android_version is load-bearing. When framework === "android", the detect output includes android_version: "v5" | "v6" | null. The cohort selects which V5 or V6 pattern set to load — V6 (stable + recommended, chatuikit-{compose,kotlin}-android:6.x, Compose + Kotlin Views split) and V5 (legacy, chat-uikit-android:5.x, Java + Kotlin Views) are different SDKs with different APIs. Treat them as separate routing targets even though both live under --family android. V6 went GA 2026-05-25 (docs) — was beta in earlier /cometchat releases; the prompt + recommendation flipped from V5 → V6 in v4.3.0.
If android_version is null, the project is greenfield (no cometchat dep yet). Ask the user:
"Which CometChat Android UI Kit do you want to use? V6 is the latest stable SDK (recommended; Compose + Kotlin Views split, went GA 2026-05-25). V5 is the legacy SDK (Java + Kotlin Views — still supported but no new features)."
Save the choice into .cometchat/config.json under androidVersion:
npx @cometchat/skills-cli config save --android-version v5 --json
The CLI accepts --android-version v5 / v6 and --flutter-version v5 / v6 flags (added 2026-05-22 — F46 fix). Subsequent /cometchat runs read this from config and don't re-ask.
Flutter — flutter_version is load-bearing too. When framework === "flutter", the detect output includes flutter_version: "v5" | "v6" | null. V6 (stable + recommended) is Bloc-based (cometchat_chat_uikit:^6.0, calls folded into the same package). V5 (legacy) is GetX-based (cometchat_chat_uikit:^5.2; pair with cometchat_calls_uikit:^5.0 for calls). The two cohorts have different state-management primitives, different barrel exports, and different theme APIs — never mix them. Same --family flutter install ships both sets; routing picks the right one. V6 went GA 2026-05-25 (docs) at version 6.0.1 — was 6.0.0-beta2 in earlier /cometchat releases; the prompt + recommendation flipped from V5 → V6 in v4.3.0.
If flutter_version is null, ask the user:
"Which CometChat Flutter UI Kit do you want to use? V6 is the latest stable SDK (recommended; Bloc-based, calls folded into the same package, went GA 2026-05-25 at 6.0.1). V5 is the legacy SDK (GetX-based — still supported but no new features)."
Save the choice into .cometchat/config.json under flutter_version.
Then read the project yourself — this is critical.
For web frameworks (reactjs, nextjs, react-router, astro):
package.json— name, dependencies, scripts- The source directory structure — list all directories under
src/orapp/ - Find the router:
createBrowserRouter,app/directory,pages/,react-router.config.ts,astro.config.* - Find the layout:
App.tsx,layout.tsx,root.tsx,Layout.astro - Find the nav: components with "nav", "header", "sidebar" in name
- Find existing pages/routes: list them so you can reference them later
For React Native (expo, react-native):
package.json— name, RN version, all dependencies, scripts- Entry file —
index.jsorApp.{tsx,jsx}orapp/_layout.tsx(Expo Router) - Navigation — look for
@react-navigation/native,@react-navigation/stack,@react-navigation/bottom-tabs, orexpo-router - Existing screens — list all files under
screens/,src/screens/,app/, or wherever routes live - Existing nav structure — read the root navigator to see stack vs tab vs drawer layout
For Angular (angular):
package.json— name,@angular/coreversion (17-21 supported; the v5 kit's peer range is>=17 <22), all@angular/*depsangular.json— workspace config; identify the project name +sourceRoot; thebuild.options.stylesarray (where the kit'scss-variables.cssis registered) + theassetsglob- Bootstrap — standalone:
src/main.ts(bootstrapApplication) +src/app/app.config.ts(providers). v5 is standalone-first — there is no NgModule/CUSTOM_ELEMENTS_SCHEMA. (A legacy NgModule app must migrate to standalone, or pin the v4legacykit — different skill.) - Routing —
src/app/app.routes.ts(provideRouter/loadComponent); list all routes - Layout —
src/app/app.component.{ts,html}; identify nav, sidebar, header components - Existing pages/components — list under
src/app/pages/,src/app/components/, or wherever the project organizes them - Environment files —
src/environments/environment.ts(and.prod.ts); credentials live here, NOT in.env
For Android (android):
settings.gradle(or.kts) — module list; usually:appplus optional library modules- Root
build.gradle(or.kts) — top-level plugins, repositories, classpath versions - App
build.gradle(or.kts) — dependencies (this is where the cometchat dep lives), Android plugin,applicationId,minSdk/targetSdk/compileSdk,buildConfigFieldentries AndroidManifest.xml— root<application>class, permissions,<activity>entries, deep links- Source dirs:
app/src/main/java/<pkg>/(Java) and/orapp/src/main/kotlin/<pkg>/(Kotlin) - For V6 stack split: presence of
androidx.compose.ui:uiorcompose.material3in deps signals Compose; otherwise Kotlin Views (XML layouts underapp/src/main/res/layout/). Many V6 projects have both — ask the user which surface chat lands in. gradle.propertiesandlocal.properties— credentials live here ascometchat.appId=.../cometchat.region=.../cometchat.authKey=..., exposed to code asBuildConfigfields viabuildConfigFieldin the appbuild.gradle. NOT in.env.Applicationclass (e.g.MyApp extends android.app.Application) — init goes inonCreate(). Note the class FQN; you'll wireCometChatUIKit.init(this, settings, callback)here.
For Flutter (flutter):
pubspec.yaml— package name + Dart SDK constraint + Flutter SDK constraint +dependencies:(this is wherecometchat_chat_uikitlives)- For V5: a typical project has BOTH
cometchat_chat_uikit:^5.2ANDcometchat_calls_uikit:^5.0if calls are needed. V6 folds calls into the singlecometchat_chat_uikit:^6.0package (no separate calls package; depends oncometchat_calls_sdk: >=5.0.2 <6.0.0transitively). lib/— Dart source. The app entry islib/main.dart(thevoid main() => runApp(...)site); init goes inmain()or in a top-levelStateful/State.initState().lib/<config>.dart(or similar) — credentials. There is NO Flutter.envconvention — credentials are typically defined asconstDart values in a config file, OR injected at compile time via--dart-define=COMETCHAT_APP_ID=...flags read inside Dart withString.fromEnvironment. NOT a.envfile at runtime.android/app/build.gradleandios/Runner/Info.plist— platform-specific config (FCM service registration, Push capabilities, microphone/camera Info.plist entries for calls). Flutter projects DO have these subdirs but they're configured Flutter-side; do not run the native skill flows.- For V5 vs V6: V5 uses GetX (
getin deps); V6 uses flutter_bloc +equatable. Their controllers, observers, and theming are different — match the integration code to the detected cohort.
For iOS (ios):
<App>.xcodeprojand/or<App>.xcworkspace— Xcode project / workspace. The.xcworkspaceis preferred when CocoaPods is in use (open it, NOT the .xcodeproj).Podfile(CocoaPods) — pinpod 'CometChatUIKitSwift', '~> 5.1'and runpod install. Look forplatform :ios, '13.0'(or higher) — V5 needs iOS 13+.Package.swift(Swift Package Manager) —dependencies:block addshttps://github.com/cometchat/cometchat-uikit-ios. Both SPM and CocoaPods are supported; check which the project uses.- App entry —
<App>App.swift(SwiftUI) orAppDelegate.swift+SceneDelegate.swift(UIKit). Init goes in@main struct App.init()(SwiftUI) orapplication(_:didFinishLaunchingWithOptions:)(UIKit). Info.plist— for calls addNSMicrophoneUsageDescription+NSCameraUsageDescription; for push add the APNs entitlement and aBackgroundModesentry withremote-notification(andvoipfor VoIP push).- Credentials: NO
.envat runtime. Use aSecrets.swiftconst enum/struct (gitignored) or an*.xcconfigfile withCOMETCHAT_APP_ID = ...exposed as Build Settings. The skill teaches both. - Mixed-stack apps (SwiftUI + UIKit): the kit ships UIKit
UIViewControllers and exposes them viaUIViewControllerRepresentablefor SwiftUI hosting. Identify which surface chat lands in (SwiftUI screen vs UIKit nav stack) and follow the matching pattern.
Store this mental map — you'll use it throughout the conversation.
Post-detect order of operations — run these gates IN THIS ORDER
The moment
detect --jsonreturns, run the following in order before you write anything or commit to a plan. Each is detailed in its own subsection below; this is the precedence when more than one applies:
- Pattern skills installed? (see "Pattern skills not installed? — CHECK THIS FIRST") — if the framework's pattern skills aren't loaded, install them and have the user re-run now, before anything else. A late discovery is the worst-timed interruption.
version_conflictgate (see "Version-conflict pre-flight") — STOP if the installed UI Kit major doesn't match what the skills target, or both V5+V6 are declared.coexistencegate (see "Coexistence pre-flight") — STOP if a competing chat/calling SDK is present; carry the Firebase/SW advisories into the push journey.- Step 1.5 "I see you" summary (below) — only once the gates pass, narrate what you found, then continue to Step 2.
Gates 1–3 are hard stops that can each send the user away to fix something; run them before the Step 1.5 summary so you don't narrate a plan you then have to retract. (The subsections appear below in roughly this order, but this list is the authoritative precedence.)
Then show the user what you found — Step 1.5 (the "I see you" moment)
This is the most important moment of the whole flow. After running detection + reading the project, narrate what you found in 3–5 specific, observation-grounded bullets BEFORE asking any question. The user should feel that you understand their project before deciding whether to trust you with it.
The shape (use it verbatim — the structure earns trust):
Taking a look at your project...
- {Framework} + {Build tool} {version} {with TypeScript / JavaScript / etc., as detected}
- {Router or nav state} — {one observation about how routing is set up, or "no router yet" for greenfield}
- {Auth system status} — {"NextAuth detected → I'll wire token-based login", or "no auth detected → I'll start with dev mode + a test user; you can upgrade later"}
- {Existing CometChat state} — {"existing
cometchat/folder with X — I'll patch around it", or "fresh start — no prior CometChat code"}- {One personal observation} — {something specific you noticed: "Tailwind classes throughout", "shadcn/ui components", "monorepo with apps/* and packages/*"}
Ready to set this up? I'll walk you through account setup, then ask where chat should live.
The rules for this moment:
- Be specific, not generic. "Vite + React 19 + TypeScript" beats "a React project." Read the actual versions from
package.json. - Five bullets max. Beyond five, it stops feeling observational and starts feeling like a recital. Cut to what's interesting about the project.
- Lead with what's load-bearing. Framework + version, router, auth, existing CometChat, then one personal touch. The personal touch is what makes it land — show you actually looked.
- Skip the bullet if there's nothing to say. No router on greenfield → say "no router yet"; don't invent one. No auth → say "no auth detected"; don't list every package you didn't find.
- End with a single confident question. Not five questions. The flow continues into Step 2 (credentials) or Step 3 (placement) — let the next step ask.
Examples of good vs bad bullets:
| ✓ Good (specific, observational) | ✗ Bad (generic, unfounded) |
|---|---|
| "Vite + React 19 + TypeScript, Tailwind for styling" | "A React project with TypeScript" |
"React Router v7 detected (routes.ts + react-router.config.ts)" | "Some routing is configured" |
"NextAuth in auth.config.ts — I'll mint CometChat tokens server-side via your existing session cookie" | "Authentication is set up" |
"shadcn/ui detected (components/ui/*) — I'll use your existing Button + Dialog primitives in the chat trigger" | "Some UI components are present" |
"Monorepo: apps/web is your dashboard, apps/marketing is the public site — I'll integrate into apps/web" | "This is a monorepo" |
For greenfield projects (the test case):
Taking a look at your project...
- Vite + React 19 + TypeScript — fresh
cometchat-test-appscaffold- No router yet — for the demo, chat will mount in
src/App.tsxdirectly; we can move it to a route later- No auth system detected — I'll set you up in dev mode; we'll pick a test user (default
cometchat-uid-1throughuid-5) when I confirm credentials in the next step; production auth is a one-flag upgrade later- Fresh start — no existing CometChat code to patch around
Ready to set this up? I'll get you a CometChat account first, then ask where chat should live.
This moment costs ~5 seconds of conversation but anchors the rest. Skip it and the user feels like they're talking to a script. Run it well and the rest of the flow feels effortless.
Shortened here. Read the whole file on GitHub.
Signals
- GitHub stars
- 105
- Forks
- 2
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
cometchat- Source
- github.com/cometchat/cometchat-skills