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

os-integrations — скилл для Claude Code: интеграции macOS

Скилл os-integrations для Claude Code помогает выбрать API macOS и нужные разрешения для системных функций приложения. Включается при добавлении глобальных горячих клавиш, захвата экрана или управления окнами других приложений.

MIT 1 000 установок ★ 1 933 обновлён 2026-11-05

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

Что делает os-integrations

Скилл подбирает API macOS для функций, которые выходят за пределы окна приложения, и указывает связанные с ними разрешения. Среди задач — пункты меню, панели поверх других окон, буфер обмена, Spotlight, снимки экрана и запуск при входе в систему. Для каждой интеграции есть пример кода в recipes.md.

Скилл описывает запрос разрешений и их проверку в настройках, а также требования к подписи и пути установки. Разрешения Accessibility и Screen Recording сохраняются для подписи и пути приложения; при использовании Accessibility, перехвата событий или окон других приложений App Sandbox блокирует доступ к ним.

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

  • подобрать API macOS для глобальной горячей клавиши
  • добавить захват экрана с разрешением Screen Recording
  • управлять окнами других приложений через Accessibility
  • настроить запуск приложения при входе в систему

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

  • Добавь глобальную горячую клавишу в macOS-приложение и укажи нужный API.
  • Настрой захват экрана и объясни, какое разрешение требуется.
  • Добавь управление окнами других приложений через Accessibility.

Как установить os-integrations

1Через Skills CLI (Vercel)

npx skills add daveebbelaar/bama --skill os-integrations -a claude-code

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

~/.claude/skills/os-integrations/SKILL.md

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

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

Вопросы об os-integrations

Как установить os-integrations в Claude Code?

Выполни npx skills add daveebbelaar/bama --skill os-integrations -a claude-code. Файл скилла находится в ~/.claude/skills/os-integrations/SKILL.md.

Что делает os-integrations?

Помогает выбирать API macOS и разрешения для системных интеграций нативного приложения: от горячих клавиш до захвата экрана и управления окнами.

Почему разрешения macOS могут сброситься после пересборки?

macOS связывает разрешения Accessibility и Screen Recording с подписью кода и путём приложения. Ad hoc-подпись требует заново выдать разрешение после каждой сборки.

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

SKILL.md · MIT
---
name: os-integrations
description: Deep macOS integrations for a native app, such as global hotkeys, menu bar items, floating panels, window control with Accessibility, screen capture and recording, clipboard, Shortcuts and Spotlight, URL schemes, login items, a CLI, and the permissions each one needs. Use when an app must reach outside its own window or control other apps.
---

# macOS integrations

A Mac app is a set of entry points around the system, not one window. This
skill picks the API for each entry point and the permission it costs.
Code for every row is in [recipes.md](recipes.md).

## Pick the API

