with one click
agent-device
// Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling, bug reproduction, and feature verification. Use when the developer needs to interact with the mobile app on a device.
// Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling, bug reproduction, and feature verification. Use when the developer needs to interact with the mobile app on a device.
Provides coding standards for React Native — performance patterns, consistency rules, and clean React architecture. Use when writing, modifying, or reviewing code.
Records iOS/Android native MP4 evidence for test/repro flows extracted from an Expensify GitHub PR or issue. Use when the user asks to "record the flow for PR
Use when measuring a Sentry performance span locally with an agent-device replay flow on iOS simulator or Android emulator.
Analyze Sentry issues, spans, crashes, and performance metrics. Use when user requests check in Sentry, asks about performance metrics and spans or asks about crash rates.
Test the Expensify App using Playwright browser automation. Use when user requests browser testing, after making frontend changes, or when debugging UI issues
Onyx state management patterns — useOnyx hook, action files, optimistic updates, collections, and offline-first architecture. Use when working with Onyx connections, writing action files, debugging state, or implementing API calls with optimistic data.
| name | agent-device |
| description | Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling, bug reproduction, and feature verification. Use when the developer needs to interact with the mobile app on a device. |
| allowed-tools | Bash(agent-device *) Bash(npm root *) Bash(scripts/is-hybrid-app.sh) |
These checks evaluate at skill load. If any line shows FAIL, stop and surface the fix before running any device command.
agent-device version: !R=0.13.0; V=$(agent-device --version 2>/dev/null); [ -n "$V" ] && [ "$(printf '%s\n%s\n' "$R" "$V" | sort -V | head -1)" = "$R" ] && echo "OK ($V)" || echo "FAIL (need v$R+, got: ${V:-not installed}). Fix: npm install -g agent-device@latest"
Bundled CLI skills dir: !D="$(npm root -g)/agent-device/skills/agent-device"; test -s "$D/SKILL.md" && echo "OK ($D)" || echo "FAIL (missing $D/SKILL.md). Fix: npm install -g agent-device@latest"
HybridApp mode: !M=$(scripts/is-hybrid-app.sh 2>/dev/null | tail -1); [ "$M" = "true" ] && echo "OK (HybridApp)" || echo "FAIL (got: ${M:-unknown}). This skill only supports the HybridApp build - ensure the Mobile-Expensify submodule is present."
Run this sequence the first time the user asks for device interaction in a session, before any open / snapshot / replay.
If the user prompt names ios or android explicitly, use it. Otherwise ask. Only iOS and Android are supported; reject other platforms.
HybridApp dev builds only (the pre-flight gate enforces this).
| Platform | Bundle ID | Build script |
|---|---|---|
ios | com.expensify.expensifylite | npm run ios |
android | org.me.mobiexpensifyg.dev | npm run android |
agent-device apps --user-installed --platform <p> --json
If the resolved bundle ID is missing from the list, STOP and instruct the developer to run the matching build script from the table. HybridApp mobile builds must be initiated from Mobile-Expensify/ (per project CLAUDE.md).
agent-device metro prepare --public-base-url http://localhost:8081 --port 8081 --kind react-native
If metro prepare fails, STOP and surface the error verbatim.
agent-device devices --platform <p> --json
booted=true.Capture the device name and (for iOS) the simulator UDID, or (for Android) the serial.
agent-device session list --json
For each entry whose device_udid (iOS) or serial (Android) matches the chosen device:
reuse (continue with the existing session) or reset (force-close it).
agent-device close --shutdown --session <name>. --shutdown also frees the simulator.agent-device open <bundle-id> --platform <p> --device "<name>"
If open errors with "app not installed", revisit step 3.
agent-device snapshot -i
Confirm the app rendered. From here, follow the Agent decision loop for repeatable flows or drive interactively.
Read these files directly for device automation guidance (bootstrap, exploration, verification, debugging): !echo "$(npm root -g)/agent-device/skills/agent-device"
Repeatable steps (sign-in, onboarding, etc.) are captured as composable .ad snippets under flows/. For interactive usage, propose and run only flows/macros/ helpers. flows/tests/ belongs to a separate QA workflow and must not be proposed by this skill; QA/perf runs execute them via agent-device test <path>.