From rn-dev-agent
Routes React Native dev intents to commands, agents, or skills for building features, testing, debugging screens, replaying actions, setup, and proof capture. Start RN conversations here.
npx claudepluginhub lykhoyda/rn-dev-agent --plugin rn-dev-agentThis skill uses the workspace's default tool permissions.
The React Native development plugin for Claude Code. **64 MCP tools**, **5 agents**, **16 commands**, **7 skills**.
Monitors deployed URLs for regressions after deploys, merges, or upgrades by checking HTTP status, console errors, network failures, performance (LCP/CLS/INP), content, and API health.
Share bugs, ideas, or general feedback.
The React Native development plugin for Claude Code. 64 MCP tools, 5 agents, 16 commands, 7 skills.
This skill is your front door. Before starting any RN work, use the decision tree below to route the user's intent to the right tool.
What is the user asking for?
│
├── INVENTORY of reusable actions ("what's already automated for this?")
│ └─► /rn-dev-agent:list-learned-actions [keyword]
│ (Scans feedback memories + .rn-agent/actions/ + .rn-agent/skeleton.yaml.
│ ALWAYS run this BEFORE any device_* sequence — replay an
│ existing flow instead of recomposing primitives manually.
│ See feedback_execute_artifacts_before_manual.md.)
│
├── REPLAY a learned action (Maestro flow)
│ └─► /rn-dev-agent:run-action <name> [-e KEY=VALUE …] [--platform ios|android]
│ (Counterpart to list-learned-actions: list discovers, run executes.
│ Pre-flights mutates flag, appId match, parameter coverage. Use to
│ skip a 7-min manual walk when a 23-sec flow already exists.)
│
├── BUILD a new feature / "add X to the app"
│ └─► /rn-dev-agent:rn-feature-dev <description>
│ (8-phase pipeline — see rn-feature-development skill)
│
├── TEST an existing feature
│ └─► /rn-dev-agent:test-feature <description>
│ (Runs rn-tester protocol INLINE in parent session — MCP tools required.
│ Step 0 is automatic artifact-first scan via list-learned-actions.)
│
├── BUILD + TEST (app not yet installed)
│ └─► /rn-dev-agent:build-and-test <description>
│ (Builds app via Expo/EAS, installs, starts Metro, then runs tester protocol inline)
│
├── Something is BROKEN on the current screen
│ └─► /rn-dev-agent:debug-screen
│ (Runs rn-debugger protocol INLINE in parent session — MCP tools required)
│
├── Plugin tools not working / environment broken
│ └─► /rn-dev-agent:setup
│ (9-point environment check with auto-retry + manual fallback)
│
├── Need PROOF for a PR
│ └─► /rn-dev-agent:proof-capture <feature-slug>
│ (Video + screenshots + generated PR body)
│
├── Understand an existing feature (read, don't write)
│ └─► Spawn rn-code-explorer via Task tool (read-only, safe to spawn)
│ (Maps screens, state, navigation, testIDs, patterns)
│
├── Design architecture before implementing
│ └─► Spawn rn-code-architect via Task tool (read-only, safe to spawn)
│ (Opus-powered blueprint with testID placement + proof flow)
│
├── Review code before merging
│ └─► Spawn rn-code-reviewer via Task tool (read-only, safe to spawn)
│ (Confidence-filtered review, RN conventions + best practices)
│
├── Just check if environment is ready
│ └─► /rn-dev-agent:check-env
│ (Quick cdp_status check, no setup attempt)
│
└── Extract the navigation graph
└─► /rn-dev-agent:nav-graph
(Maps all screens and navigators)
These apply to every RN task:
cdp_status before any app interaction or feature verificationcdp_*, device_*) for app state reads — never raw bashcdp_component_tree queries — never dump the full tree (10K+ tokens wasted)/rn-dev-agent:list-learned-actions BEFORE composing any device_* sequence. If a Maestro flow already covers the request, replay it via maestro_run first — manual primitives are a fallback, not a default. (Codified in feedback_execute_artifacts_before_manual.md. The original failure case: a 7-minute / 11-tool-call manual walk that an existing 23-second Maestro flow would have covered.)xcrun simctl or adb for app interaction (use MCP tools)cdp_status with direct WebSocket calls| Skill | Type | When loaded |
|---|---|---|
using-rn-dev-agent (this) | Meta / entry point | Start of any RN conversation |
rn-setup | Process | User runs /rn-dev-agent:setup or tools fail |
rn-feature-development | Process | Inside /rn-dev-agent:rn-feature-dev — 8-phase pipeline |
rn-testing | Reference + process | Test writing, Maestro flows, E2E verification |
rn-debugging | Reference + process | Diagnosing crashes, errors, blank screens |
rn-device-control | Reference | Simulator / emulator commands, screenshots |
rn-best-practices | Reference | 46 RN rules for architecture + review |
Two categories — invocation pattern matters:
These agents' protocols require cdp_* / device_* MCP tools, which don't
propagate to spawned subagents (GH #31). They are protocol playbooks —
read them as reference, execute the steps INLINE in the parent session.
| Agent | Model | Purpose | How to invoke |
|---|---|---|---|
rn-tester | sonnet | Verify feature works live on device | Run /test-feature — protocol executes inline in parent session |
rn-debugger | opus | Diagnose broken screen, apply fix | Run /debug-screen — protocol executes inline in parent session |
These use only Glob, Grep, LS, Read — no MCP tools. They can be spawned
in parallel via the Task tool for concurrent codebase analysis.
| Agent | Model | Purpose | How to invoke |
|---|---|---|---|
rn-code-explorer | sonnet | Map feature implementation across layers | Task(subagent_type='rn-dev-agent:rn-code-explorer', ...) — typically × 2-3 in parallel during /rn-feature-dev Phase 2 |
rn-code-architect | opus | Design blueprint with proof flow | Task(subagent_type='rn-dev-agent:rn-code-architect', ...) — typically × 1-2 during /rn-feature-dev Phase 4 |
rn-code-reviewer | sonnet | Review for bugs + RN convention violations | Task(subagent_type='rn-dev-agent:rn-code-reviewer', ...) — typically × 2-3 in parallel during /rn-feature-dev Phase 6 |
Agents skip this skill at the start of conversations. Don't.
| Excuse | Reality |
|---|---|
| "The user asked a specific question — I'll answer directly without routing" | You lose the workflow gates. /rn-feature-dev wouldn't skip Phase 5.5; neither should an ad-hoc answer. |
"I know what cdp_store_state does — skip reading rn-debugging" | Skills are not API docs. They contain the process knowledge (when to combine tools, when to fallback). You need that context. |
| "The user said 'fix the bug' — I'll just edit the file directly" | Route to /rn-dev-agent:debug-screen which runs the rn-debugger protocol inline in the parent session. Enforces reproduce → diagnose → fix → verify. Never spawn rn-debugger via Task tool — MCP tools won't work (GH #31). |
"I'll spawn rn-tester via Task to verify while I work on something else" | You can't — MCP stdio doesn't propagate to Task-spawned subagents (GH #31). rn-tester and rn-debugger are parent-session-only protocol playbooks. Only rn-code-explorer, rn-code-architect, rn-code-reviewer are safe to spawn (they're read-only, no MCP). |
| "This is a trivial change — I'll skip Phase 5.5 verification" | Trivial changes are where verification gates matter most. They're the ones you tell yourself don't need testing. They do. |
"I got HELPERS_NOT_INJECTED — let me retry cdp_status" | Retrying cdp_status does NOT re-run helper injection if the bridge thinks it's connected; it just returns status. The plugin auto-retries injection internally on every gated call (see "Recovering from HELPERS_NOT_INJECTED" below). If the auto-retry exhausted, switch to device_* tools (XCTest path — no helpers required) or call cdp_reload. Don't spin on cdp_status. |
If you notice yourself doing any of these at the start of an RN task, stop:
cdp_error_log or cdp_component_treexcrun simctl or adb instead of an MCP tooldevice_screenshot or cdp_* output/rn-dev-agent:setup because "tools probably work"/rn-dev-agent:rn-feature-devrn-tester or rn-debugger via Task tool — their protocols need MCP tools that don't propagate to subagents (GH #31). Run /test-feature or /debug-screen instead; the protocol executes inline in the parent session.cdp_status firstThings that repeatedly go wrong, cataloged for prevention:
| Failure | Cause | Fix |
|---|---|---|
Manual device_* walk for a flow that already exists as a YAML | Skipped /rn-dev-agent:list-learned-actions at session start | Run it BEFORE any UI work; replay matching flows via maestro_run |
| Feature ships with broken Android | Skipped cross_platform_verify | Always run it in Phase 5.5 unless explicitly scoped |
| "Works on my machine" bug | Claimed done without Phase 5.5 evidence | Every row in the results table must have a concrete Evidence value |
| Native crash missed entirely | Only checked cdp_error_log, not native logs | Use collect_logs(sources=["js_console","native_ios"]) together |
| Wasted 10K tokens on component tree | Called cdp_component_tree() without filter | Always filter by testID or component name |
| Tests silently broken after refactor | No Maestro flow exists | /rn-dev-agent:proof-capture generates one; use it |
| CDP session lost mid-task | Another debugger (DevTools, Flipper) connected | Close all other debuggers before starting |
Stuck on HELPERS_NOT_INJECTED for minutes | Retrying cdp_status instead of letting the auto-retry surface a final answer, or instead of falling back to device tools | The bridge auto-retries injection once before failing. When the error finally returns, it's authoritative — switch to device_* tools or call cdp_reload. Never sit in a cdp_status retry loop. |
When a cdp_* tool returns code: HELPERS_NOT_INJECTED, the bridge has already done all of this for you:
__RN_AGENT once with a 3s React-ready timeoutSo when you see this error, the JS world is genuinely hung — Hermes is up but __RN_AGENT won't land. Two recovery paths, in order:
| Step | Action | Why |
|---|---|---|
| 1 | Switch the immediate task to device_* tools (device_press, device_fill, device_snapshot, device_screenshot) | These run through XCTest / adb and don't depend on injected JS at all. The user's task usually doesn't need React fiber introspection — it just needs to interact with the visible UI. |
| 2 | If you specifically need React state (cdp_component_tree, cdp_store_state, cdp_navigation_state), call cdp_reload once | Forces a clean bundle reload + reconnect, which re-runs the full injection handshake. Note: any open modals, in-progress forms, or unsaved screen state are wiped — confirm with the user before reloading if their work is at risk. |
Anti-pattern: retrying cdp_status in a loop. The connection is up; status calls don't re-trigger injection in this state. They just return immediately and let you spin. The error code is your signal to change strategy, not to wait longer.
Before starting any real work, confirm:
cdp_status returns ok:true with cdp.connected: trueIf any of these fail, address them before proceeding.