Community程式設計與開發github.com

agent-device

自動化 Apple 平台(iOS、tvOS、macOS)與 Android 裝置的應用程式操作。用於導航應用、截圖、點擊、輸入文字、滾動或擷取 UI 資訊。

agent-device 是什麼?

此技能作為一個路由工具,用於自動化 Apple 平台(iOS、tvOS、macOS)與 Android 裝置上的應用程式操作。它支援螢幕快照、點擊、輸入文字、滾動以及 UI 資訊擷取。主要用於導航應用程式、驗證 UI 狀態、執行 QA 測試以及在沙箱或雲端環境中建立可重複的設定。技能強調保守的操作方式,偏好唯讀檢查(如 `snapshot`)而非直接修改 UI。它依賴兩個關鍵參考文件:`bootstrap-install.md`(用於確認或建立目標裝置、安裝應用並開啟應用會話)和 `exploration.md`(用於在會話開啟後進行 UI 檢查、互動與驗證)。技能還提供了用於調試、驗證、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 給平台返回手勢或按鈕語義。
  • 對於因輸入太快而掉字的去抖動搜尋欄位,請使用 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.

相關技能