Official agent skill

React Native Testing

by callstackincubator in callstackincubator/agent-skills

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

OfficialMITAuto-check passedMobile

Install React Native Testing

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

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

GitHub CLI
$ gh skill install callstackincubator/agent-skills 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/callstackincubator/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/vendored/.agents/skills/react-native-testing .claude/skills/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
react-native-testing
GitHub stars
1.7k
Token cost
~1.8k tokens
SKILL.md length
474 words
Files
4 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 11 steps: Use screen for queries, not… → Use getByRole first with { name: '...' }… → Use queryBy* ONLY for… → …
  • Fixing React Native component tests
  • SKILL.md covers Version Detection, Query Priority, Query Variants and Interactions, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

React Native Testing is an agent skill from callstackincubator/agent-skills, published by the product's own GitHub organization. Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React 18, sync render) and v14 (React 19+, async render). Triggers on: test files for React Native components, RNTL imports, mentions of "testing library", "write tests", "component tests", or "RNTL".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/anti-patterns.md`, `references/api-reference-v13.md` and `references/api-reference-v14.md`).

It sits in Mobile, covering Cross-platform mobile apps, Unit testing and Test generation. It works with React Native, React, Testing Library and Jest. The repository describes itself as: A collection of agent-optimized React Native skills for AI coding assistants. The licence is MIT.

When your agent uses it

  • Fixing React Native component tests
  • : test files for React Native components
  • Mentions of testing library
  • Component tests

Example prompts

  • “testing library”
  • “write tests”
  • “component tests”
  • “/react-native-testing”

Workflow steps

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

  1. Use screen for queries, not destructuring from render()
  2. Use getByRole first with { name: '...' } option
  3. Use queryBy* ONLY for .not.toBeOnTheScreen() checks
  4. Use findBy* for async elements, NOT waitFor + getBy*
  5. Never put side-effects in waitFor (no fireEvent/userEvent inside)
  6. One assertion per waitFor
  7. Never pass empty callbacks to waitFor
  8. Don't wrap in act() - render, fireEvent, userEvent handle it
  9. Don't call cleanup() - automatic after each test
  10. Prefer ARIA props (role, aria-label, aria-disabled) over legacy accessibility* props
  11. Use RNTL matchers over raw prop assertions

What it can do on your machine

Read from SKILL.md and the folder at commit 61e6e7d. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

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

  • Network

    No URLs in SKILL.md.

    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.

Context cost

React Native Testing loads about 1.8k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 134 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~134
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
~13k

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 callstackincubator/agent-skills at commit 61e6e7d, republished under its MIT licence (© callstackincubator). 474 words, ~1,826 tokens.

Download SKILL.mdSave it as .claude/skills/react-native-testing/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
react-native-testing
description
Write tests using React Native Testing Library (RNTL) v13 and v14 (`@testing-library/react-native`). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React 18, sync render) and v14 (React 19+, async render). Triggers on: test files for React Native components, RNTL imports, mentions of "testing library", "write tests", "component tests", or "RNTL".

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

VariantUse caseReturnsAsync
getBy*Element must existelement instance (throws)No
getAllBy*Multiple must existelement instance[] (throws)No
queryBy*Check non-existence ONLYelement instance | nullNo
queryAllBy*Count elementselement instance[]No
findBy*Wait for elementPromise<element instance>Yes
findAllBy*Wait for multiplePromise<element instance[]>Yes

Interactions

Prefer userEvent over fireEvent. userEvent is always async.

tsx
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

fireEvent — use only when userEvent doesn't support the event. See version-specific reference for sync/async behavior:

tsx
fireEvent.press(element);
fireEvent.changeText(textInput, 'new text');
fireEvent(element, 'blur');

Assertions (Jest Matchers)

Available automatically with any @testing-library/react-native import.

MatcherUse for
toBeOnTheScreen()Element exists in tree
toBeVisible()Element visible (not hidden/display:none)
toBeEnabled() / toBeDisabled()Disabled state via aria-disabled
toBeChecked() / toBePartiallyChecked()Checked state
toBeSelected()Selected state
toBeExpanded() / toBeCollapsed()Expanded state
toBeBusy()Busy state
toHaveTextContent(text)Text content match
toHaveDisplayValue(value)TextInput display value
toHaveAccessibleName(name)Accessible name
toHaveAccessibilityValue(val)Accessibility value
toHaveStyle(style)Style match
toHaveProp(name, value?)Prop check (last resort)
toContainElement(el)Contains child element
toBeEmptyElement()No children
Show full SKILL.md (214 more words)Show less

Rules

  1. Use screen for queries, not destructuring from render()
  2. Use getByRole first with { name: '...' } option
  3. Use queryBy* ONLY for .not.toBeOnTheScreen() checks
  4. Use findBy* for async elements, NOT waitFor + getBy*
  5. Never put side-effects in waitFor (no fireEvent/userEvent inside)
  6. One assertion per waitFor
  7. Never pass empty callbacks to waitFor
  8. Don't wrap in act() - render, fireEvent, userEvent handle it
  9. Don't call cleanup() - automatic after each test
  10. Prefer ARIA props (role, aria-label, aria-disabled) over legacy accessibility* props
  11. Use RNTL matchers over raw prop assertions

*ByRole Quick Reference

Common roles: button, text, heading (alias: header), searchbox, switch, checkbox, radio, img, link, alert, menu, menuitem, tab, tablist, progressbar, slider, spinbutton, timer, toolbar.

