rn-write-tests

rn-write-tests is a skill for Claude Code from lukedj78/dev-flow. It costs 173 tokens per session (2,198 once invoked), scanned A, original, MIT.

A testing assistant for Expo and React Native mobile apps. It writes Jest and React Native Testing Library tests for code and Maestro test flows for complete app journeys such as signing in or navigating.

In plain words
What is it for?
Use it to test components, hooks, data requests, form behavior, navigation, sign-in, and other end-to-end mobile app flows.
Why use it?
It sets up missing testing tools and places focused tests in the project, so you do not have to configure the testing setup or decide where each test belongs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .../dev-flow/scripts/update_meta.py <project-root> record-artifact \.

Part of the dev-flow plugin — 55 skills shipped together

Good fit Use it to test components, hooks, data requests, form behavior, navigation, sign-in, and other end-to-end mobile app flows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow
agentmods
npx agentmods add skills/lukedj78/dev-flow/rn-write-tests

Made for: Claude Code.

Or install dev-flow, the plugin that ships this one along with the rest of its 55 skills.

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-write-tests

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/lukedj78/dev-flow/rn-write-tests"><img src="https://agentmods.dev/badge/skills/lukedj78/dev-flow/rn-write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,198 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: 3 findings, up to medium

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 →

  • medium MCP Rug Pull · line 38
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 47
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Rogue Agent · line 59
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00173 $0.02198
Opus 5.5 $0.00069 $0.00879
Sonnet 5.5 $0.00035 $0.00440
Haiku 4.5 $0.00017 $0.00220

Measured 2d ago against content hash 775d0e340bfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rn-write-tests 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 2d 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.

rn-write-tests/SKILL.md · 136 lines

How it starts

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

rn-write-tests — Jest + RNTL + Maestro testing for Expo + RN

Contract

See references/contracts.md (vendored from dev-flow). Key facts:

  • Reads <project-root>/.workflow/meta.json#stack.framework — must be "expo-rn".
  • Adds dev dependencies + Jest config on first call (idempotent: detects existing setup).
  • Writes test files under <project-root>/__tests__/ (Jest convention) for unit/integration.
  • Writes Maestro YAML flows under <project-root>/.maestro/ for e2e.
  • Does NOT modify meta.json#phase.

When this skill applies

  • User asks to write a test for a specific source file or flow.
  • Orchestrator does NOT route here automatically — test writing is on-demand.

Knowledge dependencies (read these first)

  • rn-fundamentals/SKILL.md — TS strict, modern primitives the tests will see.
  • rn-data-fetching/references/patterns.md — query/mutation patterns the tests must exercise.

Workflow

Step 1 — Verify preconditions

Read .workflow/meta.json. Abort if stack.framework != "expo-rn".

Step 2 — Detect / install the test stack

Check if jest, jest-expo, @testing-library/react-native are in package.json. If not:

npx expo install --dev \
  jest jest-expo \
  @testing-library/react-native@^14 \
  test-renderer@^1 \
  @types/jest -- --legacy-peer-deps

# jest-expo declares `@react-native/jest-preset` as a peer (58: `^0.88.0`), and that package is
# NOT in the SDK's bundledNativeModules — so `expo install` hands you npm latest, which breaks as
# soon as it is a minor ahead of the project's RN (SDK 57, 2026-09-08: 0.87.1 against RN 0.86).
# Pin it to the React Native version the project actually has:
RN_VERSION="$(node -p "require('react-native/package.json').version")"
npm install --save-dev --legacy-peer-deps "@react-native/jest-preset@${RN_VERSION}"

(Without the @react-native/jest-preset line the very first jest run dies with "The React Native Jest preset that jest-expo relies on has moved to a separate package"; with the wrong minor it dies with "Could not locate module react-native/setup-env" — observed 2026-09-08 on SDK 57 / RN 0.86.3. On SDK 58 the suite also needs "resolver": "react-native-reanimated/jest/resolver" in the jest config, or setUpTests() crashes every suite — re-run 2026-10-17 on a fresh SDK 58 app. test-renderer@^1 is a required peer dep of RNTL v14 — it replaced react-test-renderer. Node ^22.13 || >=24 is also required. Native matchers like toBeOnTheScreen() are built into @testing-library/react-native v12.4+ — no separate @testing-library/jest-native needed. See references/jest-setup.md for the full config.)

Read the full file on GitHub · 136 lines

Files

What ships with it

6 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. 2d ago Changed · +9 tokens per session 775d0e340bfc
  2. 8d ago Changed · +7 lines 58348eebb6f2
  3. 1mo ago Changed · +8 lines · +22 tokens per session 28064b2c3900
  4. 1mo ago First seen · 121 lines · 142 tokens per session scan A cf53f8fc1bba

Subscribe to this mod's changes

rn-write-tests is a skill published in the GitHub repository lukedj78/dev-flow (6 stars, last pushed yesterday), licensed MIT. It adds 173 tokens to every session and 2,198 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-08-31.

Related

Other skills, from other repositories

ios-testing-patterns

XCTest and XCUITest execution workflows and flaky test detection patterns.

conorluddy/xclaude-plugin · 18 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

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

test-automation

Execute Vitest and Playwright test suites with result collection and failure analysis.

a5c-ai/babysitter · 0 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