cometchat-react-native-testing

cometchat-react-native-testing is a skill for Claude Code from cometchat/cometchat-skills. It costs 82 tokens per session (981 once invoked), scanned A, original, MIT.

A testing guide for CometChat integrations in React Native. It explains unit tests with Jest and device-level end-to-end tests with Detox, a tool that drives a real mobile app.

In plain words
What is it for?
It helps mock the CometChat SDK, test initialization before rendering, check that secret keys are not in source code, and test chat flows on a device.
Why use it?
It keeps unit tests away from real chat servers and credentials while reserving device tests for behaviour that cannot be proven in a simulated environment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cometchat-skills plugin — 81 skills, 1 MCP server shipped together

Good fit It helps mock the CometChat SDK, test initialization before rendering, check that secret keys are not in source code, and test chat flows on a device.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cometchat/cometchat-skills/cometchat-react-native-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cometchat/cometchat-skills --skill cometchat-react-native-testing
Clone the repo
git clone --depth 1 https://github.com/cometchat/cometchat-skills

Made for: Claude Code.

Or install cometchat-skills, the plugin that ships this one along with the rest of its 81 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cometchat-react-native-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/cometchat/cometchat-skills/cometchat-react-native-testing/github.svg)](https://agentmods.dev/skills/cometchat/cometchat-skills/cometchat-react-native-testing)
Your own site
<a href="https://agentmods.dev/skills/cometchat/cometchat-skills/cometchat-react-native-testing"><img src="https://agentmods.dev/badge/skills/cometchat/cometchat-skills/cometchat-react-native-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cometchat-react-native-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/cometchat/cometchat-skills/cometchat-react-native-testing"><img src="https://agentmods.dev/badge/skills/cometchat/cometchat-skills/cometchat-react-native-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 981 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.00981
Opus 5 $0.00041 $0.00491
Sonnet 5 $0.00016 $0.00196
Haiku 4.5 $0.00008 $0.00098

Measured today against content hash e28756080fdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cometchat-react-native-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cometchat-react-native-testing/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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:

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:

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.

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 95 lines · 82 tokens per session scan A e28756080fdb

Subscribe to this mod's changes

cometchat-react-native-testing is a skill published in the GitHub repository cometchat/cometchat-skills (104 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 981 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

Other skills, from other repositories

designing-tests

Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.

CloudAI-X/claude-workflow-v2 · 48 tokens

backend/testing-guide

A guide for writing backend tests: small unit tests, tests that check connected parts such as an API and database, and end-to-end tests that follow a complete user flow.

echoVic/boss-skill · 30 tokens

testing

Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.

evanca/flutter-ai-rules · 33 tokens

qa/test-strategy

A testing strategy based on the testing pyramid: many small unit tests, fewer integration tests, and a smaller set of end-to-end tests that follow real user journeys. It also defines checks for security, boundaries, permissions, and business consistency.

echoVic/boss-skill · 33 tokens

mobiai-android-testing

Use when writing or running tests in an Android project — unit tests, UI tests, choosing the right framework and patterns.

ArisGuimera/MobiAI-Core · 30 tokens

flutter-testing-skill

Generates Flutter widget tests, integration tests, and golden tests in Dart. Supports local execution and TestMu AI cloud for real device testing. Use when user mentions "Flutter", "widget test", "WidgetTester", "testWidgets", "fluttertest", "integrationtest". Triggers on: "Flutter", "widget test", "Dart test"…

LambdaTest/agent-skills · 89 tokens