Agent skill

Cometchat React Native SDK

by cometchat in cometchat/cometchat-skills

The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle.

MITAuto-check passedMobile

Install Cometchat React Native SDK

skills CLI
$ npx skills add cometchat/cometchat-skills --skill cometchat-react-native-sdk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cometchat/cometchat-skills cometchat-react-native-sdk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cometchat/cometchat-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cometchat-react-native-sdk .claude/skills/cometchat-react-native-sdk && rm -rf skills-src

Use ~/.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/

Facts

Skill name
cometchat-react-native-sdk
GitHub stars
129
Token cost
~1.8k tokens
SKILL.md length
689 words
Files
3 (incl. references)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle.

  • Works in 7 steps: Dropping the listener cleanup —… → Calling a bare sendMessage() —… → Inventing sendCardMessage() — card… → …
  • The UI Kit has no component for what you need
  • SKILL.md covers Companion skills (read first), Use this skill when, Prerequisites & install and The rule: UI Kit first, SDK as…, plus 6 more sections
  • Calls npm; needs AUTH_KEY

What it does

Cometchat React Native SDK is an agent skill from cometchat/cometchat-skills. The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle. Use when the UI Kit has no component for what you need, or when building a fully custom chat UI. Triggers: CometChat SDK React Native, headless chat RN, custom chat UI React Native, sendMessage React Native, CometChat listener leak, banned members RN, change my avatar, update my profile, update user details React Native, log the user out.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/method-map.md` and `references/page-map.md`). Compatibility notes: React Native =0.77; @cometchat/chat-sdk-react-native ^4.0.28

It sits in Mobile, covering Cross-platform mobile apps and Design systems. It works with CometChat and React Native. The repository describes itself as: Add CometChat chat & messaging and voice & video calls to any React, Next.js, React Native, Angular, Android, iOS, or Flutter project through your AI coding agent. Works with… The licence is MIT.

When your agent uses it

  • The UI Kit has no component for what you need
  • Building a fully custom chat UI

Example prompts

  • “/cometchat-react-native-sdk”

Requirements

  • Node.js
  • A credential in AUTH_KEY
  • Compatibility (from SKILL.md): React Native >=0.77; @cometchat/chat-sdk-react-native ^4.0.28

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Dropping the listener cleanup — duplicate messages that grow over time.
  2. Calling a bare sendMessage() — everything is namespaced under CometChat.
  3. Inventing sendCardMessage() — card messages are receive-only.
  4. awaiting startTyping — it returns void.
  5. Treating getLoggedinUser() returning null as an error — it is the normal no-session answer. (Note the lowercase in.)
  6. Shipping ban without unban — CometChatGroupMembers shows active members only; wire BannedMembersRequestBuilder + unbanGroupMember too.
  7. Registering a push token before login resolves — it belongs to no user.

What it can do on your machine

Read from SKILL.md and the folder at commit 911b108. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AUTH_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    React Native >=0.77; @cometchat/chat-sdk-react-native ^4.0.28

    From compatibility in the SKILL.md frontmatter.

Context cost

Cometchat React Native SDK loads about 1.8k tokens when it runs, and up to ~8.8k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 689 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from cometchat/cometchat-skills at commit 911b108, republished under its MIT licence (© cometchat). 689 words, ~1,775 tokens.

Download SKILL.mdSave it as .claude/skills/cometchat-react-native-sdk/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cometchat-react-native-sdk
description
The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle. Use when the UI Kit has no component for what you need, or when building a fully custom chat UI. Triggers: CometChat SDK React Native, headless chat RN, custom chat UI React Native, sendMessage React Native, CometChat listener leak, banned members RN, change my avatar, update my profile, update user details React Native, log the user out.
compatibility
React Native >=0.77; @cometchat/chat-sdk-react-native ^4.0.28
license
MIT
metadata.author
CometChat
metadata.version
1.0.0
metadata.tags
chat cometchat react-native sdk headless methods listeners fallback

Ground truth: @cometchat/chat-sdk-react-native@4 + catalog rn-sdk-v4.json (317 symbols). Signatures in references/method-map.md are verbatim from the installed .d.ts, not from prose. Docs: /sdk/react-native/llms-react-native-v4.md (scoped index).

Companion skills (read first)

  • cometchat-react-native-core — install, provider chain, init→login→render. Assumed, not repeated here.

Use this skill when

  • the UI Kit has no component for what you need — the common case, see below
  • "build my own chat UI" · "just give me the data layer" · "sendMessage in React Native"
  • "duplicate messages" · "listener leak" · "how do I page through history"

Prerequisites & install

The SDK ships under the UI Kit — if core is installed, so is this. A headless-only app installs it alone:

bash
npm install @cometchat/chat-sdk-react-native@4 @react-native-async-storage/async-storage@^2.1.2

⚠️ Not @cometchat/chat-sdk-javascript — that is the web package.

The rule: UI Kit first, SDK as fallback

For any feature, check whether the UI Kit has a component (components skill + the catalog). If it does, use it. Reach for the SDK only when it does not.

On React Native that fallback path is not rare. Kit v5 removed the detail and management screens, so these have no component at all and are pure SDK work:

NeedWhy there is no componentMap section
user / group detailsCometChatDetails removed in v5Users & groups
add membersCometChatAddMembers removedUsers & groups
view / unban banned membersno UI surface exists at allUsers & groups
transfer ownershipCometChatTransferOwnership removedUsers & groups
call log detailonly the list shipsCalls

The maps — page-wise first

references/page-map.md — the primary index, page-wise like the JavaScript SDK repo: intent → the docs page → the methods that page demonstrates → the contract facts the RN page does not carry. 37 pages, derived from the live docs so it cannot drift. Start here.

references/method-map.md — the per-method companion for when you already know the method and need its exact signature, return type and constraints. 80 methods, 127/127 accounted for.

Both open with the same fallback ladder, and it matters: these cover most of the SDK, not all of it, so "not listed" never means "does not exist." Rung 2 is the catalog — that, not a map, is the existence authority.

Load page-map.md for any SDK question. It answers, per method: signature, what it resolves to, what it rejects with, prerequisites, and what it will refuse to do. That last one matters most — it records negative facts a docs page cannot express by omission, e.g. there is no sendCardMessage(), which an agent would otherwise invent by symmetry with the three send methods that do exist.

Each row is marked D (backed by the RN docs) or T (recovered from the .d.ts because the RN page is thin — RN-G15). Do not present a T row as documented; it is correct, and the docs gap is real.

Show full SKILL.md (250 more words)Show less

Ordering — the invariant

Init (initFromSettings) must resolve before login(). login() must resolve before you fetch or send. Anything else fails quietly rather than throwing.

tsx
import { CometChat } from "@cometchat/chat-sdk-react-native";

// DEFAULT via skills: the ai-agent / telemetry-attributed init — persists integrationSource="ai-agent"
// (RULES §Ordering), the SDK sibling of the UI Kit's initFromSettings. Web/JS settings-OBJECT form,
// NOT the classic AppSettingsBuilder + init(APP_ID, settings). initFromSettings is @nodoc (ai-agent-only).
await CometChat.initFromSettings({
  appId: APP_ID,
  region: REGION,
  credentials: { authKey: AUTH_KEY },                        // dev only; prod logs in with an auth token
  chatSDK: { presenceSubscription: { type: "ALL_USERS" } },  // = the old .subscribePresenceForAllUsers()
});
await CometChat.login(UID, AUTH_KEY);   // dev only; production passes an auth token

// FALLBACK only (non-skills / doc-following context) — the publicly-documented classic path:
//   const settings = new CometChat.AppSettingsBuilder()
//     .setRegion(REGION).subscribePresenceForAllUsers().autoEstablishSocketConnection(true).build();
//   await CometChat.init(APP_ID, settings);

⚠️ login is variadic and untyped in the .d.ts (login(...args: any)), so TypeScript will not catch a wrong call. The two real shapes are login(uid, authKey) and login(authToken).

Listener lifecycle — the defect this skill exists to prevent

tsx
useEffect(() => {
  const id = "chat-screen";
  CometChat.addMessageListener(id, new CometChat.MessageListener({
    onTextMessageReceived: (m) => setMessages((prev) => [...prev, m]),
  }));
  return () => CometChat.removeMessageListener(id);   // NOT optional
}, []);

addMessageListener returns void, not a subscription — the string id is your only handle. The SDK holds the listener, not React, so it survives navigation and unmount. Omitting the cleanup is the top cause of duplicate messages, and it worsens the longer the app runs.

Fetching is always a builder

Lists are paginated: new CometChat.XRequestBuilder().setLimit(n).build() then .fetchNext(). An empty array means the end — it does not throw. There is no bare getMessages().

Common pitfalls

  1. Dropping the listener cleanup — duplicate messages that grow over time.
  2. Calling a bare sendMessage() — everything is namespaced under CometChat.
  3. Inventing sendCardMessage() — card messages are receive-only.
  4. awaiting startTyping — it returns void.
  5. Treating getLoggedinUser() returning null as an error — it is the normal no-session answer. (Note the lowercase in.)
  6. Shipping ban without unban — CometChatGroupMembers shows active members only; wire BannedMembersRequestBuilder + unbanGroupMember too.
  7. Registering a push token before login resolves — it belongs to no user.

Verify it works

  • Every symbol appears in catalogs/rn-sdk-v4.json.
  • npm run verify:fences:rn-v5 is green.
  • Every add*Listener has a matching remove*Listener on the teardown path.
  • Pagination, error handling and the ban round trip are wired — not just the happy path.

© cometchat, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/cometchat-react-native-sdk of cometchat/cometchat-skills.

  • SKILL.md
  • references/method-map.md
  • references/page-map.md

Open the folder on GitHubat commit 911b108

Compare with similar skills

Cometchat React Native SDK 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.

Cometchat React Native SDK compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cometchat React Native SDK this skillcometchat/cometchat-skills129—~1.8kAutomated safety check: PassMIT
Expo Design Systempproenca/dot-skills214—~3.5kAutomated safety check: PassMIT
Frontend UI StandardsMaxHan7/frontend-ui-standards-skill106—~2.4kAutomated safety check: PassMIT
Frontend Designavibebuilder/claude-prime120—~2.1kAutomated safety check: PassMIT
UniwindOhh-889/skyroc795—~1.4kAutomated safety check: PassMIT
Design SystemWrongStack/WrongStack368—~3.9kAutomated safety check: PassMIT

Similar skills

  • Expo Design System

    pproenca/dot-skills

    Airbnb-DLS-aligned design system engineering for Expo / React Native apps targeting both web and native iOS, built on Unistyles v3, Reanimated, Skia, and FlashList.

    214 GitHub stars~3.5k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Frontend UI Standards

    MaxHan7/frontend-ui-standards-skill

    A skill your agent uses when implementing, refactoring, or reviewing frontend UI across SwiftUI, React, React Native, Flutter, web, or mobile apps.

    106 GitHub stars~2.4k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Frontend Design

    avibebuilder/claude-prime

    Builds distinctive, production-grade UIs that avoid generic AI aesthetics.

    120 GitHub stars~2.1k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Uniwind

    Ohh-889/skyroc

    Uniwind — Tailwind CSS v4 styling for React Native. An agent skill from Ohh-889/skyroc.

    795 GitHub stars~1.4k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Design System

    WrongStack/WrongStack

    Use this skill BEFORE writing or restyling ANY user-facing interface.

    368 GitHub stars~3.9k tokensUpdated today
    Frontend & DesignAuto-check passed
  • JSON Render Catalog

    yonatangross/orchestkit

    json-render component catalog patterns for AI-safe generative UI.

    288 GitHub stars~6.4k tokensUpdated today
    Frontend & DesignAuto-check passed

More from cometchat/cometchat-skills

All 97 skills in this repo
  • CometChat Android Calls SDK v5

    cometchat/cometchat-skills

    Adds voice and video calling to an Android app in Kotlin with the headless CometChat Calls SDK v5, covering meeting-style rooms, 1:1 ringing calls, call logs and recording.

    129 GitHub stars~5.2k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Android v5 Headless SDK

    cometchat/cometchat-skills

    Builds chat on Android with your own UI against the headless CometChat Chat SDK v5, covering install, Jetifier conflicts, credentials and init-before-login ordering.

    129 GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Component Picker

    cometchat/cometchat-skills

    Picks and customizes CometChat's Angular UI Kit components by their verified component list, exact input and output event names, and the surfaces that have no kit component at all.

    129 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Features

    cometchat/cometchat-skills

    Enables or builds CometChat features such as polls, reactions, smart replies and pinned messages in an Angular app, first classifying how much client code each one needs.

    129 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Chat Placement

    cometchat/cometchat-skills

    Decides where CometChat chat UI goes in an Angular app: a dedicated route, a dashboard panel, a support widget or the full multi-pane app, with thread and search panels.

    129 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Cometchat iOS V5 SDK

    cometchat/cometchat-skills

    Add voice & video calling to any iOS app FROM SCRATCH with the headless CometChat Calls SDK v5 (CometChatCallsSDK, via Swift Package Manager) — no UI Kit.

    129 GitHub stars~5.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Cometchat React Native SDK

What does Cometchat React Native SDK do?

The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle. Cometchat React Native SDK is an agent skill from cometchat/cometchat-skills. The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle.

When should I use Cometchat React Native SDK?

Cometchat React Native SDK fits situations like: the UI Kit has no component for what you need; building a fully custom chat UI.

How do I install Cometchat React Native SDK in Claude Code?

Run `npx skills add cometchat/cometchat-skills --skill cometchat-react-native-sdk -a claude-code`. Or copy the skill folder (skills/cometchat-react-native-sdk in cometchat/cometchat-skills) into .claude/skills/cometchat-react-native-sdk in your project. Claude Code loads it when a task matches its description.

How do I install Cometchat React Native SDK in Codex?

Run `npx skills add cometchat/cometchat-skills --skill cometchat-react-native-sdk -a codex`. Or copy the skill folder (skills/cometchat-react-native-sdk in cometchat/cometchat-skills) into .agents/skills/cometchat-react-native-sdk in your project. Codex loads it when a task matches its description.

Can I use Cometchat React Native SDK in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cometchat/cometchat-skills --skill cometchat-react-native-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cometchat-react-native-sdk, .gemini/skills/cometchat-react-native-sdk, .github/skills/cometchat-react-native-sdk and .opencode/skills/cometchat-react-native-sdk in your project.

What does Cometchat React Native SDK need to run?

Going by SKILL.md and its folder, Cometchat React Native SDK needs the command-line tools its instructions call (npm) and credentials named AUTH_KEY. Our summary lists: Node.js; A credential in AUTH_KEY. Compatibility (from SKILL.md): React Native >=0.77; @cometchat/chat-sdk-react-native ^4.0.28.

Does Cometchat React Native SDK access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cometchat React Native SDK safe to install?

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.

What licence does Cometchat React Native SDK use?

Cometchat React Native SDK is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cometchat React Native SDK use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7k tokens, read only when the agent opens those files.

What are the alternatives to Cometchat React Native SDK?

Skills that share tags, products or a category with Cometchat React Native SDK: Expo Design System (pproenca/dot-skills, 214 stars), Frontend UI Standards (MaxHan7/frontend-ui-standards-skill, 106 stars), Frontend Design (avibebuilder/claude-prime, 120 stars) and Uniwind (Ohh-889/skyroc, 795 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cometchat React Native SDK?

cometchat (a GitHub organization) maintains it in cometchat/cometchat-skills, which has 129 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 5, 2026.

Source: cometchat/cometchat-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.