К основному содержанию
скилл CX Codex

argent-macos-app-interact — скилл для Claude Code

Скилл argent-macos-app-interact для Claude Code управляет нативными приложениями macOS через argent. Запускается при работе с проектами на AppKit, SwiftUI, react-native-macos и Mac Catalyst.

Apache-2.0 1 700 установок ★ 3 224 обновлён 2026-11-21

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add software-mansion/argent --skill argent-macos-app-interact -a claude-code
Открыть на GitHub

Что делает argent-macos-app-interact

Скилл взаимодействует с графическим интерфейсом нативных программ для Mac через RPC-команды argent. Он находит элементы через accessibilityIdentifier в AppKit и UIKit или testID в React Native, нажимает кнопки, вводит текст, открывает меню через menu-bar и управляет окнами выбора файлов с помощью file-panel. Для сложных жестов используются gesture-drag и gesture-scroll, но зум и поворот жестами не поддерживаются.

Для запуска инструмент требует сборку через xcodebuild без автоматического старта: готовый бандл .app передаётся в boot-device. Запуск через open или Xcode Run сломает подключение, так как в процесс не внедрится библиотека argent. Инструмент не работает с Electron, Chromium, симулятором iOS и реальными iPhone. Если экран Mac заблокирован, поиск скрытых элементов и контекстных меню завершится ошибкой.

Какие задачи решает

  • управление нативными Mac-приложениями
  • запустить скомпилированный бандл .app с внедрением argent
  • автоматизировать клики, скролл и перетаскивание в AppKit и SwiftUI
  • управлять пунктами системного меню и диалогами сохранения файлов

Примеры запросов агенту

  • Запусти скомпилированный бандл MyApp.app через boot-device и нажми кнопку сохранения
  • Выбери пункт меню File -> Open через menu-bar и подтверди выбор в file-panel
  • Проверь SwiftUI DisclosureGroup в окне настроек и разверни его кликом по левому краю

Как установить argent-macos-app-interact

1Через Skills CLI (Vercel)

npx skills add software-mansion/argent --skill argent-macos-app-interact -a claude-code

2Вручную: положить файлы

~/.claude/skills/argent-macos-app-interact/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/argent-macos-app-interact/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об argent-macos-app-interact

Как установить argent-macos-app-interact в Claude Code?

Выполните команду npx skills add software-mansion/argent --skill argent-macos-app-interact -a claude-code.

Что делает argent-macos-app-interact?

Передаёт агенту команды для взаимодействия с интерфейсом нативных macOS-приложений на AppKit, SwiftUI, react-native-macos и Mac Catalyst.

Что нужно для работы argent-macos-app-interact?

Требуются argent с активным флагом macos-apps и бандл .app, собранный командой xcodebuild ... build. Обычный запуск через open или Xcode не подходит, так как в процесс не загрузится библиотека argent.

Исходный текст

SKILL.md · Apache-2.0
---
name: argent-macos-app-interact
description: Drive a native Mac app (AppKit, SwiftUI, react-native-macos, Mac Catalyst) through argent. Use when a list-devices entry has platform "macos", or the user names a Mac app, a macOS app or a native desktop app. Never for an iOS simulator, an iPhone, or an Electron or Chromium app (platform "chromium").
---

`argent-device-interact` still applies for everything not listed here (`run-sequence`, `await-ui-element`, secrets).

## Contract

- Needs the `macos-apps` flag, which is on by default. When a tool says it is off, tell the user to run the command it names. Do not change the flag yourself.
- One app is one device. `list-devices` shows only apps argent started that still run, also those of other sessions: never pick one unless the user named that app or this session started it.
- Start an app with `boot-device {macosAppPath: "<abs path>.app"}`, never with `open` or Xcode. Use `launch-app` only for an app argent already started: with no recorded path it takes whichever copy Spotlight finds.
- Build the `.app` without starting it: `xcodebuild ... build`, then take the bundle from `BUILT_PRODUCTS_DIR` (`xcodebuild -showBuildSettings`). Xcode Run and `react-native run-macos` start a copy without the argent library: `boot-device` then fails with `already running ... without the argent library`. Retry with `force: true`, but ask the user first when they may have work open in that copy.
- Never pass `force` when the error names another build path; report it.
- After a code change: rebuild, then `restart-app`.
- A start result with a `note` that the app showed no window: taps and screenshots need one. Tell the user, and read the log file it names.
- On a hardened-runtime refusal, report it to the user. Do not sign files or change code signing.
- Never activate the app or drive it with `osascript`, `open` or other system tools.
- At the end: `stop-all-simulator-servers {devices: ["macos-app-<bundle id>"]}` closes argent's connection; the app keeps running.

