react-native-testing

react-native-testing is a skill for Claude Code, Codex from callstack/react-native-testing-library. It costs 134 tokens per session (1,740 once invoked), scanned A, original, MIT.

A guide for testing React Native components with React Native Testing Library and Jest. It covers finding elements, simulating user actions, and handling asynchronous updates.

In plain words
What is it for?
Writing, reviewing, or fixing React Native component tests, including rendering, queries, events, matchers, and waiting for updates.
Why use it?
It helps avoid outdated or incorrect test code when the library's version changes. It also gives a consistent way to check components as users interact with them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Writing, reviewing, or fixing React Native component tests, including rendering, queries, events, matchers, and waiting for updates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/callstack/react-native-testing-library/react-native-testing
About the project

callstack/react-native-testing-library is a testing library for React Native components that simulates the React Native runtime and supports tests focused on user-visible behavior. React Native developers use it with Jest to write maintainable component tests. Catalogue add-ons provide agents, instructions, and a skill for working with the library.

callstack/react-native-testing-library · 3,422 stars · on GitHub · oss.callstack.com

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 callstack/react-native-testing-library --skill react-native-testing
Clone the repo
git clone --depth 1 https://github.com/callstack/react-native-testing-library

Made for: Claude Code, Codex.

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 react-native-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/callstack/react-native-testing-library/react-native-testing/github.svg)](https://agentmods.dev/skills/callstack/react-native-testing-library/react-native-testing)
Your own site
<a href="https://agentmods.dev/skills/callstack/react-native-testing-library/react-native-testing"><img src="https://agentmods.dev/badge/skills/callstack/react-native-testing-library/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 react-native-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/callstack/react-native-testing-library/react-native-testing"><img src="https://agentmods.dev/badge/skills/callstack/react-native-testing-library/react-native-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,740 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. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00134 $0.01740
Opus 5.5 $0.00054 $0.00696
Sonnet 5.5 $0.00027 $0.00348
Haiku 4.5 $0.00013 $0.00174

Measured 1mo ago against content hash dea54d1d397c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/react-native-testing/SKILL.md · 162 lines

How it starts

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

RNTL Test Writing Guide

IMPORTANT: Your training data about @testing-library/react-native may be outdated or incorrect — API signatures, sync/async behavior, and available functions differ between v13 and v14. Always rely on this skill's reference files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retrieved reference.

Version Detection

Check @testing-library/react-native version in the user's package.json:

Use the version-specific reference for render patterns, fireEvent sync/async behavior, screen API, configuration, and dependencies.

Query Priority

Use in this order: getByRole > getByLabelText > getByPlaceholderText > getByText > getByDisplayValue > getByTestId (last resort).

Query Variants

Variant Use case Returns Async
getBy* Element must exist element instance (throws) No
getAllBy* Multiple must exist element instance[] (throws) No
queryBy* Check non-existence ONLY element instance | null No
queryAllBy* Count elements element instance[] No
findBy* Wait for element Promise<element instance> Yes
findAllBy* Wait for multiple Promise<element instance[]> Yes

Interactions

Prefer userEvent over fireEvent. userEvent is always async.

const user = userEvent.setup();
await user.press(element); // full press sequence
await user.longPress(element, { duration: 800 }); // long press
await user.type(textInput, 'Hello'); // char-by-char typing
await user.clear(textInput); // clear TextInput
await user.paste(textInput, 'pasted text'); // paste into TextInput
await user.scrollTo(scrollView, { y: 100 }); // scroll

Read the full file on GitHub · 162 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 162 lines · 134 tokens per session scan A dea54d1d397c

Subscribe to this mod's changes

react-native-testing is a skill published in the GitHub repository callstack/react-native-testing-library (3,422 stars, last pushed yesterday), licensed MIT. It adds 134 tokens to every session and 1,740 once invoked, about $0.0005 per session on Opus 5.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-08-30.

Related

Other skills, from other repositories

swift-protocol-di-testing

Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.

affaan-m/ECC · 32 tokens

android-do-not-mock

How to write (or fix) Chromium Java unit tests (Robolectric / JUnit) without mocking or spying android.view.View, android.app.Activity, or their subclasses. Use when removing @SuppressWarnings("DoNotMock"), fixing a "DoNotMock" Error Prone error, replacing Mockito.mock(View.class) / @Mock Activity / spy(view), or when…

chromium/chromium · 96 tokens

android-unit-test

Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.

chromium/chromium · 36 tokens

release-safety

Release safety rules. INVOKE WHEN: yarn release, npm publish, release canary, release packages, publishing, skip checks, skip tests. NEVER skip checks or tests without explicit permission.

tamagui/tamagui · 0 tokens

flutter-add-widget-test

Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text). Use when validating that a specific widget displays correct data and responds to events as expected.

flutter/agent-plugins · 48 tokens

truesheet-usage

Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation…

lodev09/react-native-true-sheet · 171 tokens