| Want | API | Permission |
| --- | --- | --- |
| Global shortcut (key combo) | Carbon `RegisterEventHotKey` | None |
| Hold-to-show (hold Option, press Tab) or key remapping | `CGEvent.tapCreate` event tap | Accessibility |
| Watch keys without changing them (keystroke overlay) | Listen-only event tap | Input Monitoring (`CGRequestListenEventAccess`) |
| List other apps' windows | `CGWindowListCopyWindowInfo` | None (titles need Screen Recording) |
| Menu bar item | `MenuBarExtra` (SwiftUI) or `NSStatusItem` | None |
| Live status in the menu bar (a timer, a sync) | `MenuBarExtra` with a changing label. Live Activities on a Mac only mirror a paired iPhone | None |
| Desktop and Notification Center widgets | WidgetKit extension target (Xcode build, like App Intents) | None |
| Find the app's content in Spotlight | Core Spotlight `CSSearchableIndex` | None |
| Preview the app's own file type in Finder (Space) | Quick Look preview extension | None |
| Menu-bar-only app, no Dock icon | `LSUIElement = YES` in Info.plist | None |
| Spotlight-style panel that keeps the other app in front | `NSPanel` with `.nonactivatingPanel` | None |
| Move and resize other apps' windows | `AXUIElement` (`kAXPositionAttribute`, `kAXSizeAttribute`) | Accessibility |
| Paste into the front app | Write `NSPasteboard`, then post Command-V with `CGEvent` | Accessibility |
| Screenshot | ScreenCaptureKit `SCScreenshotManager` | Screen Recording |
| Window thumbnails | `SCScreenshotManager` with an `SCContentFilter` per window | Screen Recording |
| Screen recording to MP4 | `SCStream` + `SCRecordingOutput` (`AVAssetWriter` when you edit frames) | Screen Recording, Microphone |
| Clipboard history | Poll `NSPasteboard.general.changeCount` | None |
| Text in images | Vision `RecognizeTextRequest` | None |
| Launch at login | `SMAppService.mainApp.register()` | User approves once |
| Links from scripts, Stream Deck, Raycast | `CFBundleURLTypes` + `.onOpenURL` | None |
| Shortcuts app and Spotlight actions | `AppIntent` (App Shortcuts are not supported on macOS). A result or confirmation view is a snippet | None |
| Agent or script reads and changes data | The app binary as a CLI, talking to the running app (`agent-cli` skill) | None |
| A CLI that writes plain files or its own SQLite tells the app to reload | Darwin notification (`notify_post`) | None |
| Keep the Mac awake | `IOPMAssertionCreateWithName` | None |
| System stats | `host_statistics64`, `proc_pid_rusage`, `IOPSCopyPowerSourcesInfo` | None |
| Audio devices | CoreAudio `AudioObjectGetPropertyData` | None |
| Toggle dark mode and other system settings | Apple Events to System Events | Automation |
| Notifications | `UNUserNotificationCenter` | User approves once |
| Dock menu | `applicationDockMenu(_:)` in the app delegate | None |
| Services and Share menu | `NSServices` in Info.plist, `ShareLink` | None |

Prefer the row with no permission when two rows solve the same job.

## Permissions

- Ask at the moment of use. Explain in one line what breaks without it.
  The exception: an app whose core job needs the permission (a window
  manager needs Accessibility) shows its permissions page on first launch.
- Show the state of every permission on one Settings page, with a button
  that opens the right pane:
  `x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility`
  (or `Privacy_ScreenCapture`, `Privacy_AllFiles`).
- The user grants it in System Settings, and nothing calls your app back.
  Check every 1 to 2 seconds while a permission is missing or a view that
  shows it is open. Otherwise check every 20 seconds, with a timer
  tolerance. Check once more right when such a view opens.
- Every `NS...UsageDescription` key (camera, microphone, Apple Events)
  must be in Info.plist before the first request, or the app crashes.

## Menu bar items, widgets, and snippets

- A menu bar item shows a menu, unless the feature is too complex for one.
  Its icon is a template image (an SF Symbol works). People can turn it
  off in Settings, and nothing is reachable only through it: the Dock menu
  and the main window offer the same actions. `MenuBarExtra` already works
  with keyboard navigation; an `NSStatusItem` that opens a custom window
  must too (WWDC26-289).
- A widget shows one idea from the app's purpose, with content that
  changes through the day. Sizes small, medium, large, and extra large. On
  the desktop it renders vibrant and nearly gray, so it must read without
  color. Standard margins 16 pt. A click deep-links to the exact place;
  buttons and toggles in it run App Intents. Never a whole app squeezed
  into a widget.
- A snippet is the view an App Intent shows in Spotlight, Siri, or
  Shortcuts: a result (with Done) or a confirmation (Cancel plus a button
  that names the action, never "OK"). At most 400 pt tall, readable in
  light and dark, and clear without the spoken text.
- Badge the Dock icon only with a count of unread notifications.

## Signing keeps grants

macOS stores Accessibility and Screen Recording grants per code signature
and path. To keep them across rebuilds:

- Sign with one stable "Apple Development" certificate. Ad hoc signing asks
  again after every build.
- Install to the same path every time (`/Applications/<App>.app` or
  `~/Applications/<App>.app`).
- No App Sandbox for apps that use Accessibility, event taps, or other
  apps' windows. The sandbox blocks them.
