Community编程与开发github.com

agent-device

自动化 Apple 平台应用(iOS、tvOS、macOS)和 Android 设备的交互。用于在移动、电视和桌面目标上导航应用、截图、点击、输入、滚动或提取 UI 信息。

agent-device 是什么?

agent-device 是一个专门用于自动化移动和桌面设备交互的技能,支持 iOS、tvOS、macOS 和 Android 平台。它提供了一套结构化的操作流程,帮助 AI 代理高效地导航应用、捕获屏幕截图、执行点击和输入操作、滚动页面以及提取 UI 层次结构信息。该技能的核心优势在于其保守的操作策略:默认优先使用只读命令(如 snapshot、get、is、find)来检查 UI 状态,避免不必要的变更。同时,它依赖于两个关键参考文档:bootstrap-install.md 用于确认或建立确定性的测试环境(特别是在沙盒或云端环境中),exploration.md 用于指导 UI 检查、交互和验证流程。agent-device 支持多种平台目标,并针对不同场景(如 QA 模式、调试、验证、macOS 桌面交互和远程设备租用)提供了专门的附加参考文档,使得整个自动化流程既强大又可控。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/callstackincubator/agent-skills/tree/main/plugins/vendored/.agents/skills/agent-device

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

agent-device 是做什么的?

将此技能作为路由器使用,并遵循强制性默认规则。请首先阅读此文件。对于正常设备任务,始终在执行前加载 references/bootstrap-install.md 和 references/exploration.md。使用 bootstrap 来确认或建立确定性的环境设置。一旦应用会话打开,使用 exploration 进行 UI 检查、交互和验证。

默认操作规则

  • 始终保守操作。优先使用只读检查,然后再修改 UI。
  • 当任务需要验证屏幕上当前可见的文本或结构时,使用普通的 snapshot。
  • 仅当需要交互式引用(如用于请求的操作或针对性查询的 @e3)时,才使用 snapshot -i。
  • 避免猜测性的变更。你可以采取最小的可逆 UI 操作来解除检查的阻碍或完成请求的任务,例如关闭弹窗、关闭警告或清除意外出现的界面。
  • 除非用户明确要求,否则不要浏览网页或使用外部来源。
  • 在有意义的 UI 变化后重新截图,而不是重复使用过时的引用。
  • 优先使用 @ref 或选择器定位,而不是原始坐标。
  • 在交互前,确保正确的目标已锁定并且应用会话已打开。
  • 保持短循环:open -> 检查/执行 -> 如需要验证 -> close。

默认流程

  1. 在对正常设备任务执行前,先加载 references/bootstrap-install.md 和 references/exploration.md。
  2. 首先使用 bootstrap 来确认或建立正确的目标、应用安装和打开的应用会话。
  3. 一旦应用会话打开并稳定,使用 exploration 进行检查、交互和验证。
  4. 如果目标是读取或验证屏幕上的可见内容,请从普通的 snapshot 开始。
  5. 仅当需要交互式探索或执行请求操作的引用时,才升级到 snapshot -i。
  6. 在修改 UI 之前,如果只读命令可以回答问题,则使用 get、is 或 find。
  7. 结束时,如果需要则捕获证据,然后 close。

QA 模式

必需参考文档

  • 对于每个正常设备任务,在阅读此文件后,先加载 references/bootstrap-install.md,然后加载 references/exploration.md,然后再执行。
  • 使用 bootstrap 来确认或建立确定性的环境设置,特别是在沙盒或云端环境中。
  • 一旦应用会话打开并稳定,使用 exploration。
  • 仅在其范围需要时才加载额外的参考文档。

决策规则

  • 当需要验证文本是否可见时,使用普通的 snapshot。
  • 主要使用 snapshot -i 进行交互式探索和选择引用。
  • 当 get、is 或 find 能够在不改变 UI 状态的情况下回答问题时就使用它们。
  • 使用 fill 来替换文本。
  • 使用 type 来追加文本。
  • 当任务要求“返回”时,使用普通的 back 进行可预测的应用内导航,并保留 back --system 用于平台返回手势或按钮语义。
  • 对于存在防抖(debounce)的搜索字段(当输入过快时会丢失字符),使用 type --delay-ms 或 fill --delay-ms。
  • 如果没有模拟器、没有安装应用或尚未打开应用会话,则切换到 bootstrap-install.md,而不是临时创建设置步骤。
  • 当临时 UI 阻碍检查时,首先使用最小的解除阻碍动作,但不要仅仅为了让 UI 显示数据而导航、搜索或输入新文本,除非用户要求该交互。
  • 除非用户要求,否则不要使用外部查找来弥补屏幕上缺失的数据。
  • 如果所需信息未在屏幕上显示,则直接说明这一点,而不是通过额外的导航、文本输入或网络搜索来弥补。
  • 优先使用 @ref 或选择器定位,而不是原始坐标。

附加参考文档

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

assess-react-native-migration

Assesses whether and how an existing mobile product should migrate to React Native. Use when auditing one or more product repositories for migration readiness, including products whose iOS, Android, and other clients live in separate directories or repositories; choosing brownfield, greenfield, or a checkpoint-based path; defining a representative trial; or preparing a baseline and ROI decision before implementation. When product scope or material evidence is unavailable, grills the stakeholder with exactly one question per turn instead of sending a questionnaire.

callstackincubator/github

GitHub patterns using gh CLI for pull requests, stacked PRs, code review, branching strategies, and repository automation. Use when working with GitHub PRs, merging strategies, or repository management tasks.

callstackincubator/validate-skills

Validates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.

create-react-native-library

Scaffolds React Native libraries with create-react-native-library for standalone libraries or local native modules and views. Use when creating or working on React Native libraries or adding native functionality in an existing app.

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", or "test this app" on mobile. Produces a structured report with reproducible evidence: screenshots, optional repro videos, and detailed steps for every issue.

github-actions

GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipelines or downloading GitHub Actions artifacts via gh CLI and GitHub API.

react-native-best-practices

Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.

react-native-brownfield-migration

Implements an accepted incremental brownfield migration from native iOS or Android to React Native or Expo using @callstack/react-native-brownfield. Use after the brownfield path has been selected, when setting up the integration, packaging XCFramework or AAR artifacts, or adding React Native surfaces to native hosts.

react-native-testing

Write tests using React Native Testing Library (RNTL) v13 and v14 (`@testing-library/react-native`). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React 18, sync render) and v14 (React 19+, async render). Triggers on: test files for React Native components, RNTL imports, mentions of "testing library", "write tests", "component tests", or "RNTL".

react-native-tv-best-practices

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

react-navigation

Provides React Navigation UI patterns for stacks, tabs, drawers etc. Use when building navigation UIs with React Navigation, configuring headers, bottom sheets or handling safe areas and insets.

upgrading-react-native

Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.

validate-skills

Validates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

writing-user-docs

House style for user-facing documentation — voice, scope, structure, and what to leave out. Use this skill whenever writing, editing, or reviewing anything a user reads to learn how to use a tool — help center articles, getting-started guides, tutorials, feature docs, README usage sections, in-app help, release notes, or FAQ entries. Trigger it even when the request is phrased plainly — "document this feature", "write docs for X", "explain this to users", "write a README for this library", "turn these notes into a guide" — and even when no style guidelines are mentioned. Also use it to review existing docs for tone, bloat, or leaked implementation detail. Do not use it for internal engineering docs, architecture write-ups, RFCs, or code comments.

相关技能