agent-cli
Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search,…
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
Claude Code
$ npx -y skills add daveebbelaar/bama --skill os-integrations --agent claude-code
Codex
$ npx skills add daveebbelaar/bama --skill os-integrations -a codex -y
Cursor
$ npx skills add daveebbelaar/bama --skill os-integrations -a cursor -y
Gemini CLI
$ npx skills add daveebbelaar/bama --skill os-integrations -a gemini-cli -y
GitHub Copilot
$ npx skills add daveebbelaar/bama --skill os-integrations -a github-copilot -y
OpenCode
$ npx skills add daveebbelaar/bama --skill os-integrations -a opencode -y
Windsurf
$ npx skills add daveebbelaar/bama --skill os-integrations -a windsurf -y
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.
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).
| 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.
The exception: an app whose core job needs the permission (a window manager needs Accessibility) shows its permissions page on first launch.
that opens the right pane: `x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility` (or `Privacy_ScreenCapture`, `Privacy_AllFiles`).
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.
must be in Info.plist before the first request, or the app crashes.
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).
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.
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.
macOS stores Accessibility and Screen Recording grants per code signature and path. To keep them across rebuilds:
again after every build.
`~/Applications/<App>.app`).
BAMA: Build Any Mac App. Agent skills to research, clone, design, build, optimize, and test native macOS apps with Swift and SwiftUI.
Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search,…
Architecture check-in for a growing macOS Swift codebase. Finds hot spots, proposes deeper modules, and refactors one step per…
Make a macOS app fast by measuring hangs, stutter, CPU, memory, and energy, then moving work off the main thread and onto the…
Swift 6 and SwiftUI code rules for macOS apps, including concurrency, state, SwiftData, AppKit bridges, and fixes for common…
Liquid Glass macOS app icon made as an Icon Composer file (Icon/AppIcon.icon, JSON plus SVG layers), compiled with actool, and…
Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type,…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…