argent-android-emulato…
Set up and connect to an Android emulator using argent MCP tools. Use when starting a new session on Android, booting an emulator, getting a device serial, or…
Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
$ npx -y skills add software-mansion/argent --skill argent-react-native-app-workflow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/argent-react-native-app-workflowContext preview
The summary Claude sees to decide when to auto-load this skill.
Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
name: argent-react-native-app-workflow description: Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
Physical iPhone (`kind: "device"`): Metro debugging and profiling tools reject it. Use a simulator.
**Before running commands**, read the project's build and run configuration from the `argent-environment-inspector` subagent result.
Do NOT default to `npx react-native start` or `npx react-native run-ios` without first checking for custom scripts and workflows.
**Manual fallback** (if neither the agent nor the tool is available): read ALL `package.json` scripts — look for custom scripts like `start:local`, `start:dev`, `ios`, `build:ios`, flavors, etc. Custom scripts take priority over default commands. Also check `metro.config.js` for non-default port or watchFolders. For iOS builds, prefer opening `.xcworkspace` over `.xcodeproj` (CocoaPods generates the workspace).
**If the project structure is convoluted, ask the user before proceeding.**
**Remember the workflow:** Once you discover the project's build/run workflow, save it to project memory so you don't need to re-discover it each time.
**Checklist before start:**
1. Check whether metro is already running on port found in configuration and if it is - do not start another server. Refer to point 2.1.
1. **Use the project's custom start script if one exists** (e.g. `npm run start:local`, `yarn start:dev`). Fall back to default commands if no custom scripts are defined:
npx react-native start
Optional: `npx react-native start --reset-cache` if cache issues are suspected.
1. **Verify Metro is ready**: use the `debugger-status` tool. It returns a `status` result instead of erroring: `status: "connected"` or `status: "not_connected"` with `reason: "no_app_connected"` both mean Metro is up (the app just hasn't attached yet); `reason: "metro_not_running"` means Metro is not reachable — follow the result's `guidance`.
1. **Projects with flavors or custom configs**: Use project-specific start script if present (e.g. `npm run start:local`), and start Metro **before** running the app.
In a **separate** terminal (Metro keeps running in the first):
**Use the project's custom build/run script if one exists** (e.g. `npm run ios`, `npm run android`, `yarn ios:debug`). Only fall back to the defaults below if no custom scripts are defined.
**Pass the target device explicitly** — derive it from `list-devices` (see `<device_selection_rule>`):
npx react-native run-ios --simulator="<name>" # iOS (or --udid <UDID>) npx react-native run-android --deviceId=<adb-serial> # Android
**Android only**: after install, run `adb -s <serial> reverse tcp:8081 tcp:8081` so the emulator/device can reach Metro on your host. Repeat if the device restarts or adb drops.
**Agent checklist:**
---
Before starting Metro, avoid "port already in use" errors. Default port to check is :8081, infer the port from documentation:
lsof -i :PORT
Use the `debugger-status` tool to check whether the process on that port is actually a Metro server — it returns a structured result, not an error. `status: "connected"` or `reason: "no_app_connected"` → the process is Metro. `reason: "metro_not_running"` while `lsof` shows a listener → the port is occupied by something that is **not** Metro; the result's `detail` field shows what the process answered (`Metro at port ... is not running (got: ...)`). In that case ask the user whether you may kill the process.
To kill a Metro process, use the `stop-metro` tool (requires user confirmation).
**Verify Metro is reachable:** use the `debugger-status` tool. `reason: "metro_not_running"` means Metro did not answer on that port — start it (§2.1); `"no_app_connected"` means Metro answered but the app has not attached (§2.3). Any other reason: follow the result's `guidance` (it does not by itself prove Metro is up).
After code or config changes, the app must load the new bundle:
| Method | How | | ----------- | ------------------------------------------------------------------------------------------------- | | Reload tool | Use the `debugger-reload-metro` tool | | Restart app | Use the `restart-app` tool, or kill the app in simulator and run `npx react-native run-ios` again |
**Agent checklist:**
---
An agentic toolkit to control, debug, and profile iOS and Android apps. Made by Software Mansion.
Repo: software-mansion/argent
Set up and connect to an Android emulator using argent MCP tools. Use when starting a new session on Android, booting an emulator, getting a device serial, or…
Create, record, edit, replay, or repair reusable Argent flow YAML files. Use when the user asks to record or replay a repeatable device path, set up profiling…
Interact with an iOS simulator, Android emulator, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures,…
Drive a physical iPhone through argent. Use when a physical iPhone is involved (a list-devices iOS entry with kind "device") and ONLY then; never for a…
Set up a cabled physical iPhone for argent. Use when a physical iPhone is involved (a list-devices iOS entry with kind "device") and ONLY then; never for a…
Set up and connect to an iOS simulator using argent MCP tools. Use when starting a new session, booting an iOS simulator, getting an iOS UDID, or before any…