## Per-tool notes

- Swipe or drag: `gesture-drag`. Long press: `gesture-drag` with the same start and end point. Scroll: `gesture-scroll`.
- Zoom or rotate: `gesture-pinch` and `gesture-rotate` fail; use the app's own controls or shortcuts.
- After a right-click (`gesture-tap` with `button: "right"`), the returned tree lists the menu items; a plain `gesture-tap` on one chooses it (the menu can stay in the tree for a moment while it closes). `keyboard` `escape` closes the menu; `enter` chooses nothing after a right-click, so tap the item.
- For a Command-click or Shift-click, pass `modifiers` in the `gesture-tap` call. Check the returned tree for the expected selection.
- No hover: a tooltip is out of reach.
- `open-url`: the URL goes to the running app. A custom scheme must be one the app declares; `http` and `https` go to the app, not the browser; a `file:` URL opens that document in the app.
- A SwiftUI `DisclosureGroup` opens only at its chevron, near the left end of its frame: a tap at the centre passes and does nothing. Tap along the left end in steps of about 0.008 until its `value` changes.
- `menu-bar` for any menu command. An item listed `[disabled]` cannot be chosen right now: an edit command (Copy, Select All) needs the text field clicked first; while an alert is open only its own commands work, so answer the alert first. When a menu of the app is open, `choose` fails: send `keyboard {key: "escape"}`, then choose again.
- Open and save panels: never click in the file list, which `describe` cannot read. Use `file-panel`, also for the Delete or Don't Save prompt of an edited new document.

## Tree

- Identifiers: AppKit and UIKit `accessibilityIdentifier`, SwiftUI `.accessibilityIdentifier()`, web `data-testid` (else `id`), React Native `testID` (also on a plain `View` or `Text` in react-native-macos).
- Hint `The Mac is locked` or `fallback walk`: clicks and typing still work, elements can be missing (an open context menu among them), and a `hidden` check cannot pass. Ask the user to unlock when a target is missing.
- An action that fails or has no effect: a minimized window takes no input. Restore it by choosing it in the Window menu with `menu-bar`; without such an item, ask the user.

## Mac Catalyst (kind `catalyst`)

- Build with `xcodebuild -scheme <scheme> -destination 'platform=macOS,variant=Mac Catalyst' build`. Add `-workspace <name>.xcworkspace` for a workspace (React Native, CocoaPods), or `-project <name>.xcodeproj` to select a project. Without `-scheme`, xcodebuild ignores the destination and builds for iOS. A Debug build is in DerivedData under `Build/Products/Debug-maccatalyst/`, not `Debug-iphonesimulator/`. Pass that `.app` to `boot-device`. If it reports "Designed for iPad", ask for the Mac Catalyst build or suggest testing on an iOS simulator.
- Use `describe` to find UIKit controls and their frames. AppKit view-tree tools are unavailable.
- Switch to the intended window with `menu-bar` and the Window menu. Tap the target field before typing, since keyboard focus can be in another window and SwiftUI Tab order can differ from the visible order.
- Tap alert buttons directly. Return depends on a default action, and Escape can leave a UIKit text-field alert open.
- Find toolbar menu buttons by label if **Optimize Interface for Mac** leaves them without identifiers.
- If typing, paste, or scrolling reports success without changing the app, check whether the installed native library supports Mac Catalyst input.

## Profiling