- After an install, refresh Launch Services so the Dock shows the new icon:
  `lsregister -f -R -trusted /Applications/<App>.app` (the tool lives in
  `/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/`).

If a grant looks on but the API fails, the signature changed. Remove the
app from the list in System Settings, add it again, restart the app.

## Make every feature reachable three ways

Each feature gets: a menu item with a shortcut, a URL
(`<app>://action/<name>`), and an App Intent. The same action enum backs all
three, so a new action shows up everywhere at once. App Intent enum titles
must be literals, so they can drift from menu titles: add a self-test check
that they match. The URL also lets
`test-mac-app` drive the feature from a script.

Done when every entry point in the brief's "System hooks" works from a
clean install, and Settings shows the state of every permission it needs.

© daveebbelaar · MIT · daveebbelaar/bama

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

Все скиллы по теме «Бэкенд и API» →
axiom-macos CharlesWiltgen Скилл axiom-macos направляет ИИ при разработке macOS-приложений на SwiftUI и AppKit: от окон и меню до sandbox, дистрибуции и экранного захвата. CX Codex +1 1 600установок pi-computer-use reason-machines Скилл pi-computer-use управляет окнами программ на macOS через Accessibility API вместо слепых кликов по координатам. Скилл пригодится для автоматизации интерфейса рабочего стола. CX Codex +1 322установок scrawl kitlangton Анализирует записи экрана в формате .scrawl, включая голос, клики и графические пометки. Помогает разобраться в баг-репортах, когда пользователь присылает видео вместо описания. CX Codex +1 682установок mac-control-mcp AdelElo13 MCP-сервер mac-control-mcp для Claude Code и других клиентов: управляет приложениями и интерфейсом macOS — окнами, браузером, экраном. CX Codex +1 ★ 19звёзд репо app-intents dpearson2699 Скилл по App Intents для iOS: помогает вывести действия и данные приложения в Siri, Shortcuts, Spotlight, виджеты и Control Center. CX Codex +1 4 300установок permiso-accessibility-permissions reason-machines Скилл permiso-accessibility-permissions для агентов, который подсказывает, как встроить в macOS-приложение панель с просьбой выдать доступ к универсальному доступу. CX Codex +1 393установок

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

Весь набор →
performance Скилл performance для Claude Code, который измеряет нагрузку на CPU, память и энергию в macOS-приложениях. Помогает находить причины зависаний и переносить вычисления с основного потока на GPU. CX Codex +1 1 000установок improve-architecture Скилл improve-architecture для Claude Code разбирает архитектуру macOS-приложения на Swift и планирует безопасный рефакторинг. Срабатывает перед крупной функцией, в конце этапа или при повторяющихся проблемах в одной области. CX Codex +1 1 000установок app-brief Скилл app-brief для Claude Code и Cursor создаёт одностраничный файл docs/BRIEF.md для нового приложения под macOS до написания кода. CX Codex +1 1 000установок design-from-app Скилл design-from-app для Claude Code воссоздает дизайн любого приложения в виде нативной дизайн-системы SwiftUI по скриншотам. CX Codex +1 1 000установок layout-grid Скилл layout-grid для Claude Code проверяет сетку и выравнивание в приложениях macOS SwiftUI. Запускается при создании кастомных экранов, карточек, форм и после изменения вёрстки. CX Codex +1 1 000установок user-stories Скилл user-stories для Claude Code, который превращает описание приложения в бэклог пользовательских историй с проверяемыми критериями. CX Codex +1 1 000установок swift-swiftui Скилл swift-swiftui для Claude Code задаёт правила Swift 6 и SwiftUI для приложений macOS. Подключается при написании, проверке и отладке Swift-кода, в том числе при ошибках конкуренции и Sendable. CX Codex +1 1 000установок design-kit Скилл design-kit для Claude Code и Cursor собирает дизайн-систему для macOS SwiftUI на токенах и компонентах. Включается, когда нужна своя тема интерфейса, фирменный стиль или библиотека элементов. CX Codex +1 1 000установок

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

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