Agent Device
CallstackOfficialPublished by Callstack
- Skill
- Tool integration
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The agent-device skill provides a structured framework for automating device interactions, including navigation, UI inspection, and input simulation. It enforces a deterministic workflow by requiring setup via bootstrap references before proceeding to exploration and interaction. The skill emphasizes read-only inspection and selector-based targeting to ensure stability, while providing specific guidance for handling different device types and platforms.
What it does
- Manages app sessions, including launching, installing, and relaunching applications.
- Performs UI inspection through snapshots and element referencing.
- Executes user-like interactions such as tapping, typing, and scrolling.
- Supports cross-platform automation for mobile, TV, and desktop environments.
- Provides structured paths for debugging, verification, and environment setup.
- Enforces safe interaction patterns by prioritizing read-only checks before mutations.
When to use it
- When you need to automate UI testing or interaction on mobile, TV, or desktop apps.
- When you need to verify app state or extract UI information from a running session.
- When you need to perform repeatable setup tasks like installing or launching specific app versions.
- When you need to perform bug hunting or pass/fail QA against acceptance criteria.
Advantages
- Promotes deterministic behavior by separating environment setup from UI interaction.
- Reduces errors by favoring selector-based targeting over fragile coordinate-based actions.
- Provides a consistent interface across diverse platforms like iOS, Android, and macOS.
- Encourages safe, reversible UI actions to prevent unintended state changes.
Usage examples
- “Open the test app on my iPhone simulator and check if the login button is visible.”
- The agent will use bootstrap-install to ensure the simulator is ready, open the app, and then use exploration to verify the presence of the login button.
- “Install the latest build of my Android app and navigate to the settings menu.”
- The agent will use the install command to deploy the APK, open the app, and perform the necessary navigation steps to reach the settings screen.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/callstackincubator/agent-device/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip agent-device.zip -d .agents/skills
Documentation by Callstack
agent-device
Use this skill as a router with mandatory defaults. Read this file first. For normal device tasks, always load references/bootstrap-install.md and references/exploration.md before acting. Use bootstrap to confirm or establish deterministic setup. Use exploration for UI inspection, interaction, and verification once the app session is open.
Default operating rules
Start conservative. Prefer read-only inspection before mutating the UI.
Use plain
snapshotwhen the task is to verify what text or structure is currently visible on screen.Use
snapshot -ionly when you need interactive refs such as@e3for a requested action or targeted query.Avoid speculative mutations. You may take the smallest reversible UI action needed to unblock inspection or complete the requested task, such as dismissing a popup, closing an alert, or clearing an unintended surface.
Do not browse the web or use external sources unless the user explicitly asks.
Re-snapshot after meaningful UI changes instead of reusing stale refs.
Prefer
@refor selector targeting over raw coordinates.Ensure the correct target is pinned and an app session is open before interacting.
Keep the loop short:
open-> inspect/act -> verify if needed ->close.
Default flow
Load references/bootstrap-install.md and references/exploration.md before acting on a normal device task.
Use bootstrap first to confirm or establish the correct target, app install, and open app session.
Once the app session is open and stable, use exploration for inspection, interaction, and verification.
Start with plain
snapshotif the goal is to read or verify what is visible.Escalate to
snapshot -ionly if you need refs for interactive exploration or a requested action.Use
get,is, orfindbefore mutating the UI when a read-only command can answer the question.End by capturing proof if needed, then
close.
QA modes
Open-ended bug hunt with reporting: use ../dogfood/SKILL.md.
Pass/fail QA from acceptance criteria: stay in this skill, start with references/bootstrap-install.md, then use the QA loop in references/exploration.md.
Required references
For every normal device task, after reading this file, load references/bootstrap-install.md first, then references/exploration.md, before acting.
Use bootstrap to confirm or establish deterministic setup, especially in sandbox or cloud environments.
Use exploration once the app session is open and stable.
Load additional references only when their scope is needed.
Decision rules
Use plain
snapshotwhen you need to verify whether text is visible.Use
snapshot -imainly for interactive exploration and choosing refs.Use
get,is, orfindwhen they can answer the question without changing UI state.Use
fillto replace text.Use
typeto append text.When a task asks to "go back", use plain
backfor predictable app-owned navigation and reserveback --systemfor platform back gestures or button semantics.Use
type --delay-msorfill --delay-msfor debounced search fields that drop characters when typed too quickly.If there is no simulator, no app install, or no open app session yet, switch to
bootstrap-install.mdinstead of improvising setup steps.Use the smallest unblock action first when transient UI blocks inspection, but do not navigate, search, or enter new text just to make the UI reveal data unless the user asked for that interaction.
Do not use external lookups to compensate for missing on-screen data unless the user asked for them.
If the needed information is not exposed on screen, say that plainly instead of compensating with extra navigation, text entry, or web search.
Prefer
@refor selector targeting over raw coordinates.
Additional references
Need logs, network, alerts, permissions, or failure triage: references/debugging.md
Need screenshots, diff, recording, replay maintenance, or perf data: references/verification.md
Need desktop surfaces, menu bar behavior, or macOS-specific interaction rules: references/macos-desktop.md
Need remote HTTP transport,
--remote-configlaunches, or tenant leases on a remote macOS host: references/remote-tenancy.md
Files
- ATTRIBUTION.mdAdded by AutoGineer920 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md4.8 KiB
- references/bootstrap-install.md9.0 KiB
- references/coordinate-system.md649 B
- references/debugging.md4.9 KiB
- references/exploration.md9.0 KiB
- references/macos-desktop.md3.3 KiB
- references/remote-tenancy.md4.9 KiB
- references/verification.md3.9 KiB
references/bootstrap-install.md
Bootstrap and Install
When to open this file
Open this file when you still need to choose the right target, start the right session, install or relaunch the app, or pin automation to one device before interacting. This is the deterministic setup layer for sandbox, cloud, or other environments where install paths, device state, or app readiness may be uncertain.
Open-first path
devicesappsensure-simulatoropensession list
Install path
installorreinstall
Most common mistake to avoid
Do not start acting before you have pinned the correct target and opened an app session. In mixed-device environments, always pass --device, --udid, or --serial.
Deterministic setup rule
If there is no simulator, no app install, no open app session, or any uncertainty about where the app should come from, stay in this file and use deterministic setup commands or bootstrap scripts first. Do not improvise install paths or app-launch flows while exploring.
After setup is confirmed or completed, move to exploration.md before doing UI inspection or interaction.
Open-first rule
If the user asks to test an app and does not provide an install artifact or explicit install instruction, try
open <app>first.If
open <app>fails, runagent-device appsand retry with a discovered app name before considering install steps.Do not install or reinstall on the first attempt unless the user explicitly asks for installation or provides a concrete artifact path or URL.
When installation is required from a known location, prefer a checked-in shell script or other deterministic bootstrap command over ad hoc path guessing.
If
open <app>fails, or you are not sure which app name is available on the target, runagent-device appsfirst and choose from the discovered app list instead of guessing.Use
apps --platform <platform>together with--device,--udid, or--serialwhen target selection matters.Once you have the correct app name, retry
openwith that exact discovered value.
Common starting points
These are examples, not required exact sequences. Use the smallest setup flow that matches the task.
Boot a simulator and open an app
agent-device ensure-simulator --platform ios --device "iPhone 17 Pro" --boot
agent-device open MyApp --platform ios --device "iPhone 17 Pro" --relaunchInstall an app artifact
agent-device install com.example.app ./build/app.apk --platform android --serial emulator-5554agent-device install com.example.app ./build/MyApp.app --platform ios --device "iPhone 17 Pro"Install guidance
Use
install <app> <path>when the app may already be installed and you do not need a fresh-state reset.Use
reinstall <app> <path>when you explicitly need uninstall plus install as one deterministic step.Keep install and open as separate phases. Do not turn them into one default command flow.
Supported binary formats:
Android:
.apkand.aabiOS:
.appand.ipa
For iOS
.ipafiles,<app>is used as the bundle id or bundle name hint when the archive contains multiple app bundles.After install or reinstall, later use
open <app>with the exact discovered or known package/bundle identifier, not the artifact path.
Choose the right starting point
iOS local QA: prefer simulators unless the task explicitly requires physical hardware.
iOS in mixed simulator and device environments: run
ensure-simulatorfirst, then keep using--deviceor--udid.TV targets: use
--target tvtogether with--platformwhen the task is for tvOS or Android TV rather than phone or tablet surfaces.Android binary flow: use
installorreinstallfor.apkor.aab, then open by installed package name.macOS desktop app flow: use
open <app> --platform macos. Only load macos-desktop.md if a desktop surface or macOS-specific behavior matters.
TV example:
agent-device open MyTvApp --platform ios --target tv
agent-device open com.example.androidtv --platform android --target tvSession rules
Use
--session <name>when you need a named session:
agent-device --session auth open Settings --platform ios
agent-device --session auth snapshot -iUse
open <app>before interactions.Use
closewhen done. Add--shutdownwhen you want simulators or emulators torn down with the session.Use semantic session names when you need multiple concurrent runs.
Use
--save-script=<path>onclosewhen you want to keep a replay script.For dev loops where state can linger, prefer
open <app> --relaunch.In iOS sessions, use
open <app>for the app itself. Useopen <url>for deep links, andopen <app> <url>when you need to launch the app and deep link in one step.On iOS,
appstateis session-scoped and requires the matching active session on the target device.
After a session is established
Once you have opened the correct session on the correct target, default to the conservative rule: keep the session binding on follow-up commands, and stop repeating device-routing flags unless you are intentionally retargeting.
Prefer
--session <name>on follow-up commands, or use sandboxedAGENT_DEVICE_SESSION.Do not keep repeating
--platform,--target,--device,--udid,--serial, or similar target-selection flags on normal follow-up commands.Only omit follow-up session flags when the environment explicitly guarantees isolation.
Good shared-host pattern:
agent-device --session auth open Settings --platform ios --device "iPhone 17 Pro"
agent-device --session auth snapshot -i
agent-device --session auth press @e3
agent-device --session auth closeBad shared-host pattern:
agent-device --session auth open Settings --platform ios --device "iPhone 17 Pro"
agent-device --session auth snapshot -i --platform ios --device "iPhone 17 Pro"Use target-selection flags again only when you are choosing the target before opening a session, or when you explicitly mean to retarget.
Session-bound automation
Use this when an orchestrator must keep plain CLI calls on one session and device.
export AGENT_DEVICE_SESSION=qa-ios
export AGENT_DEVICE_PLATFORM=ios
export AGENT_DEVICE_SESSION_LOCK=strip
agent-device open MyApp --relaunchAGENT_DEVICE_SESSIONplusAGENT_DEVICE_PLATFORMprovides the default binding.--session-lock reject|stripcontrols whether conflicting per-call routing flags fail or are ignored.Conflicts include explicit retargeting flags such as
--platform,--target,--device,--udid,--serial,--ios-simulator-device-set, and--android-device-allowlist.Lock policy applies to nested
batchsteps too.Compatibility aliases remain supported:
--session-locked,--session-lock-conflicts,AGENT_DEVICE_SESSION_LOCKED, andAGENT_DEVICE_SESSION_LOCK_CONFLICTS.
Android emulator variant:
export AGENT_DEVICE_SESSION=qa-android
export AGENT_DEVICE_PLATFORM=android
agent-device --session-lock reject open com.example.myapp --relaunchScoped discovery
Use scoped discovery when one run must not see host-global device lists.
agent-device devices --platform ios --ios-simulator-device-set /tmp/tenant-a/simulators
agent-device devices --platform android --android-device-allowlist emulator-5554,device-1234Scope is applied before
--device,--udid, and--serial.Out-of-scope selectors fail with
DEVICE_NOT_FOUND.With iOS simulator-set scope enabled, iOS physical devices are not enumerated.
If the scoped iOS simulator set is empty, the error should point at the set path and suggest creating a simulator in that set.
Environment equivalents:
AGENT_DEVICE_IOS_SIMULATOR_DEVICE_SETAGENT_DEVICE_ANDROID_DEVICE_ALLOWLIST
Session inspection and replay
agent-device session list
agent-device replay ./session.ad --session auth
agent-device replay -u ./session.ad --session authiOS session entries include
device_udidandios_simulator_device_set. Use them to confirm routing in concurrent runs.Prefer selector-based actions and assertions in saved replay scripts.
Tenant isolation namespaces sessions as
<tenant>:<session>during tenant-scoped runs.
When to leave this file
Once the correct target and session are pinned, move to exploration.md.
If opening, startup, permissions, or logs become the blocker, switch to debugging.md.
Install examples
agent-device reinstall MyApp /path/to/app-debug.apk --platform android --serial emulator-5554agent-device install com.example.app ./build/MyApp.ipa --platform ios --device "iPhone 17 Pro"Do not use open <apk|aab> --relaunch on Android.
Security and trust notes
Treat signing, provisioning, and daemon auth values as host secrets. Do not paste them into shared logs or commit them to source control.
Prefer Xcode Automatic Signing over manual overrides when a physical iOS device is involved.
Keep persistent host-specific defaults in environment variables rather than checked-in project config.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Callstack
- Publisher
- Callstack (Official)
- Source
- callstackincubator/agent-skills · plugins/vendored/.agents/skills/agent-device · commit 59e9d17
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Callstack.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download agent-device.zip