
device-interaction
Verify iOS app behavior on device or simulator via screenshots, UI hierarchy, and touch interactions.
- Installs
- 742
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/superagents-lab/xcode27-skills --skill device-interaction- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads device-interaction automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Device Interaction
TRIGGER when: user asks to verify/test/check if the app works on device, after implementing a UI-affecting feature that needs device verification, user says "does it work", "test this", "check on device", user reports UI doesn't work as expected, need to debug touch/interaction issues. DO NOT TRIGGER when: user asks about unit tests only, build-only requests without device testing, code review without device testing, simulator configuration questions, changes that don't affect UI (e.g. comments, refactors, non-UI logic).
For the Main Agent
This is a SUBAGENT skill. Invoke it via the Agent tool when device verification is needed.
Agent tool:
- subagent_type: "general-purpose"
- description: "Verify login feature works"
- prompt: "Using the device-interaction skill, verify that the login feature works correctly on session <device-interaction-session>. Launch the app, capture screenshot and UI hierarchy, check that the login button is visible and tappable, and report if the implementation is working correctly."
After implementing a UI-affecting feature, invoke this skill to verify the implementation works on a device.
Session Lifecycle
DeviceInteractionStartSession (do this early, runs in the background)
→ DeviceInteractionInstallAndRun (after each code change; includes building)
→ DeviceEventSynthesize (interact + observe, repeatable)
→ DeviceInteractionEndSession (when done — keeping sessions open is resource-heavy)
DeviceInteractionStartSession tool
Device Discovery
When opening a new device interaction session, pass a device identifier to select a device, or omit it to use the current destination. Pass any non-matching value to get a list of available targets.
DeviceInteractionInstallAndRun tool
Optional Parameters
commandLineArguments— arguments passed to the app at launch. Use$(inherited)as a token to preserve the scheme's existing arguments (e.g.["$(inherited)", "--reset-state"]to add an extra argument at the end).environmentVariables— key/value pairs set in the app's environment at launch. Use"$(inherited)"as a key to preserve the scheme's existing environment variables (e.g.{"$(inherited)": "", "DEBUG_MODE": "1"}).
Omit both parameters to leave the scheme's arguments and environment unchanged.
Prefer these parameters over editing the scheme directly. They are applied only for that one run and have no lasting effect on the user's configuration.
For the Subagent
ALWAYS report UI issues that might be caused by code: overlapping or unreadable text, unexpectedly cropped image/text, wrong colors etc.
DeviceEventSynthesize tool
This tool allows performing an interaction and observing the state of a device.
Reading Hierarchy Files
The hierarchy files include calculated center positions for each element:
UIView {{100, 200}, {50, 30}}, center: {125.0, 215.0}
UIButton "Login" {{110, 205}, {30, 20}}, center: {125.0, 215.0}
{100, 200}- origin position{50, 30}- width and heightcenter: {125.0, 215.0}- calculated center point (best for tapping)
Always prefer the center coordinates for touch events.
Interaction Command Syntax
The interactionCommand parameter accepts a command syntax:
| Command | Description |
|---|---|
t <x> <y> [duration] | Tap at coordinates with optional hold duration |
d <x> <y> | Double tap |
t <x1> <y1> f <x2> <y2> [duration] | Swipe from (x1,y1) to (x2,y2) |
b h/p/u/d [duration] | Hardware button: h=Home, p=Power, u=VolUp, d=VolDown |
sender keyboard kbd <text> | Type text; must be the last command in the chain — all content after kbd is taken verbatim (multiple spaces preserved). For special characters use \u{XXXX} Unicode escapes: \u{000A} (return/newline), \u{0009} (tab) |
w duration | Wait for a duration without any work |
orientation faceDown/faceUp/landscapeLeft/landscapeRight/portrait/portraitUpsideDown | Set device orientation |
Examples:
"t 100 200"- Tap at (100, 200)"d 200 300"- Double tap at (200, 300)"t 200 600 f 200 200 0.3"- Swipe up (scroll to the content below)"t 200 200 f 200 600 0.3"- Swipe down (scroll to the content above)"b h"- Press home button"b h b h"- Press home button twice to go to the app switcher"b h w 0 b h"- Wake and unlock a device (non-passcode devices only)"sender keyboard kbd hello world"- Type text with spaces"sender keyboard kbd hello world"- Type text preserving multiple spaces"sender keyboard kbd submit\u{000A}"- Type text then press Return/submit"w 0.3"- Wait for 0.3s"orientation landscapeLeft"- Rotate device to landscape
Standard Subagent Workflow
Before any interaction, always capture and read the hierarchy (and screenshot). After any interaction, capture again and verify the result. For complex components (like toggles or switches), look at nested elements (like Switch or Slider) — nearby elements might correspond to the actual control. When done, report findings to the main agent.
- To capture without interacting, use DeviceEventSynthesize with an empty interactionCommand.
- Never guess positions from screenshots alone — always use hierarchy center coordinates.
- If not confident or thumbnail resolution is insufficient, analyze the full-size screenshot.
Timing and Retries
- App launch: After starting a session, the app may take a few seconds to load. Capture the hierarchy and check it has meaningful UI elements before interacting. If the hierarchy is mostly empty or shows a launch screen, capture again before proceeding.
- After interaction: If a tap or swipe doesn't produce the expected change, recapture the hierarchy and retry the interaction once (the element may have shifted during an animation). If it still fails after one retry, report the failure rather than retrying indefinitely.
- Loading states: If the hierarchy shows a spinner or loading indicator, capture again after a brief pause. Do not interact with elements that are still loading.
Judging Success vs Failure
When verifying, distinguish between these categories:
- Functional bug (always report): element doesn't respond to tap, navigation goes to wrong screen, crash, data not displayed, missing expected UI element.
- Visual/layout bug (always report): overlapping text, truncated labels, elements rendered off-screen, wrong colors, broken alignment.
- Transient state (do NOT report as bug): loading spinners, brief animations, keyboard appearing/dismissing. Capture again after the transition completes.
- Unexpected exits (always report): crashes, application exits. To identify, track process id and capture process's standard output.
- Expected behavior (do NOT report as bug): empty states with placeholder text, disabled buttons when form is incomplete, permission dialogs.
Error Handling
- If application is not visible, retry once, as this might be caused by a slow device.
- If tap target unclear, re-read hierarchy data for correct center coordinates.
- You can inspect runtime logs to troubleshoot. If you suspect timing bugs, suggest to the main agent that temporarily adding
printstatements in the relevant code may help diagnose the issue. - Report issues back to the main agent with details and suggestions.
FAQ
What does the device-interaction skill do?
Verify iOS app behavior on device or simulator via screenshots, UI hierarchy, and touch interactions.
How do I install device-interaction?
Run npx skills add https://github.com/superagents-lab/xcode27-skills --skill device-interaction in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/device-interaction/ (personal) or .claude/skills/device-interaction/ (project).
Which AI agents can use device-interaction?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is device-interaction safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains device-interaction?
It is published by superagents-lab in superagents-lab/xcode27-skills. It has 742 recorded installs.
More from superagents-lab/xcode27-skills
swiftui-specialist
superagents-lab/xcode27-skills
Best practices and idiomatic patterns for SwiftUI. Use when writing, reviewing, or editing SwiftUI code.
swiftui-whats-new-27
superagents-lab/xcode27-skills
New SwiftUI APIs, behaviors, and deprecations introduced in the 2027 OS releases (iOS 27, macOS 27, watchOS 27, tvOS 27, visionOS 27). Use when a SwiftUI view using @State fails to compile with "used before being initialized", "invalid redeclaration of synthesized property", or "extraneous argument label" errors after an SDK update (@State migrated from a property wrapper to a macro in SDK 27; the obvious fix of reordering init assignments is WRONG and produces incorrect runtime behavior; you MUST consult this skill's references before answering); when @ViewBuilder or @ContentBuilder code hits ambiguous overloads in overlay/background or type-check performance regressions after an SDK update; when the user asks what's new in SwiftUI (generally, or for a specific 2027 platform); when adding drag-to-reorder to any container (List, LazyVStack, LazyVGrid, stacks, or custom layouts) via reorderable()/reorderContainer, including the drag-and-drop that integrates with it (dragContainer, dropD
test-modernizer
superagents-lab/xcode27-skills
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
audit-xcode-security-settings
superagents-lab/xcode27-skills
Audit and enable security-oriented Xcode build settings. Progressively enables compiler warnings, static analyzer checkers, and Enhanced Security features. Use when: user wants to secure their Xcode project, audit security settings, enable hardening, review security posture of build configuration, set up security-focused static analysis, enable static analysis, improve warning coverage, harden diagnostics, or catch more bugs at compile time in C/C++/Objective-C/Swift. SKIP: network security (TLS/ATS), code signing, privacy APIs.
uikit-app-modernization
superagents-lab/xcode27-skills
Modernizes UIKit apps for multi-window environments by replacing legacy shared-state APIs with context-appropriate modern alternatives. This includes references to mainScreen, interfaceOrientation, application and scene lifecycle, as well as safe area inset updates.
c-bounds-safety
superagents-lab/xcode27-skills
Guide for the C -fbounds-safety language extension. Covers the language model, pointer annotations, adopting bounds-safety in existing C code, compiler build settings and modes, and runtime debugging of bounds violations.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.