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/exploration.md
Exploration
When to open this file
Open this file when the app or screen is already running and you need to discover the UI, choose targets, read state, wait for conditions, or perform normal interactions.
Read-only first
If the question is what text, labels, or structure is visible on screen, start with plain
snapshot.Escalate to
snapshot -ionly when you need refs such as@e3for interactive exploration or a requested action.If you intend to
press,fill, or otherwise interact, start withsnapshot -iand fall back to plainsnapshotonly if interactive refs are unavailable.Prefer
get,is, orfindbefore mutating the UI when a read-only command can answer the question.You may take the smallest reversible UI action needed to unblock inspection, such as dismissing a popup, closing an alert, or backing out of an unintended surface.
Do not type or fill text just to make hidden information easier to access unless the user asked for that interaction.
Do not use external sources to infer missing UI state unless the user explicitly asked.
If the answer is not visible or exposed in the UI, report that gap instead of compensating with search, navigation, or text entry.
Decision shortcut
User asks what is visible on screen:
snapshotUser asks for exact text from a known target:
get textUser asks you to tap, type, or choose an element:
snapshot -i, then actUI does not expose the answer: say so plainly; do not browse or force the app into a new state unless asked
Read-only commands
snapshotgetisfind
Interaction commands
snapshot -ipressfilltypewait
Most common mistake to avoid
Do not treat @ref values as durable after navigation or dynamic updates. Re-snapshot after the UI changes, and switch to selectors when the flow must stay stable.
Common example loops
These are examples, not required exact sequences. Adapt them to the app, state, and task at hand.
Interactive exploration loop
agent-device open Settings --platform ios
agent-device snapshot -i
agent-device press @e3
agent-device wait visible 'label="Privacy & Security"' 3000
agent-device get text 'label="Privacy & Security"'
agent-device closeScreen verification loop
agent-device open MyApp --platform ios
# perform the necessary actions to reach the state you need to verify
agent-device snapshot
# verify whether the expected element or text is present
agent-device closeSnapshot choices
Use plain
snapshotwhen you only need to verify whether visible text or structure is on screen.Use
snapshot -iwhen you need refs such as@e3for interactive exploration or for an intended interaction.Treat large text-surface lines in
snapshot -ias discovery output. If a node shows preview or truncation metadata, useget text @refonly after you have already decided thatsnapshot -iis needed for that surface.Use
snapshot -i -s "Camera"orsnapshot -i -s @e3when you want a smaller, scoped result.
Example:
agent-device snapshot -iSample output:
Page: com.apple.Preferences
App: com.apple.Preferences
@e1 [ioscontentgroup]
@e2 [button] "Camera"
@e3 [button] "Privacy & Security"Refs vs selectors
Use refs for discovery, debugging, and short local loops.
Use selectors for deterministic scripts, assertions, and replay-friendly actions.
Prefer selector or
@reftargeting over raw coordinates.For tap interactions,
pressis canonical andclickis an equivalent alias.
Examples:
agent-device press @e2
agent-device fill @e5 "test"
agent-device press 'id="camera_row" || label="Camera" role=button'
agent-device is visible 'id="camera_settings_anchor"'Text entry rules
Use
fillto replace text in an editable field.Use
typeto append text to the current insertion point.Do not use
fillortypejust to make the app reveal information that is not currently visible unless the user asked for that interaction.
Query and sync rules
Use
getto read text, attrs, or state from a known target.Use
isfor assertions.Use
waitwhen the UI needs time to settle after a mutation.Use
find "<query>" click --jsonwhen you need search-driven targeting plus matched-target metadata.If you are forced onto raw coordinates, open coordinate-system.md first.
Example:
agent-device find "Increment" click --jsonReturned metadata comes from the matched snapshot node and can be used for observability or replay maintenance.
QA from acceptance criteria
Use this loop when the task starts from acceptance criteria and you need to turn them into concrete checks.
Preferred mapping:
visibility claim for what is on-screen now:
is visibleor plainsnapshotpresence claim regardless of viewport visibility:
is existsexact text, label, or value claim:
get textpost-action state change: act, then
wait, thenisorgetnearby structural UI change:
diff snapshotproof artifact for the final result:
screenshotorrecord
Notes:
wait textis useful for synchronizing on text presence, but it is not the same asis visible.
Anti-hallucination rules:
Do not invent app names, device ids, session names, refs, selectors, or package names.
Discover them first with
devices,open,snapshot -i,find, orsession list.If refs drift after navigation, re-snapshot or switch to selectors instead of guessing.
Avoid this escalation path for visible-text questions:
Do not jump from
snapshot -itoget text @ref, then to web search, then to typing into a search box just to force the app to reveal the answer.Start with
snapshot. If the text is not visible or exposed, report that directly.
Canonical QA loop:
agent-device open MyApp --platform ios
agent-device snapshot -i
agent-device press @e3
agent-device wait visible 'label="Success"' 3000
agent-device is visible 'label="Success"'
agent-device screenshot /tmp/qa-proof.png
agent-device closeAccessibility audit
Use this pattern when you need to find UI that is visible to a user but missing from the accessibility tree.
Audit loop:
Capture a
screenshotto see what is visually rendered.Capture a
snapshotorsnapshot -ito see what the accessibility tree exposes.Compare the two:
visible in screenshot and present in snapshot: exposed to accessibility
visible in screenshot and missing from snapshot: likely accessibility gap
If you suspect the node exists in AX but is filtered from interactive output, retry with
snapshot --raw.
Example:
agent-device screenshot /tmp/accessibility-screen.png
agent-device snapshot -iUse screenshot as the visual source of truth and snapshot as the accessibility source of truth for this audit.
Batch only when the sequence is already known
Use batch when a short command sequence is already planned and belongs to one logical screen flow.
agent-device batch --session sim --platform ios --steps-file /tmp/batch-steps.json --jsonKeep batch size moderate, roughly 5 to 20 steps.
Add
waitoris existsguards after mutating steps.Do not use
batchfor highly dynamic flows that need replanning after each step.
Step payload contract:
[
{ "command": "open", "positionals": ["Settings"], "flags": { "platform": "ios" } },
{ "command": "wait", "positionals": ["label=\"Privacy & Security\"", "3000"], "flags": {} },
{ "command": "click", "positionals": ["label=\"Privacy & Security\""], "flags": {} },
{ "command": "get", "positionals": ["text", "label=\"Tracking\""], "flags": {} }
]positionalsis optional and defaults to[].flagsis optional and defaults to{}.Only
command,positionals,flags, andruntimeare accepted as top-level step keys.Nested
batchandreplayare rejected.Supported error mode is stop-on-first-error.
Response handling:
Success returns fields such as
total,executed,totalDurationMs, andresults[].Human-mode
batchruns also print a short per-step success summary.Failed runs include
details.step,details.command,details.executed, anddetails.partialResults.Replan from the first failing step instead of rerunning the whole flow blindly.
Common batch error categories:
INVALID_ARGS: fix the payload shape and retry.SESSION_NOT_FOUND: open or select the correct session, then retry.UNSUPPORTED_OPERATION: switch to a supported command or surface.AMBIGUOUS_MATCH: refine the selector or locator, then retry the failed step.COMMAND_FAILED: add sync guards and retry from the failing step.
Stop conditions
If refs drift after transitions, switch to selectors.
If a desktop surface or context menu is involved on macOS, load macos-desktop.md.
If logs, network, alerts, or setup failures become the blocker, switch to debugging.md.
If the flow is stable and you need proof or replay maintenance, switch to verification.md.
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