Community编程与开发github.com

Dogfood(agent-device)

系统化探索并测试 iOS/Android 移动应用,发现 Bug、UX 问题和其它异常。当被要求进行“dogfood”、“QA”、“探索性测试”、“找问题”、“抓虫”或“测试这个应用”时使用。生成结构化报告,附带可复现的证据:截图、可选的复现视频以及每个问题的详细步骤。

Dogfood(agent-device) 是什么?

这个技能名为 Dogfood(agent-device),旨在让 AI 智能体在 iOS 或 Android 设备上对移动应用进行系统化的探索性测试(类似于“内部测试”(dogfooding)或质量保证流程)。它通过调用 `agent-device` 工具,自动完成从初始化会话、启动应用、身份验证、导航映射到逐个区域深度探索的全部过程。智能体会依据内置的“问题分类”参考文档(issue-taxonomy)对严重性和类型进行校准,并在发现每个问题时立即捕获完整证据:对于交互和界面行为问题,可录制视频并附带分步截图;对于静态加载问题,只需单张截图即可。最终,技能会生成一份结构化报告(report.md),汇总所有发现的问题及其严重性分布,并关闭设备会话。该技能支持通过命令行参数灵活设置目标应用、平台、会话名称、输出目录、探索范围及认证信息,是开发团队在移动端进行自动化质量巡检和回归测试的实用助手。

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

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

在你喜欢的 AI 中提问

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

文档

Dogfood(agent-device) 是做什么的?

系统化探索移动应用,查找问题,并生成包含每个发现完整复现证据的报告。

设置

仅需提供目标应用。其他参数均有合理的默认值。

参数默认值覆写示例
目标应用(必需)Settings,com.example.app,深层链接 URL
平台从用户上下文推断;否则询问(ios 或 android)--platform ios
会话名称应用/平台的 slug 化名称(例如 settings-ios)--session my-session
输出目录./dogfood-output/Output directory: /tmp/mobile-qa
范围整个应用Focus on onboarding and profile
身份验证无Sign in to [email protected]

如果用户提供了足够的上下文以开始,应立即使用默认值开始。仅在缺少必需的细节(例如平台或凭据)时进行跟进询问。

优先使用直接的 agent-device 二进制文件。

工作流程

1. 初始化    设置会话、输出目录和报告文件
2. 启动/认证  打开应用,如有需要登录
3. 定向      捕获初始快照并映射导航
4. 探索      系统化测试流程和状态
5. 记录      为每个问题记录可复现的证据
6. 收尾      协调摘要,关闭会话

1. 初始化

mkdir -p {OUTPUT_DIR}/screenshots {OUTPUT_DIR}/videos
cp {SKILL_DIR}/templates/dogfood-report-template.md {OUTPUT_DIR}/report.md

2. 启动/认证

启动一个命名会话并打开目标应用:

agent-device --session {SESSION} open {TARGET_APP} --platform {PLATFORM}
agent-device --session {SESSION} snapshot -i

如果需要登录:

agent-device --session {SESSION} snapshot -i
agent-device --session {SESSION} fill @e1 "{EMAIL}"
agent-device --session {SESSION} fill @e2 "{PASSWORD}"
agent-device --session {SESSION} press @e3
agent-device --session {SESSION} wait 1000
agent-device --session {SESSION} snapshot -i

对于 OTP/邮箱验证码:询问用户,等待输入,然后继续。

3. 定向

捕获初始证据和导航锚点:

agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/initial.png
agent-device --session {SESSION} snapshot -i

在深入测试之前,映射顶层导航、标签页和关键工作流程。

4. 探索

阅读 references/issue-taxonomy.md 以校准严重性和类别。

策略:

  • 遍历每个主要应用区域(标签页、抽屉、设置页面)。
  • 端到端测试核心流程(创建、编辑、删除、提交、恢复)。
  • 验证边界状态(空、错误、加载、离线、权限被拒绝)。
  • 在 UI 转换后使用 diff snapshot -i 以避免引用过时。
  • 定期捕获 logs path 并检查应用日志,当行为可疑时。

每个屏幕的有用命令:

agent-device --session {SESSION} snapshot -i
agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/{screen-name}.png
agent-device --session {SESSION} appstate
agent-device --session {SESSION} logs path

5. 记录问题(先复现)

探索和记录一步到位。当发现问题时,立即停止并完整捕获证据再继续。

交互/行为问题

使用视频 + 步骤截图:

  1. 开始录制:
agent-device --session {SESSION} record start {OUTPUT_DIR}/videos/issue-{NNN}-repro.mp4
  1. 以可见的节奏复现。捕获每个步骤:
agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/issue-{NNN}-step-1.png
sleep 1
# 执行操作
sleep 1
agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/issue-{NNN}-step-2.png
  1. 捕获最终的错误状态:
sleep 2
agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/issue-{NNN}-result.png
  1. 停止录制:
agent-device --session {SESSION} record stop
  1. 立即将问题追加到报告中,附带编号步骤和截图引用。

静态/加载时问题

单张截图即可,无需视频:

agent-device --session {SESSION} screenshot {OUTPUT_DIR}/screenshots/issue-{NNN}.png

在报告中将复现视频设置为 N/A。

6. 收尾

目标是 5-10 个证据充分的问题,然后完成:

  1. 协调 report.md 中的摘要严重性计数。
  2. 关闭会话:
agent-device --session {SESSION} close
  1. 报告总问题数、严重性分布以及最高风险发现。

指导

  • 复现质量比问题数量更重要。
  • 使用引用(@eN)进行快速探索,必要时使用选择器进行确定性回放断言。
  • 在任何变更(导航、弹窗、列表更新、表单提交)后重新快照。
  • 使用 fill 执行清空然后键入语义;使用 type 执行增量键入行为检查。
  • 保持日志可选且有针对性:仅在有助于诊断时启用/读取应用日志。
  • 切勿读取被测应用的源代码;发现必须来自观察到的运行时行为。
  • 立即写入每个问题以避免丢失证据。
  • 切勿在会话期间删除截图/视频/报告工件。

参考资料

参考资料何时阅读
references/issue-taxonomy.md会话开始;严重性/类别/检查清单

模板

模板用途
templates/dogfood-report-template.md复制到输出目录作为报告文件

Individual skills in this repo

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

agent-device

Automates interactions for Apple-platform apps (iOS, tvOS, macOS) and Android devices. Use when navigating apps, taking snapshots/screenshots, tapping, typing, scrolling, or extracting UI info across mobile, TV, and desktop targets.

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.

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.

相关技能