getByRole options: { name, disabled, selected, checked, busy, expanded, value: { min, max, now, text } }.

For *ByRole to match, the element must be an accessibility element:

  • Text, TextInput, Switch are by default
  • View needs accessible={true} (or use Pressable/TouchableOpacity)

waitFor

tsx
// Correct: action first, then wait for result
fireEvent.press(button);
await waitFor(() => {
  expect(screen.getByText('Result')).toBeOnTheScreen();
});

// Better: use findBy* instead
fireEvent.press(button);
expect(await screen.findByText('Result')).toBeOnTheScreen();

Options: waitFor(cb, { timeout: 1000, interval: 50 }). Works with Jest fake timers automatically.

Fake Timers

Recommended with userEvent (press/longPress involve real durations):

tsx
jest.useFakeTimers();

test('with fake timers', async () => {
  const user = userEvent.setup();
  render(<Component />);
  await user.press(screen.getByRole('button'));
  // ...
});

Custom Render

Wrap providers using wrapper option:

tsx
function renderWithProviders(ui: React.ReactElement) {
  return render(ui, {
    wrapper: ({ children }) => (
      <ThemeProvider>
        <AuthProvider>{children}</AuthProvider>
      </ThemeProvider>
    ),
  });
}

References

  • v13 API Reference — Complete v13 API: sync render, queries, matchers, userEvent, React 19 compat
  • v14 API Reference — Complete v14 API: async render, queries, matchers, userEvent, migration
  • Anti-Patterns — Common mistakes to avoid

© callstackincubator, 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 3 other files (references) in plugins/vendored/.agents/skills/react-native-testing of callstackincubator/agent-skills.

  • SKILL.md
  • references/anti-patterns.md
  • references/api-reference-v13.md
  • references/api-reference-v14.md

Open the folder on GitHubat commit 61e6e7d

Compare with similar skills

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.

React Native Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Native Testing this skillcallstackincubator/agent-skills1.7k—~1.8kAutomated safety check: PassMIT
React Native TestingHoangNguyen0403/agent-skills-standard570—~647Automated safety check: PassMIT
Senior QAalirezarezvani/claude-skills28k1 repos~2.1kAutomated safety check: PassMIT
Senior QAborghei/Claude-Skills874—~1.6kAutomated safety check: PassMIT
Creating Reanimated Animationsgluestack/gluestack-ui5.3k—~2.4kAutomated safety check: PassNone
Reactpedronauck/skills6331 repos~1.5kAutomated safety check: PassNone

Similar skills

  • 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
  • Senior QA

    alirezarezvani/claude-skills

    Generates unit tests, integration tests, and E2E tests for React/Next.js applications.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • Senior QA

    borghei/Claude-Skills

    Testing for React/Next.js with Jest, React Testing Library, and Playwright.

    874 GitHub stars~1.6k tokensUpdated today
    Testing & QAAuto-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

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

    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.

    129 GitHub stars~997 tokensUpdated 2 days ago
    Testing & QAAuto-check passed

More from callstackincubator/agent-skills

All 12 skills in this repo
  • Dogfood

    callstackincubator/agent-skills

    Official

    Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems.

    1.7k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Upgrading React Native

    callstackincubator/agent-skills

    Official

    Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and…

    1.7k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • React Native Best Practices

    callstackincubator/agent-skills

    Official

    Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations.

    1.7k GitHub starsUsed in 4 repos~3.1k tokens
    Auto-check passed
  • Create React Native Library

    callstackincubator/agent-skills

    Official

    Scaffolds React Native libraries with create-react-native-library for standalone libraries or local native modules and views.

    1.7k GitHub stars~684 tokensUpdated yesterday
    Auto-check passed
  • Assess React Native Migration

    callstackincubator/agent-skills

    Official

    Assesses whether and how an existing mobile product should migrate to React Native.

    1.7k GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • GitHub Actions

    callstackincubator/agent-skills

    Official

    GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts.

    1.7k GitHub starsUsed in 1 repo~703 tokens
    Auto-check passed

Questions about React Native Testing

What does React Native Testing do?

Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native). React Native Testing is an agent skill from callstackincubator/agent-skills, published by the product's own GitHub organization. Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native).

When should I use React Native Testing?

React Native Testing fits situations like: fixing React Native component tests; : test files for React Native components; mentions of testing library; component tests.

How do I install React Native Testing in Claude Code?

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

How do I install React Native Testing in Codex?

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

Can I use 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 callstackincubator/agent-skills --skill 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/react-native-testing, .gemini/skills/react-native-testing, .github/skills/react-native-testing and .opencode/skills/react-native-testing in your project.

What does React Native Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: React Native Testing is instructions for the agent only.

Does React Native Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

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

React Native Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Native Testing use?

About 1.8k tokens (SKILL.md is roughly 7.3k 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 12k tokens, read only when the agent opens those files.

What are the alternatives to React Native Testing?

Skills that share tags, products or a category with React Native Testing: React Native Testing (HoangNguyen0403/agent-skills-standard, 570 stars), Senior QA (alirezarezvani/claude-skills, 28k stars), Senior QA (borghei/Claude-Skills, 874 stars) and Creating Reanimated Animations (gluestack/gluestack-ui, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Native Testing?

callstackincubator (a GitHub organization, an official publisher) maintains it in callstackincubator/agent-skills, which has 1,664 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

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