Agent skill

Cometchat React Native Testing

by cometchat in cometchat/cometchat-skills

Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove.

MITAuto-check passedTesting & QA

Install Cometchat React Native Testing

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

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

GitHub CLI
$ gh skill install cometchat/cometchat-skills cometchat-react-native-testing --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-testing .claude/skills/cometchat-react-native-testing && 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-testing
GitHub stars
129
Token cost
~997 tokens
SKILL.md length
398 words
Files
1
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove.

  • Works in 5 steps: Unmocked native peers — confusing… → Asserting kit internals — breaks on… → Real credentials in tests — network… → …
  • Tasks that involve Unit testing
  • SKILL.md covers Companion skills (read first), Use this skill when, Prerequisites & install and Mock the SDK — never let a…, plus 5 more sections
  • Calls npm

What it does

Cometchat React Native Testing is an agent skill from cometchat/cometchat-skills. Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove. Triggers: test CometChat React Native, mock CometChat SDK jest, detox CometChat, unit test chat screen RN, CI tests for chat.

Its SKILL.md is about 1000 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: React Native =0.77; Jest; @testing-library/react-native; Detox (e2e)

It sits in Testing & QA, covering Unit testing and Cross-platform mobile apps. It works with CometChat, React Native and Jest. 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

  • Tasks that involve Unit testing
  • Tasks that involve Cross-platform mobile apps

Example prompts

  • “/cometchat-react-native-testing”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): React Native >=0.77; Jest; @testing-library/react-native; Detox (e2e)

Workflow steps

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

  1. Unmocked native peers — confusing NativeModule errors.
  2. Asserting kit internals — breaks on minor upgrades.
  3. Real credentials in tests — network flakes and leaked keys.
  4. Claiming push/calls coverage from a simulator run.
  5. Adding tests nobody asked for.

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 no API keys, tokens, secrets or passwords.

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

  • Compatibility

    React Native >=0.77; Jest; @testing-library/react-native; Detox (e2e)

    From compatibility in the SKILL.md frontmatter.

Context cost

Cometchat React Native Testing loads about 997 tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 398 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~997

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). 398 words, ~997 tokens.

