rn-testing

rn-testing is a skill for Claude Code from AratKruglik/claude-sdlc. It costs 163 tokens per session (3,192 once invoked), scanned A, original, MIT.

A testing guide for React Native apps, including Jest for code tests, React Testing Library Native for components, and optional tools for full-device flows. React Native is a framework for building mobile apps with React.

In plain words
What is it for?
Use it to configure Jest, test components and hooks, mock native modules, and optionally automate complete app journeys with Detox or Maestro.
Why use it?
It helps choose a testing setup that matches Expo or a bare React Native project and handles native modules that ordinary web tests cannot run directly.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the react-native-plugin plugin — 5 skills, 1 agent shipped together

Good fit Use it to configure Jest, test components and hooks, mock native modules, and optionally automate complete app journeys with Detox or Maestro.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aratkruglik/claude-sdlc/rn-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 AratKruglik/claude-sdlc --skill rn-testing
Clone the repo
git clone --depth 1 https://github.com/AratKruglik/claude-sdlc

Made for: Claude Code.

Or install react-native-plugin, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

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 rn-testing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/rn-testing"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/rn-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 163 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,192 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
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 141
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 142
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 240
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 256
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00163 $0.03192
Opus 5.5 $0.00065 $0.01277
Sonnet 5.5 $0.00033 $0.00638
Haiku 4.5 $0.00016 $0.00319

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

Security

Grade A, and why

rn-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.

plugins/react-native-plugin/skills/rn-testing/SKILL.md · 421 lines

How it starts

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

React Native Testing

Test framework selection

Layer Framework
Component, hook, plain TS unit Jest with jest-expo (Expo) or react-native preset (bare)
End-to-end (optional) Detox (native automation) or Maestro (declarative YAML)

Vitest is uncommon in RN — Jest's native module mocking and Metro integration is more battle-tested. If a project specifically uses Vitest in RN, follow it; otherwise default to Jest.

Jest setup

Expo (managed, dev-client)

// jest.config.js
module.exports = {
  preset: 'jest-expo',
  setupFilesAfterEach: ['<rootDir>/jest.setup.ts'],
  transformIgnorePatterns: [
    'node_modules/(?!((jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)/)',
  ],
};

Install: pnpm add -D jest jest-expo @testing-library/react-native @testing-library/jest-native.

Bare RN

// jest.config.js
module.exports = {
  preset: 'react-native',
  setupFilesAfterEach: ['<rootDir>/jest.setup.ts'],
  transformIgnorePatterns: [
    'node_modules/(?!((jest-)?react-native|@react-native(-community)?|@react-navigation/.*|react-native-mmkv|react-native-reanimated)/)',
  ],
};

Install: pnpm add -D jest @react-native/babel-preset @testing-library/react-native @testing-library/jest-native.

jest.setup.ts

import '@testing-library/jest-native/extend-expect';

// Common mocks for native modules
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));

jest.mock('@react-native-async-storage/async-storage', () =>
  require('@react-native-async-storage/async-storage/jest/async-storage-mock')
);

// Silence common warnings
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

Component tests with RTL Native

// src/components/UserCard.test.tsx
import { describe, it, expect, jest } from '@jest/globals';
import { render, screen, fireEvent } from '@testing-library/react-native';
import { UserCard } from './UserCard';

describe('UserCard', () => {
  it('renders user name and email', () => {
    render(<UserCard user={{ id: '1', name: 'Alice', email: '[email protected]' }} />);
    expect(screen.getByText('Alice')).toBeOnTheScreen();
    expect(screen.getByText('[email protected]')).toBeOnTheScreen();
  });

  it('calls onPress when card pressed', () => {
    const onPress = jest.fn();
    render(<UserCard user={{ id: '1', name: 'Alice', email: '[email protected]' }} onPress={onPress} />);
    fireEvent.press(screen.getByLabelText('User card for Alice'));
    expect(onPress).toHaveBeenCalledWith('1');
  });
});

Read the full file on GitHub · 421 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. 1mo ago Changed · +2 lines 6c4dac295c77
  2. 1mo ago First seen · 419 lines · 163 tokens per session scan A a78dd2078d8f

Subscribe to this mod's changes

rn-testing is a skill published in the GitHub repository AratKruglik/claude-sdlc (49 stars, last pushed today), licensed MIT. It adds 163 tokens to every session and 3,192 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories

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

testing-setup

Analyze and create a testing strategy for Android apps - install testing libraries, set up test infrastructure, create harnesses for unit tests, UI tests, screenshot tests, and end-to-end tests.

ArisGuimera/MobiAI-Core · 42 tokens

ios-testing-patterns

XCTest and XCUITest execution workflows and flaky test detection patterns.

conorluddy/xclaude-plugin · 18 tokens

cometchat-flutter-v6-testing

Test a Flutter app that uses the CometChat UI Kit — what is worth testing versus what belongs to the kit, mocking the SDK boundary, widget tests around chat screens, and integration/CI setup. Triggers: 'test my cometchat integration', 'mock cometchat in flutter tests', 'widget test chat screen', 'cometchat test setup'.

cometchat/cometchat-skills · 83 tokens

cometchat-ios-testing

Test an iOS app that embeds CometChat — what to mock vs exercise for real, keeping the CometChatSDK off the network in unit tests, waiting out the async init→login gate, and a lean XCUITest smoke. Triggers: 'test cometchat ios', 'unit test chat swift', 'mock cometchatsdk', 'xcuitest for chat', 'how do I test cometchat…

cometchat/cometchat-skills · 95 tokens