Use `argent-native-profiler` for native profiling or `argent-react-native-profiler` to capture React performance on a react-native-macos or Mac Catalyst React Native app. Instruments can pause the app during leak checks, delaying actions and inspection. After `MACOS_APP_RPC_TIMEOUT`, use `describe` before retrying because the action may already have taken effect.

## E2E tests

Read `references/e2e.md` before recording or writing a test for a Mac app.

## React Native

For React Native Debug builds on macOS, including Mac Catalyst, start Metro before `boot-device` (see `argent-react-native-app-workflow`). Inspect the UI with `describe`. The JavaScript debugger tools are unavailable for Mac apps.

© software-mansion · Apache-2.0 · software-mansion/argent

Похожие скиллы

Все скиллы по теме «Тесты и QA» →
build-macos-apps Lex Christopherson Скилл build-macos-apps для Claude Code помогает создавать и развивать нативные macOS-приложения на SwiftUI и AppKit. Он подключается к задачам сборки, отладки, тестирования, оптимизации и выпуска. CX Codex +1 ★ 1 988звёзд репо macos-design-guidelines platform-design-skills Скилл macos-design-guidelines передаёт агенту правила Apple Human Interface Guidelines для macOS. Он пригодится при вёрстке меню, окон и клавиатурных сокращений на SwiftUI или AppKit. CX Codex +1 4 600установок axiom-macos CharlesWiltgen Скилл axiom-macos направляет ИИ при разработке macOS-приложений на SwiftUI и AppKit: от окон и меню до sandbox, дистрибуции и экранного захвата. CX Codex +1 1 600установок macos-development rshankras Скилл macos-development для разработки приложений под macOS: Swift 6+, SwiftUI, SwiftData, AppKit и API macOS 26 Tahoe. Пригодится на код-ревью и разборе архитектуры. CX Codex +1 1 600установок macos-patterns fayazara Скилл macos-patterns подсказывает нативные паттерны macOS при создании приложений: меню в строке меню, окна, фокус и системные API. CX Codex +1 811установок macos-native travisjneuman Скилл macos-native для Claude Code помогает создавать нативные приложения для macOS на AppKit, Catalyst и системных API. Включается при работе над приложениями для Mac, меню-баром и системными расширениями. CX Codex +1 298установок

Из того же набора20

Весь набор →
argent-tv-interact Скилл argent-tv-interact для Claude Code, Codex и Cursor. Управляет ТВ-приложениями на Apple TV, Android TV и Fire TV через пульт и инспекцию фокуса. CX Codex +1 27 000установок argent-settings-permissions Скилл argent-settings-permissions выдаёт, отзывает и сбрасывает системные разрешения в симуляторе iOS и на Android без открытия экрана настроек. Настраивает доступы перед автотестами до старта приложения. CX Codex +1 25 300установок argent-screen-recording Скилл argent-screen-recording для Claude Code записывает видео с экрана iOS-симулятора, iPhone по кабелю или Android-устройства через Argent MCP. Он включается по просьбе снять взаимодействие, анимацию или работу приложения. CX Codex +1 23 900установок argent-ios-device-setup Скилл argent-ios-device-setup для Claude Code и других агентов, который подготавливает подключённый по кабелю физический iPhone к автоматизации через argent. CX Codex +1 17 100установок argent-ios-device-interact Скилл argent-ios-device-interact для Claude Code управляет физическим iPhone через argent. Включается при работе с настоящим устройством со статусом device и запрещён для симуляторов iOS. CX Codex +1 17 100установок argent-qa-e2e Скилл argent-qa-e2e для Claude Code создаёт повторяемые QA-регрессионные e2e-тесты. Агент подключает его по запросу написать тест по кейсу, тикету или критериям приёмки. CX Codex +1 6 900установок argent-create-e2e Скилл argent-create-e2e для Claude Code записывает, редактирует и воспроизводит сценарии сквозного тестирования Argent в YAML. Проверяет интерфейс на физических iPhone и эмуляторах. CX Codex +1 6 900установок Argent Argent связывает агента с симуляторами iOS, Android, ТВ-приставками и Electron. Позволяет нажимать кнопки, снимать логи и профилировать код прямо из чата. CX Codex +1 ★ 3 224звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой