/cometchat-skills:cometchat-migrate-from-sendbirdfrom cometchat-skills
Migrates an app from Sendbird to CometChat in one prompt, covering Chat SDK, UIKit, Calls, Desk, push, Platform API, and webhooks. Inventories Sendbird usage, swaps features, removes unsupported code, writes a data-migration script, and produces a migration report.
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.
Read when SKILL.md points to them.
Ground truth: the SENDBIRD side (what to look for) is baked in
references/inventory.md+references/feature-map.md— confirm each hit by reading the user's code. The COMETCHAT side is never from memory: symbols come from the target family's skills + catalog, feature existence from that family'sfeatures.json, signatures from the docs via the family's-core/references/docs-map.md(Docs MCP first —RULES.md→ Fetch discipline). REST pages live underDOCS_BASE=https://www.cometchat.com/docs.
cometchat-<family>-core — the init → login → render the migrated app lands on. <family> is resolved in step 1; this skill ASSUMES that core and never restates its code.cometchat-<family>-components / -features / -calls / -push / -customization — pulled in only for the Sendbird features the inventory finds.The user asks to move an app off Sendbird: "migrate my app from Sendbird to CometChat", "replace Sendbird", "switch to CometChat", or "migrate my app to CometChat" when npx @cometchat/skills detect --json reports migrate_from with vendor sendbird. Stream/GetStream apps → cometchat-migrate-from-getstream. An app with BOTH vendors: run both skills, one after the other, into one report.
Data only ("migrate only my data", "import my Sendbird users and messages", "don't change my code", or the app already runs on CometChat) → follow references/data-only.md INSTEAD of the workflow below: it writes and runs the data script and changes nothing else.
The migration request IS the approval (RULES.md → Competitor migration). Run every step below to the end in this one turn:
search_cometchat_docs tool? Say so in your first message, before any edit, with how to connect it (RULES.md → Canonical doc channel), then continue on web docs. Note it in the report.git switch -c cometchat-migration (carries any uncommitted work along; mention that in the report). Never commit, push, or rewrite history. No git → proceed and say so in the report.RULES.md's append-never-replace does not protect Sendbird code. It still protects everything else: touch non-chat code only to rewire it..cometchat/config.json or existing CometChat env values if present; otherwise write the family's env/settings file with clearly-named placeholders so the build still compiles, and make "add your CometChat credentials" action item #1. Never write a real key into a git-tracked file: check git ls-files <file> first. If the file is tracked, put real values in the untracked local variant the framework reads (Vite/Next .env.local, Android local.properties, ...) and keep placeholders in the tracked file. Adding a tracked file to .gitignore does NOT untrack it. The server's REST API key only ever goes into an untracked file or the hosting env.cometchat; (2) the app's platform has no family in this pack (Vue, Unity, .NET, ...) → deliver the inventory + feature map as the report, change nothing; (3) the build was already failing before you started → record the pre-existing errors, migrate anyway, and label them as pre-existing.Every step applies to every app, however small: a 3-file sample still has vendor users and history, so steps 4 (toCometChatId) and 8 (data script) are ALWAYS delivered. Only a step whose subject truly doesn't exist (no server → step 7) may be skipped, and it's listed under Defaults taken as skipped: <why>. A silent skip is a failed migration.
npx @cometchat/skills detect --json → framework, android_variant, existing_cometchat, migrate_from. Resolve <family> exactly like the router (peers.yaml dir_prefix; per-platform targets in references/inventory.md §Target family). Monorepo: migrate every package that uses Sendbird, including the server. existing_cometchat: true + Sendbird still present = a half-finished migration: resume it, don't redo it. Read .cometchat/config.json if it exists: its appId/region/authKey are THE credentials. Write them into the family's untracked env/settings file (single-prompt contract), never ask. Before editing anything, run the app's build once and record whether it passed.references/inventory.md (packages, imports, init/connect, UIKit components, handlers, collections, push registration, Calls, Desk, env vars, server Platform API calls, webhooks, tests/mocks). Record every hit as file:line → what it does. Classify the app: UIKit mode (Sendbird UIKit renders the chat) → the family's CometChat UI Kit replaces it; SDK mode (own UI on the Sendbird Chat SDK) → KEEP the app's UI and port its data layer to the family's CometChat Chat SDK; mixed → both.references/feature-map.md, then check the listed CometChat id in the TARGET family's features.json. Present → migrate. Absent → check BOTH levels — UI Kit (search_cometchat_docs "<feature> <platform> ui kit") AND Chat SDK/REST (... SDK); documented at either → migrate (no UI Kit drop-in is NOT unsupported), built with the SDK method in the app's own UI (RULES.md → UI Kit first, SDK fallback). Mark UNSUPPORTED only when NEITHER has it — and an empty MCP search is NOT proof: follow the verification ladder (re-query with CometChat vocabulary → live-fetch the likely docs page → cross-check the family CATALOG) in references/feature-map.md §Deciding unsupported, before any REMOVE. Never call a feature unsupported from memory or invent an API; if it truly can't be verified, KEEP it as needs-verification. Every UNSUPPORTED row needs evidence in the report — the features.json result + the exact UI Kit AND SDK queries you ran.cometchat-<family>-core (its install, initFromSettings, login gate, render order, env file). Identity: the CometChat UID is the app's existing Sendbird user ID passed through ONE shared toCometChatId() (references/concept-map.md §IDs) — used by the client login, the server token endpoint, AND the data script, so all three agree. Login: the app minted Sendbird session/access tokens on a server → migrate that endpoint (step 7) and use the auth-token login; the app connected with only a user ID → Auth Key login (dev only) + an action item to switch to tokens before production. Keep every identity source, in the same order: whatever decides the current user today (URL params, env vars like VITE_USER_ID, the auth provider, a stored ID, a demo fallback) still decides it after the migration. Only the Sendbird-token-derived path becomes the CometChat auth token. Dropping one silently logs a configured deployment in as someone else. NEVER replace a seeded identity with a placeholder. If the app ships a concrete default user (default_user_id/USER_ID/a demo fallback in strings, env or constants), that exact value STAYS — pass it through toCometChatId(), do not overwrite it with cometchat-uid-1, Cometchat User 1 or any YOUR_* stand-in. The core skill's placeholder UID is for an app that has NO identity yet; an app being migrated always has one. Getting this wrong is silent: the build passes, the app launches, and every migrated user signs in as a stranger with an empty inbox while the data script imported their history under their real id. Before you finish, diff every identity default you touched against its pre-migration value and confirm it is unchanged. Returning users: the app already persists who is signed in (localStorage, keychain, prefs, a cookie) from the vendor era. Gate the chat on CometChat's logged-in user, NOT that cached ID. On start, a stored ID with no CometChat session → run the same login path before rendering any CometChat component; if that fails → the sign-in screen. Otherwise every user who was signed in before the upgrade lands on a broken chat. No UI Kit family for this app? A headless / vanilla-JS app that draws its own UI on SendbirdChat / sendbird (no framework the pack ships a UI Kit for) has no -core to wire — do NOT stop. Install the CometChat Chat SDK for the platform (web → @cometchat/chat-sdk-javascript) and migrate the data layer straight onto it, taking every method from the SDK docs (/sdk/<platform>/*). Keep the app's own UI; there is no UI Kit to install. This is client/SDK mode with no framework core — the concept map's SDK/client-mode section still applies.references/concept-map.md: Sendbird init/connect → CometChat init/login; channel list → conversations; group channel / 1:1 distinct channel → group / user conversation; handlers → listeners (remove them on unmount); message send/receive/edit/delete/threads → the core + -features skill; UIKit screens → the family's components (-components/-placement); theme/string sets → -customization; Calls → -calls (or the headless calls peer); push → -push. Remove each Sendbird import as you replace its last use. Both modes fetch from docs only: UI Kit component props AND SDK method signatures come from the live docs (the family core's docs-map.md), verified against the catalog — never written from memory or ported from the vendor's API shape./rest-api/auth-tokens, REST API key from server env only). Map Sendbird webhooks to CometChat webhooks (/rest-api/management-apis/webhooks/overview); drop or list any event with no equivalent. Replace other Platform API calls with CometChat REST, or remove + list them (step 6).scripts/cometchat-migration/ per references/data-migration.md: export users, channels, members and messages from the Sendbird Platform API → transform with the same toCometChatId() → import through the CometChat Data Import API. When the code migration is done, tell the user the data-import script is ready and ask for the credentials it needs — the source keys (SENDBIRD_APP_ID, SENDBIRD_API_TOKEN) and the CometChat App ID, Region and full-access REST API key. (Asking for these is the ONE question the single-prompt contract allows; everything else still takes the documented default.) As soon as the user provides them, RUN the import yourself from env vars — never write the secrets into a repo file: a --dry-run first (show the users / groups / members / messages counts), then the real import, then report what landed and what failed. Only messages within CometChat's 6-month retention window import — tell the user to reach out to CometChat to import messages older than 6 months. If the user does not share credentials, leave running the script as an action item.Package.swift/*.podspec at the repo root, not just in the app's .xcodeproj — remove the dependency there AND delete any vendored Framework/*.xcframework, or the vendor package is still declared after every call site is gone. Update the app's OWN docs (README, setup/deploy guides, .env.example): setup steps, env var names and screenshots captions that describe Sendbird now describe CometChat. Rename Sendbird-named identifiers (sendbirdUserId → userId).RULES.md → Verification scope).COMETCHAT_MIGRATION.md at the repo root from references/report-template.md, then END your reply with its two lists pasted in full: Removed — not available in CometChat and Your action items. This final list is the deliverable the user asked for; never skip it, even if nothing was removed (say "none").CometChatProvider (and, on web, CometChatErrorBoundary) render wrapper elements exactly where the vendor's provider sat. If they now wrap the app's own shell/header, each wrapper needs a height in the chain, or the chat renders at 0px while the build passes. Follow the core's layout reference, and check the chain from the root element down to the conversation list.a-z 0-9 - _), max 100 characters, and lowercased. Sendbird IDs can contain @, ., spaces or uppercase. Sanitize with one deterministic function and use it everywhere, or users log in to empty inboxes.receiverType: user), not a two-person group.ChannelHandler/GroupChannelHandler/ConnectionHandler needs a CometChat listener that is also removed on unmount/dispose. Missing removals cause duplicate messages.RULES.md → Default-on affordances). Remove the entry point too.GroupChannelCollection/MessageCollection gave offline cache and auto-sync. Port them to the CometChat request builders + listeners and note the behavior change. Don't re-invent a cache.Native builds (Android/iOS/Flutter) have extra REQUIRED steps beyond editing code — bump the sample toolchain to the -core build floors, add the kit dep AND wire initFromSettings in the app entry, port toCometChatId to the client language, edit .pbxproj/.xcscheme as structured build graphs (never a text scrub), and RUN the platform build. A native migration is NOT done until you have followed references/native-build.md in full — open it and work through every step; it is mandatory, not optional.
flutter logs. Fix EVERY runtime error you introduced before declaring done — a Cannot read properties of undefined from a half-migrated reference, or an SDK enum/class read at module-load before the SDK is ready, is a migration bug, not the user's problem (hand off to cometchat-<family>-troubleshooting for symptom → fix). If the app genuinely can't be started here (no dev env / needs a device), SAY SO and give the user the exact run command + what to watch for — never silently skip this.grep -rIilE 'sendbird' . --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=.claude --exclude-dir=Pods --exclude-dir=.dart_tool --exclude-dir=.gradle | grep -vE 'COMETCHAT_MIGRATION.md|scripts/cometchat-migration' → must print nothing (repeated --exclude-dir= flags on purpose: a {a,b} brace list is rejected by the coding agent's command-permission parser, so the check silently never runs). The ONE allowed mention is a single provenance comment above toCometChatId(); code identifiers, README lines and env names are residue, not "expected". This includes a "migrated from " line in the README or any doc you write — a provenance note reads as helpful and is still residue; the migration report is where that belongs, and it is already exempt. Rewrite the app's own README so it describes CometChat, naming the vendor nowhere. The same goes for every other doc the repo ships — CHANGELOG.md, docs/, changelogs/, a vendored SDK's own release notes: if a file is not the migration report, it must not name the vendor. Delete the ones that document the vendor's product rather than your app. Clearing residue out of project.pbxproj / *.xcscheme is a structured edit, never a text scrub — remove the vendor's SPM package reference and its build-phase entries as whole blocks, and keep the project's own product and target structure (see the native block above).scripts/cometchat-migration/migrate.mjs + README.md exist — even for a demo/sample app with no data of its own (the script is a deliverable for the user's real data, not for this checkout; step 8 is never skipped).features.json or the docs. Every UNSUPPORTED item is in the report's Removed list with its files.toCometChatId().git ls-files each file you wrote credentials to).references/concept-map.md (opens in a new tab)references/data-migration.md (opens in a new tab)references/data-only.md (opens in a new tab)references/feature-map.md (opens in a new tab)references/inventory.md (opens in a new tab)references/native-build.md (opens in a new tab)references/report-template.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
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'.Other plugins' skills for the same job