Community程式設計與開發github.com

Dogfood(agent-device)

在 iOS/Android 上使用 agent-device 系統化探索並測試行動應用程式,以找出錯誤、UX 問題及其他問題。在需要「dogfood」、「QA」、「探索性測試」、「找問題」、「錯誤獵殺」或「測試這個應用程式」時使用。產生一份包含可重現證據的結構化報告:螢幕截圖、選擇性錄影重現,以及每個問題的詳細步驟。

Dogfood(agent-device) 是什麼?

這個技能讓 AI 代理能夠對行動應用程式進行系統化的探索性測試,類似於「實際使用」(dogfooding)流程。它支援 iOS 和 Android 平台,並透過 agent-device 工具與裝置互動,自動化執行測試工作流程。主要用途包括啟動應用程式、登入驗證、導覽映射、探索性測試,以及記錄發現的問題。技能會產生一份結構化報告,其中包含螢幕截圖和選擇性的重現錄影,並要求按照問題分類法校準嚴重性。對於 UI 互動問題,它會錄製影片並逐步截圖,而靜態載入問題則只需單張截圖。該技能設計為與 agent-device 二進位檔案協作,並遵循一套嚴謹的工作流程,以確保重現品質高於問題數量。

相容平台~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、Deep Link 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 以進行嚴重性/分類校準。

策略:

  • 走訪每個主要應用程式區域(頁籤、抽屜、設定頁面)。
  • 端對端測試核心流程(建立、編輯、刪除、提交、復原)。
  • 驗證邊界狀態(空值/錯誤/載入中/離線/權限拒絕)。
  • 在使用者介面轉換後使用 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.

相關技能