macpilot-ui-inspector
MacPilotの機能を使って、macOSの画面上のボタンや文字などを探し出し、クリックしたり内容を読んだり変更したりすることで、アプリケーションの操作を自動化したり検証したりするSkill。
📜 元の英語説明(参考)
Inspect and interact with macOS UI elements using MacPilot accessibility APIs. Find buttons, text fields, labels, and other elements by role, label, or position, then click, read, or modify them.
🇯🇵 日本人クリエイター向け解説
MacPilotの機能を使って、macOSの画面上のボタンや文字などを探し出し、クリックしたり内容を読んだり変更したりすることで、アプリケーションの操作を自動化したり検証したりするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o macpilot-ui-inspector.zip https://jpskill.com/download/9640.zip && unzip -o macpilot-ui-inspector.zip && rm macpilot-ui-inspector.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9640.zip -OutFile "$d\macpilot-ui-inspector.zip"; Expand-Archive "$d\macpilot-ui-inspector.zip" -DestinationPath $d -Force; ri "$d\macpilot-ui-inspector.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
macpilot-ui-inspector.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
macpilot-ui-inspectorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
MacPilot UI Inspector
MacPilot のアクセシビリティ (AX) コマンドを使用して、あらゆる macOS アプリケーションの UI 要素を検査、検索、操作します。このスキルにより、アプリのインターフェースを正確にプログラムで制御できます。
どのような時に使うか
このスキルは、ユーザーが以下を要求した場合に使用します。
- アプリ内の特定のボタン、テキストフィールド、チェックボックス、または UI 要素を見つける
- UI コントロールの値または状態を読み取る
- ラベルによってボタンをクリックするか、コントロールを操作する
- アプリの完全な UI 階層/アクセシビリティツリーを検査する
- テキストフィールドに値を設定するか、チェックボックスをプログラムで切り替える
- アプリがサポートするキーボードショートカットを見つける
- 特定の画面座標にある要素を特定する
コマンド
UI 要素のリスト表示
macpilot ui list --app "Safari" --json # すべての要素
macpilot ui list --app "Safari" --role AXButton --json # ボタンのみ
macpilot ui list --app "Safari" --depth 5 --json # より深いスキャン
macpilot ui list --app "Safari" --hierarchy --json # 階層構造付き
テキストによる要素の検索
macpilot ui find "Save" --app "TextEdit" --json # ラベルで検索
macpilot ui find "Save" --role AXButton --json # ロールでフィルタ
macpilot ui find "Save" --exact --json # 完全一致のみ
座標による要素の検索
macpilot ui find-text "Submit" --app "Safari" --json
# 返り値: position {x, y}, size {w, h} - クリックに使用
ラベルによる UI 要素のクリック
macpilot ui click "Save" --app "TextEdit" --json
macpilot ui click "Cancel" --role AXButton --json
値の取得/設定
macpilot ui get-value "Search" --app "Safari" --json # フィールドの値を読み取る
macpilot ui set-value "Search" "query text" --app "Safari" # フィールドの値を設定する
macpilot ui set-value "Dark Mode" "1" --role AXCheckBox # チェックボックスを切り替える
フォーカスの設定
macpilot ui set-focus "Search" --app "Safari" --json # 要素にフォーカスする
要素内のスクロール
macpilot ui scroll "content" down 5 --app "Safari" # 要素をスクロールする
要素の属性の検査
macpilot ui attributes "Save" --app "TextEdit" --json # すべての AX 属性
座標にある要素
macpilot ui elements-at 500 300 --json # x=500 y=300 にあるもの
macpilot ui elements-at 500 300 --radius 50 --json # より広い範囲を検索
アクセシビリティツリー
macpilot ui tree --app "Finder" --json # 完全な AX ツリー
macpilot ui tree --app "Finder" --depth 3 --json # 深さを制限
キーボードショートカット
macpilot ui shortcuts --app "Safari" --json # すべてのショートカット
macpilot ui shortcuts --app "Safari" --menu File --json # メニュー固有
要素の待機
macpilot wait element "Download Complete" --app "Safari" --timeout 30 --json
一般的な AX ロール
| Role | Description |
|---|---|
AXButton |
ボタン (プッシュ、トグル) |
AXTextField |
テキスト入力フィールド |
AXTextArea |
複数行のテキストエリア |
AXStaticText |
ラベルと表示テキスト |
AXCheckBox |
チェックボックスとトグル |
AXRadioButton |
ラジオボタン |
AXPopUpButton |
ドロップダウンメニュー |
AXComboBox |
コンボボックス |
AXTable |
テーブルとリスト |
AXRow |
テーブル/リストの行 |
AXMenuItem |
メニュー項目 |
AXToolbar |
ツールバー |
AXScrollArea |
スクロール可能な領域 |
AXWindow |
ウィンドウ |
AXSheet |
モーダルシート |
AXImage |
画像 |
AXLink |
ハイパーリンク |
AXGroup |
ジェネリックコンテナ |
ワークフローパターン
パターン 1: 検索してクリック
# 常に最初にアプリにフォーカスする
macpilot app focus "Safari"
# 要素が存在することを確認するために検索する
macpilot ui find "Downloads" --app "Safari" --role AXButton --json
# クリックする
macpilot ui click "Downloads" --app "Safari"
パターン 2: フォームの状態を読み取る
macpilot app focus "System Settings"
macpilot ui get-value "Computer Name" --app "System Settings" --json
パターン 3: フォームに入力する
macpilot app focus "MyApp"
macpilot ui set-value "Name" "John Doe" --app "MyApp"
macpilot ui set-value "Email" "john@example.com" --app "MyApp"
macpilot ui click "Submit" --app "MyApp"
パターン 4: 未知の UI を探索する
# 広範囲なスキャンから始める
macpilot ui tree --app "SomeApp" --depth 2 --json
# 特定の要素に絞り込む
macpilot ui list --app "SomeApp" --role AXButton --json
# 特定の要素を検査する
macpilot ui attributes "Settings" --app "SomeApp" --json
パターン 5: 座標によるクリック (フォールバック)
# ラベルベースのクリックが失敗した場合、最初に座標を見つける
macpilot ui find-text "Submit" --app "MyApp" --json
# 返された x,y を使用してクリックする
macpilot click 450 320
ヒント
- UI 操作の前に必ず
macpilot app focusを呼び出す - 要素のプロパティを確実に解析するために
--json出力を使用する ui clickが失敗した場合は、ui find-text+macpilot click x yにフォールバックする- 深いスキャンの前に、アプリの構造を理解するために最初に
ui tree --depth 2を使用する - AX 権限は、システム設定で MacPilot.app に付与する必要があります
--roleフィルターは、複雑なアプリでの要素検索を大幅に高速化します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
MacPilot UI Inspector
Use MacPilot's accessibility (AX) commands to inspect, find, and interact with UI elements in any macOS application. This skill enables precise programmatic control of app interfaces.
When to Use
Use this skill when the user asks to:
- Find a specific button, text field, checkbox, or UI element in an app
- Read the value or state of a UI control
- Click a button or interact with a control by its label
- Inspect the full UI hierarchy/accessibility tree of an app
- Set values in text fields or toggle checkboxes programmatically
- Discover what keyboard shortcuts an app supports
- Identify elements at specific screen coordinates
Commands
List UI Elements
macpilot ui list --app "Safari" --json # All elements
macpilot ui list --app "Safari" --role AXButton --json # Only buttons
macpilot ui list --app "Safari" --depth 5 --json # Deeper scan
macpilot ui list --app "Safari" --hierarchy --json # With hierarchy
Find Elements by Text
macpilot ui find "Save" --app "TextEdit" --json # Find by label
macpilot ui find "Save" --role AXButton --json # Filter by role
macpilot ui find "Save" --exact --json # Exact match only
Find Element with Coordinates
macpilot ui find-text "Submit" --app "Safari" --json
# Returns: position {x, y}, size {w, h} - use for clicking
Click UI Element by Label
macpilot ui click "Save" --app "TextEdit" --json
macpilot ui click "Cancel" --role AXButton --json
Get/Set Values
macpilot ui get-value "Search" --app "Safari" --json # Read field value
macpilot ui set-value "Search" "query text" --app "Safari" # Set field value
macpilot ui set-value "Dark Mode" "1" --role AXCheckBox # Toggle checkbox
Set Focus
macpilot ui set-focus "Search" --app "Safari" --json # Focus an element
Scroll Within Elements
macpilot ui scroll "content" down 5 --app "Safari" # Scroll element
Inspect Element Attributes
macpilot ui attributes "Save" --app "TextEdit" --json # All AX attributes
Elements at Coordinates
macpilot ui elements-at 500 300 --json # What's at x=500 y=300
macpilot ui elements-at 500 300 --radius 50 --json # Search wider area
Accessibility Tree
macpilot ui tree --app "Finder" --json # Full AX tree
macpilot ui tree --app "Finder" --depth 3 --json # Limit depth
Keyboard Shortcuts
macpilot ui shortcuts --app "Safari" --json # All shortcuts
macpilot ui shortcuts --app "Safari" --menu File --json # Menu-specific
Wait for Elements
macpilot wait element "Download Complete" --app "Safari" --timeout 30 --json
Common AX Roles
| Role | Description |
|---|---|
AXButton |
Buttons (push, toggle) |
AXTextField |
Text input fields |
AXTextArea |
Multi-line text areas |
AXStaticText |
Labels and display text |
AXCheckBox |
Checkboxes and toggles |
AXRadioButton |
Radio buttons |
AXPopUpButton |
Dropdown menus |
AXComboBox |
Combo boxes |
AXTable |
Tables and lists |
AXRow |
Table/list rows |
AXMenuItem |
Menu items |
AXToolbar |
Toolbars |
AXScrollArea |
Scrollable regions |
AXWindow |
Windows |
AXSheet |
Modal sheets |
AXImage |
Images |
AXLink |
Hyperlinks |
AXGroup |
Generic container |
Workflow Patterns
Pattern 1: Find and Click
# Always focus app first
macpilot app focus "Safari"
# Find the element to verify it exists
macpilot ui find "Downloads" --app "Safari" --role AXButton --json
# Click it
macpilot ui click "Downloads" --app "Safari"
Pattern 2: Read Form State
macpilot app focus "System Settings"
macpilot ui get-value "Computer Name" --app "System Settings" --json
Pattern 3: Fill a Form
macpilot app focus "MyApp"
macpilot ui set-value "Name" "John Doe" --app "MyApp"
macpilot ui set-value "Email" "john@example.com" --app "MyApp"
macpilot ui click "Submit" --app "MyApp"
Pattern 4: Explore Unknown UI
# Start with a broad scan
macpilot ui tree --app "SomeApp" --depth 2 --json
# Narrow down to specific elements
macpilot ui list --app "SomeApp" --role AXButton --json
# Inspect a specific element
macpilot ui attributes "Settings" --app "SomeApp" --json
Pattern 5: Click by Coordinates (Fallback)
# When label-based clicking fails, find coordinates first
macpilot ui find-text "Submit" --app "MyApp" --json
# Use returned x,y to click
macpilot click 450 320
Tips
- Always call
macpilot app focusbefore any UI interaction - Use
--jsonoutput for reliable parsing of element properties - When
ui clickfails, fall back toui find-text+macpilot click x y - Use
ui tree --depth 2first to understand app structure before deep scans - AX permission must be granted to MacPilot.app in System Settings
- The
--rolefilter significantly speeds up element searches in complex apps