跳到正文
Skillpedia
移动应用5.2k · #15026

agent-device

它能做什么

它运行 agent-device 命令行工具,打开应用,读取其屏幕,并通过点击、输入或滚动进行操作。适合希望用 AI 检查移动应用行为的开发者和测试人员。

适用场景

  • ✓当你希望智能体在手机或模拟器上打开应用并走查某个页面时。
  • ✓当你想在设备上使用手机应用来检查改动时。
  • ✓当你想获取移动应用中错误的截图或详细信息时。

技能链接

https://github.com/callstack/agent-device/blob/main/skills/agent-device/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/callstack/agent-device/blob/main/skills/agent-device/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在 iOS 模拟器中打开我的应用,用测试账号登录,然后告诉我设置页面能否加载。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体打开应用,把屏幕读取为一组可操作的目标,然后对它们进行操作。每一步之后,它都会读取变化,并检查你要求确认的结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

agent-device

For a normal app-driving task, start immediately. Do not probe first with --help, --version, devices, appstate, snapshot, or screenshot:

agent-device open <app> --foreground

That starts the session and returns the initial interactive snapshot with @refs.

Loop: act with press|click|fill|longpress <target> ... --settle, scroll <direction> --settle, or back --settle; continue from the printed diff, verify the named expectation (wait text "...", is, get, or find), then run agent-device close, or agent-device close --shutdown if your session booted a local simulator or emulator, unless the user asks to keep it running.

Reaching an off-screen target is one command, not a scroll-and-check loop: scroll down --until <selector> scrolls until that element is on screen, and scroll bottom runs to the end of the content. Repeated bare scroll down calls are the slow way to find something.

Copy refs byte-for-byte: @e12, @e12~s4 — keep the @ and any ~sN. Prefer current refs, then id/label/role selectors; coordinates are a last resort. If snapshot reports sparse/AX-unavailable, its refs and selectors are invalid: run agent-device screenshot, inspect the image, use coordinates, then retry snapshot -i after navigating. Otherwise run snapshot -i only when the diff lacks the next target.

Error output includes corrective hints; follow them instead of re-planning. Only when the task is specialized (for example gestures, scripting, TV, macOS, remote, or debugging) or a command shape is unclear, run agent-device help <topic>. agent-device --help lists topics, but is not a startup step.

To capture network traffic on a Limrun session, see agent-device help remote or the Limrun docs.

常见问题

智能体需要先安装工具吗?

需要。在智能体使用之前,你需要自己安装 agent-device 命令行工具。

它也适用于电视应用吗?

适用。该技能涵盖电视遥控器,以及 Android TV、Fire TV 和 Amazon Vega OS TV 上的应用。

测试结束后会关闭模拟器吗?

如果会话启动了模拟器或仿真器,结束时会将其关闭,除非你要求保持运行。

详情

作者的原始描述

Automates Apple-platform apps (iOS, tvOS, macOS), Android devices (including Android TV and Fire TV on Fire OS), and Amazon Vega OS TV apps in Vega Virtual Devices. Use when navigating apps, taking snapshots/screenshots where supported, driving TV remotes, tapping, typing, scrolling, extracting UI info, collecting evidence, or planning agent-device CLI commands.

repo: callstack/agent-device

热度

GitHub 星标
5.2k
排名
#15026
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能