build-and-test

build-and-test is a command for Claude Code from Lykhoyda/rn-dev-agent. It costs 31 tokens per session (1,060 once invoked), scanned C, original, MIT.

A build-and-test command for Expo and React Native mobile apps. It builds and installs the app on an iOS simulator or Android emulator, starts Metro, and tests a requested feature from start to finish.

In plain words
What is it for?
Use it to verify a mobile feature end to end on a simulator or emulator, either with a local build or an Expo Application Services build.
Why use it?
It brings building, device setup, installation, and feature testing into one defined process. It also checks that the intended device and app are being used.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the rn-dev-agent plugin — 28 skills, 17 commands, 6 agents, 6 hooks shipped together

Good fit Use it to verify a mobile feature end to end on a simulator or emulator, either with a local build or an Expo Application Services build.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Lykhoyda/rn-dev-agent
Claude Code
/plugin install rn-dev-agent

Made for: Claude Code.

Or install rn-dev-agent, the plugin that ships this one along with the rest of its 28 skills, 17 commands, 6 agents, 6 hooks.

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 build-and-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/build-and-test/github.svg)](https://agentmods.dev/commands/lykhoyda/rn-dev-agent/build-and-test)
Your own site
<a href="https://agentmods.dev/commands/lykhoyda/rn-dev-agent/build-and-test"><img src="https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/build-and-test/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 build-and-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/lykhoyda/rn-dev-agent/build-and-test"><img src="https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/build-and-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00031 $0.01060
Opus 5.5 $0.00012 $0.00424
Sonnet 5.5 $0.00006 $0.00212
Haiku 4.5 $0.00003 $0.00106

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

Security

Grade C, and why

build-and-test scanned grade C with 1 finding 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

`trap 'rm -rf -- "$artifact_dir"' EXIT` in that same scope. Then run
packages/claude-plugin/commands/build-and-test.md · 77 lines

How it starts

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

Build the app and test this feature: $ARGUMENTS

Run the build + test protocol INLINE (parent session)

Important (GH #31): Do NOT spawn the rn-tester agent via the Task tool. MCP tools (cdp_*, device_*) are not available in spawned subagents. Execute the build + test protocol directly in this parent session.

Phase A — Build pre-flight (run in this session):

  1. Resolve session authority — call rn_session(action="status") and require the intended worktree, platform, exact UUID/serial, and app ID. device_list may diagnose available hardware but never selects the target.
  2. Check if app is already running — call passive cdp_status. If the session's exact signed target is connected and app.dev == true, skip to Phase B.
  3. Build / install (substitute <platform> with ios or android):
    • No --eas flag: after previewing and confirming the session integration, run literal pnpm ios or pnpm android. The adapter injects the exact device and allocated Metro port and records the build/install receipt. For Expo Android, continue to bind and report the exact adb serial: the adapter uniquely translates it to Expo's model/AVD display name only for --device, pins adb with ANDROID_SERIAL, and refuses EXPO_DEVICE_IDENTITY_MISMATCH before Expo on a missing, unauthorized, duplicate, foreign, or drifted mapping.
    • With --eas flag: enter one shell scope, create <artifact-dir> with artifact_dir=$(mktemp -d), and immediately register trap 'rm -rf -- "$artifact_dir"' EXIT in that same scope. Then run bash "${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-${RN_DEV_AGENT_CODEX_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:?set it to the installed rn-dev-agent plugin root, then re-run}}}}/scripts/eas_resolve_artifact.sh" "<platform>" "<profile>" "<artifact-dir>", parse a successful absolute artifact path, and run bash "${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-${RN_DEV_AGENT_CODEX_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:?set it to the installed rn-dev-agent plugin root, then re-run}}}}/scripts/expo_ensure_running.sh" "<platform>" --device-id "<device-id>" --artifact "<path>". Keep resolution and installation inside the trapped scope so every success or failure path cleans only that exact caller-owned directory after the install attempt.
  4. Start Metro only through the literal integrated package script; an ambient default-port Metro is diagnostic, not authoritative.
  5. Confirm CDP — call cdp_connect for the exact signed target, then passive cdp_status.

Phase B — Run the rn-tester protocol (load rn-testing skill):

Follow the same protocol as /rn-dev-agent:test-feature, INCLUDING its mandatory Step 0 — scan saved actions (/rn-dev-agent:list-learned-actions) and replay a matching flow BEFORE composing any device_* primitives — then environment check, understand the feature, plan, navigate, execute+verify, edge cases, generate persistent test.

Read the full file on GitHub · 77 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. 2mo ago Changed 14914538c073
  2. 3mo ago First seen · 77 lines · 31 tokens per session scan C 70f44f0cec2b

Subscribe to this mod's changes

build-and-test is a command published in the GitHub repository Lykhoyda/rn-dev-agent (20 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 1,060 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

build-and-test compared with commands from other repositories

build-and-test next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
build-and-testLykhoyda/rn-dev-agentCommand201mo agoMITC31Claude Code
dashboard-list-modelsBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA18Claude Code
dashboard-flow-autoBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA19Claude Code
dashboard-session-abort-allBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA16Claude Code
dashboard-session-diffBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA31Claude Code
dashboard-server-tunnel-offBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA13Claude Code
dashboard-session-renameBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA18Claude Code