You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/agent-device/SKILL.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,15 @@ Router only. Private setup before using this skill:
11
11
agent-device --version
12
12
```
13
13
14
-
Require `agent-device >= 0.14.0`; older CLIs lack these help topics. If older, run `npm install -g agent-device@latest`, recheck, then continue. If you cannot upgrade, stop and tell the user. Do not include version/upgrade commands in final plans.
14
+
If that fails but the user installed `agent-device` globally, try the user's login shell before using `npx`:
15
+
16
+
```bash
17
+
zsh -lic 'command -v agent-device'
18
+
```
19
+
20
+
If it prints a path, run that absolute path instead of `agent-device`. For non-zsh shells, use the equivalent login-shell command.
21
+
22
+
Require `agent-device >= 0.14.0`; older CLIs lack these help topics. If older, stop and tell the user to upgrade the trusted install or approve an exact-version npm command. Do not run `npm install -g agent-device@latest` or `npx -y agent-device@latest` autonomously, and do not include version/upgrade commands in final plans.
15
23
16
24
Before your first agent-device command or plan, read the version-matched CLI guide:
Copy file name to clipboardExpand all lines: skills/dogfood/SKILL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ Router for exploratory QA. Private setup before using this skill:
12
12
agent-device --version
13
13
```
14
14
15
-
Require `agent-device >= 0.14.0`; older CLIs lack these help topics. If older, run `npm install -g agent-device@latest`, recheck, then continue. If you cannot upgrade, stop and tell the user. Do not include version/upgrade commands in final plans.
15
+
If that fails, stop and tell the user to expose a trusted `agent-device` binary on PATH or approve an exact-version npm command. This skill intentionally keeps allowed tools restricted to `agent-device` and `npx agent-device`.
16
+
17
+
Require `agent-device >= 0.14.0`; older CLIs lack these help topics. If older, stop and tell the user to upgrade the trusted install or approve an exact-version npm command. Do not run `npm install -g agent-device@latest` or `npx -y agent-device@latest` autonomously, and do not include version/upgrade commands in final plans.
Copy file name to clipboardExpand all lines: website/docs/docs/agent-setup.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,16 @@ agent-device --version
19
19
agent-device help workflow
20
20
```
21
21
22
-
For one-off use without a global install:
22
+
For one-off human use without a global install:
23
23
24
24
```bash
25
-
npx -y agent-device@latest --version
26
-
npx -y agent-device@latesthelp workflow
25
+
npx agent-device --version
26
+
npx agent-device help workflow
27
27
```
28
28
29
-
Global install is better for normal agent workflows because repeated commands, skills, and terminal sessions resolve to one stable version.
29
+
Global install is better for normal agent workflows because repeated commands, skills, and terminal sessions resolve to one stable version. Project-local installs are also good when you want a lockfile-pinned agent-device version.
30
+
31
+
Avoid telling agents to choose an npm version or run `npx -y agent-device@latest` autonomously: it fetches and executes a mutable npm package without a human prompt. For unattended agent use, prefer a trusted installed binary, a project-local install, or a version supplied by the user or project config.
30
32
31
33
For Node, Xcode, Android SDK, macOS, and iOS device prerequisites, see [Installation](/docs/installation).
32
34
@@ -47,7 +49,7 @@ Add this as a project rule, custom instruction, or skill equivalent when your ag
47
49
```text
48
50
Use agent-device only for app/device automation tasks. Before planning commands, run `agent-device --version` and read `agent-device help workflow`. For exploratory QA, read `agent-device help dogfood`. For logs, network, traces, or runtime failures, read `agent-device help debugging`. For React Native component trees, props/state/hooks, slow renders, or rerenders, read `agent-device help react-devtools`.
49
51
50
-
Use the CLI in the integrated terminal. MCP is only a discovery/help router and does not expose device automation tools. Prefer `open -> snapshot -i -> act -> re-snapshot -> verify -> close`. Use current refs such as `@e3` for exploration and selectors for durable replay. Keep mutating commands against one session serial. Capture screenshots, logs, network, perf, traces, recordings, and `.ad` replay scripts only when they add evidence.
52
+
Use the CLI in the integrated terminal. If `agent-device` is not on PATH but the user installed it globally in another shell, ask the user's login shell for the absolute path and run that path instead. For macOS zsh users, use `zsh -lic 'command -v agent-device'`; for other shells, use the equivalent login-shell lookup. Do not silently fall back to `npx -y agent-device@latest`; ask or use an exact version. MCP is only a discovery/help router and does not expose device automation tools. Prefer `open -> snapshot -i -> act -> re-snapshot -> verify -> close`. Use current refs such as `@e3` for exploration and selectors for durable replay. Keep mutating commands against one session serial. Capture screenshots, logs, network, perf, traces, recordings, and `.ad` replay scripts only when they add evidence.
51
53
```
52
54
53
55
## MCP router
@@ -67,14 +69,14 @@ Global install configuration:
67
69
}
68
70
```
69
71
70
-
No global install variant:
72
+
No global install variant. Pin a user- or project-selected package version for unattended agent use:
@@ -106,6 +108,16 @@ agent-device open <app-or-url> --platform ios
106
108
agent-device snapshot -i
107
109
```
108
110
111
+
Some agent clients run commands in an environment that differs from the user's normal install shell. If the user installed `agent-device` globally but the agent cannot find it, have the agent ask the user's login shell for the absolute path.
112
+
113
+
For macOS zsh users:
114
+
115
+
```bash
116
+
zsh -lic 'command -v agent-device'
117
+
```
118
+
119
+
For other shells, use the equivalent login-shell lookup. Then use the printed path for `--version`, `help workflow`, and subsequent commands.
120
+
109
121
For reviews or planning-only tasks, tell the agent not to run devices unless explicitly requested.
Copy file name to clipboardExpand all lines: website/docs/docs/installation.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,16 @@ agent-device help debugging
23
23
agent-device help react-devtools
24
24
```
25
25
26
+
Some agent clients run commands in an environment that differs from the user's normal install shell. If `agent-device` is missing in the agent terminal but was installed globally elsewhere, ask the user's login shell for the absolute path.
27
+
28
+
For macOS zsh users:
29
+
30
+
```bash
31
+
zsh -lic 'command -v agent-device'
32
+
```
33
+
34
+
For other shells, use the equivalent login-shell lookup. Then use the printed path for agent commands.
35
+
26
36
For Cursor, Codex, Claude Code, Windsurf, Cline, Goose, skills, project rules, and MCP configuration, see [AI Agent Setup](/docs/agent-setup). For the first app automation commands, see [Quick Start](/docs/quick-start).
27
37
28
38
Interactive CLI runs periodically check for a newer published `agent-device` package in the background. When an upgrade is available, the CLI suggests reinstalling the package globally:
@@ -47,12 +57,12 @@ Use [AI Agent Setup](/docs/agent-setup#mcp-router) for copy-paste MCP client con
47
57
## Without installing
48
58
49
59
```bash
50
-
npx -y agent-device@latest --version
51
-
npx -y agent-device@latesthelp workflow
52
-
npx -y agent-device@latest open Settings --platform ios
60
+
npx agent-device --version
61
+
npx agent-device help workflow
62
+
npx agent-device open Settings --platform ios
53
63
```
54
64
55
-
One-off `npx` usage is fine for humans and scripts. For agents, prefer global install so repeated commands and any installed skills resolve to the same CLI version. If an agent cannot rely on skills, it should run `agent-device help` or `agent-device help workflow` before planning device commands.
65
+
One-off `npx` usage is fine for humans and scripts that intentionally fetch from npm. For agents, prefer a global install, a project-local install, or a version supplied by the user or project config so repeated commands resolve to a known CLI. Do not ask agents to choose a version or run `npx -y agent-device@latest` without an explicit trust decision.
0 commit comments