Download SKILL.mdSave it as .claude/skills/cometchat-react-native-testing/SKILL.md (or your agent's skills folder).
name
cometchat-react-native-testing
description
Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove. Triggers: test CometChat React Native, mock CometChat SDK jest, detox CometChat, unit test chat screen RN, CI tests for chat.
compatibility
React Native >=0.77; Jest; @testing-library/react-native; Detox (e2e)
license
MIT
metadata.author
CometChat
metadata.version
1.0.0
metadata.tags
chat cometchat react-native testing jest detox mocking ci

Ground truth: catalogs/rn-v5.json + catalogs/rn-sdk-v4.json. Build the feature; do NOT test it unless asked. Use this skill only when the developer asks for tests. Never add a test framework, e2e suite or CI to a project that did not request one.

Companion skills (read first)

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

Use this skill when

  • "write tests for the chat screen" · "mock CometChat in Jest" · "add Detox coverage for chat"

Prerequisites & install

React Native ships Jest. Add the renderer:

bash
npm install --save-dev @testing-library/react-native

Mock the SDK — never let a unit test hit the network

CometChat opens a websocket and needs real credentials. Mock at the module boundary:

js
jest.mock("@cometchat/chat-sdk-react-native", () => ({
  CometChat: {
    init: jest.fn().mockResolvedValue(true),
    login: jest.fn().mockResolvedValue({ getUid: () => "test-uid" }),
    logout: jest.fn().mockResolvedValue(true),
    AppSettings: { SUBSCRIPTION_TYPE_ALL_USERS: "ALL_USERS" },
  },
}));

The UI Kit also pulls native modules, so mock the peers your test path touches — react-native-gesture-handler, react-native-svg, react-native-video, @react-native-async-storage/async-storage. Without them the failure is a NativeModule error that never mentions CometChat: the same confusing shape as a missing install.

What is worth asserting

Ordering — the invariant most likely to regress: init resolves before login, and no chat component renders until login resolves.

No Auth Key in source — a cheap grep test that stops a shipped secret ever landing:

js
it("has no auth key in source", () => {
  const src = require("fs").readFileSync("src/config.ts", "utf8");
  expect(src).not.toMatch(/authKey\s*:\s*["'][A-Za-z0-9]{20,}/);
});

Wiring, not rendering — that onItemPress navigates, that onBack returns, that an opened surface can be closed. Unwired affordances are the defect class worth catching.

Do not assert on kit internals — bubble markup, class names, child order. Those change between minors, so the test breaks with nothing actually wrong.

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

Detox for what only a device proves

FlowWhy it cannot be a unit test
composer survives the keyboardneeds a real soft keyboard
hardware back navigatesneeds the OS back gesture
gestures respondproves GestureHandlerRootView is wired
release-build startupcatches the gesture-handler import-order crash

Calls and push are outside Detox too — they need real hardware, real permissions and a second device. Record them as manual device checks rather than pretending they are automated.

CI

Jest with mocks runs anywhere. Detox needs a simulator — heavier, but feasible. Neither can verify calls or push, so a green CI run is not evidence that either works.

Common pitfalls

  1. Unmocked native peers — confusing NativeModule errors.
  2. Asserting kit internals — breaks on minor upgrades.
  3. Real credentials in tests — network flakes and leaked keys.
  4. Claiming push/calls coverage from a simulator run.
  5. Adding tests nobody asked for.

Verify it works

  • Tests pass with no network access.
  • No real credentials anywhere in the test tree.
  • npm run verify:fences:rn-v5 is green.

© 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

Just SKILL.md in skills/cometchat-react-native-testing of cometchat/cometchat-skills.

Open the folder on GitHubat commit 911b108

Compare with similar skills

Cometchat React Native Testing 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 Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cometchat React Native Testing this skillcometchat/cometchat-skills129—~997Automated safety check: PassMIT
Test Guidelinesgetsentry/sentry-react-native1.8k—~1.3kAutomated safety check: PassMIT
React Native Testingcallstackincubator/agent-skills1.7k—~1.8kAutomated safety check: PassMIT
Creating Reanimated Animationsgluestack/gluestack-ui5.3k—~2.4kAutomated safety check: PassNone
React Native TestingHoangNguyen0403/agent-skills-standard570—~647Automated safety check: PassMIT
Reactpedronauck/skills6331 repos~1.5kAutomated safety check: PassNone

Similar skills

  • Test Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK test conventions for naming, structure, mocking, and fixtures with Jest.

    1.8k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • React Native Testing

    callstackincubator/agent-skills

    Official

    Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native).

    1.7k GitHub stars~1.8k tokensUpdated yesterday
    MobileAuto-check passed
  • Creating Reanimated Animations

    gluestack/gluestack-ui

    Generate React Native Reanimated animation code for React Native apps.

    5.3k GitHub stars~2.4k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • React Native Testing

    HoangNguyen0403/agent-skills-standard

    Test React Native components with Jest and React Native Testing Library.

    570 GitHub stars~647 tokensUpdated yesterday
    MobileAuto-check passed
  • React

    pedronauck/skills

    Build React 19 components and hooks under React Compiler: state, Effects, memoization, props/refs, Actions, use(), compiler/lint setup, and Vitest tests.

    633 GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Jest Testing Patterns

    ChrisWiles/claude-code-showcase

    Jest patterns for React Native style tests: TDD discipline, mock factory functions, module and GraphQL hook mocking, custom render helpers and anti-patterns to avoid.

    6.1k GitHub starsUsed in 7 repos~1.5k tokens
    Testing & QAAuto-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

Questions about Cometchat React Native Testing

What does Cometchat React Native Testing do?

Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove. Cometchat React Native Testing is an agent skill from cometchat/cometchat-skills. Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove.

When should I use Cometchat React Native Testing?

Cometchat React Native Testing fits situations like: tasks that involve Unit testing; tasks that involve Cross-platform mobile apps.

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

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

How do I install Cometchat React Native Testing in Codex?

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

Can I use Cometchat React Native Testing 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-testing -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-testing, .gemini/skills/cometchat-react-native-testing, .github/skills/cometchat-react-native-testing and .opencode/skills/cometchat-react-native-testing in your project.

What does Cometchat React Native Testing need to run?

Going by SKILL.md and its folder, Cometchat React Native Testing needs the command-line tools its instructions call (npm). Our summary lists: Node.js. Compatibility (from SKILL.md): React Native >=0.77; Jest; @testing-library/react-native; Detox (e2e).

Does Cometchat React Native Testing 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 Testing 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 Testing use?

Cometchat React Native Testing 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 Testing use?

About 997 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cometchat React Native Testing?

Skills that share tags, products or a category with Cometchat React Native Testing: Test Guidelines (getsentry/sentry-react-native, 1.8k stars), React Native Testing (callstackincubator/agent-skills, 1.7k stars), Creating Reanimated Animations (gluestack/gluestack-ui, 5.3k stars) and React Native Testing (HoangNguyen0403/agent-skills-standard, 570 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 Testing?

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.