macos-core-frameworks

Bind Rust to macOS Core Graphics and Core Foundation for UI and system events.

28|6|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/johnlindquist/script-kit-next --skill macos-core-frameworks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-core-frameworks
Source: https://github.com/johnlindquist/script-kit-next/tree/main/.opencode/skill/macos-core-frameworks
Command: npx skills add https://github.com/johnlindquist/script-kit-next --skill macos-core-frameworks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires core-graphics, core-foundation, foreign-types, anyhow, libc, macos-accessibility-client, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides low-level Rust bindings to macOS Core Graphics and Core Foundation frameworks, enabling programmatic control over UI elements, keyboard input, and system events.

Core Features & Use Cases

  • Keyboard Simulation: Programmatically trigger keystrokes, including modifier combinations like Cmd+V for pasting.
  • Global Event Monitoring: Capture keyboard events system-wide using CGEventTap (requires Accessibility permissions).
  • Display Management: Query information about connected displays, including their bounds and main status.
  • Use Case: Automate repetitive typing tasks, create custom keyboard shortcuts that trigger complex actions, or build accessibility tools that interact with the macOS UI.

Quick Start

Use the macos-core-frameworks skill to simulate pressing the Command+C key combination.

Frequently Asked Questions about macos-core-frameworks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate keyboard input like Cmd+V on macOS using Rust?

Simulating keyboard input on macOS using Rust involves leveraging Core Graphics bindings to programmatically trigger keystrokes, including modifier combinations like Cmd+V. This allows you to automate repetitive typing tasks and trigger complex actions.

How does global event monitoring work for macOS system events in Rust?

Global event monitoring for macOS system events in Rust works by capturing keyboard inputs system-wide using CGEventTap. This Core Graphics mechanism intercepts events before they reach their target application, requiring explicit Accessibility permissions to function.

Do I need Accessibility permissions to tap keyboard events on macOS?

Yes, you need Accessibility permissions to tap keyboard events on macOS. Using CGEventTap for global event monitoring requires explicit Accessibility permissions to securely capture system-wide inputs and control UI interactions.

Can I retrieve connected display bounds and main status using Core Graphics in Rust?

Yes, you can retrieve connected display bounds and main status using Core Graphics in Rust. The framework provides bindings to query display management information, returning the geometric bounds and identifying the main display.

What are the limitations of using Core Foundation bindings for macOS UI automation?

Limitations of using Core Foundation bindings for macOS UI automation include strict dependency on Accessibility permissions for event tapping and low-level scope, meaning you handle raw Core Graphics events directly without higher-level UI abstractions.