agent-device
- Repo stars 4,864
- Author updated Live
- Author repo App
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @Expensify · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-device
description: Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling…
category: ai
runtime: no special runtime
---
# agent-device output preview
## PART A: Task fit
- Use case: 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..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Pre-flight (auto) / Bring-up / 1. Platform” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “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.”.
- **02** When the source has headings, the agent prioritizes “Pre-flight (auto) / Bring-up / 1. Platform” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Pre-flight (auto) / Bring-up / 1. Platform”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: agent-device
description: Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling…
category: ai
source: Expensify/App
---
# agent-device
## When to use
- Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling, bug reproduction, and…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Pre-flight (auto) / Bring-up / 1. Platform” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "agent-device" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Pre-flight (auto) / Bring-up / 1. Platform
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} agent-device
Pre-flight (auto)
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."
Bring-up
Run this sequence the first time the user asks for device interaction in a session, before any open / snapshot / replay.
1. Platform
If the user prompt names ios or android explicitly, use it. Otherwise ask. Only iOS and Android are supported; reject other platforms.
2. Bundle ID
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 |
3. Confirm dev build is installed
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).
4. Metro
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.
5. Pick a target device
agent-device devices --platform <p> --json
- Prefer the first device with
booted=true. - If none are booted, choose the default target device (usually the first listed), then continue to step 6 to detect and clear any stale session bound to that device before opening.
- If multiple are booted, ask the user which.
Capture the device name and (for iOS) the simulator UDID, or (for Android) the serial.
6. Session reuse vs reset
agent-device session list --json
For each entry whose device_udid (iOS) or serial (Android) matches the chosen device:
- If the session was created earlier in the current Claude invocation, reuse it silently.
- Otherwise prompt:
reuse(continue with the existing session) orreset(force-close it).- To reset:
agent-device close --shutdown --session <name>.--shutdownalso frees the simulator.
- To reset:
7. Open
agent-device open <bundle-id> --platform <p> --device "<name>"
If open errors with "app not installed", revisit step 3.
8. Sanity
agent-device snapshot -i
Confirm the app rendered. From here, follow the Agent decision loop for repeatable flows or drive interactively.
Canonical skill references
Read these files directly for device automation guidance (bootstrap, exploration, verification, debugging): !echo "$(npm root -g)/agent-device/skills/agent-device"
Flows
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>.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review