Agent 技能排查
- 作者仓库星标 4,864
- 作者仓库 App
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>.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @Expensify · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 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…
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
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).
If metro prepare fails, STOP and surface the error verbatim.
# 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
```bash
agent-device apps --user-installed --platform <p> --json
```
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Pre-flight (auto) → Bring-up → 1. Platform → 2. Bundle ID → 3. Confirm dev build is installed → 4. Metro
要点 -> STOP · must · current · These checks evaluate at skill load. · 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. · HybridApp dev builds only (the pre-flight gate enforces this). · If the resolved bundle ID is missing from the list, STOP and instruct the developer to run the matching build script from the table.
文件/命令 -> FAIL · agent-device · open · snapshot · replay · ios · android · com.expensify.expensifylite
内容 SHA-256 -> 0ba3ce5ce654
原文结构
适用与边界
原文中的明确线索
FAIL、agent-device、open、snapshot、replay、ios、android、com.expensify.expensifylite