macos-iokit-hardware

Implement low-level hardware access, audio routing, and power management in macOS 26+ apps.

1|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/LaughingJackalope/macos-skills --skill macos-iokit-hardware
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-iokit-hardware
Source: https://github.com/LaughingJackalope/macos-skills/tree/main/macos-iokit-hardware
Command: npx skills add https://github.com/LaughingJackalope/macos-skills --skill macos-iokit-hardware

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the complexity of implementing low-level hardware interactions, audio routing, and power management in macOS applications, which requires navigating specialized IOKit, CoreAudio, and IOPMLib APIs with strict memory management and entitlement requirements.

Core Features & Use Cases

  • IOKit & HID Device Access: Enumerate USB devices, manage custom HID peripherals (gamepads, joysticks, custom input devices), and traverse the IORegistry to read hardware properties.
  • Audio Control: Route audio to specific output devices via AVAudioEngine, play system sounds with NSSound, and configure CoreAudio audio units for custom audio workflows.
  • Power Management: Create scoped power assertions to prevent system sleep during critical operations, and monitor battery state, charge level, and warning levels.
  • Use Case: If you are building a macOS creative tool that supports custom input devices, routes audio to professional USB audio interfaces, and keeps the system awake during large project exports, this skill provides production-ready, safety-checked code patterns.

Quick Start

Use the macos-iokit-hardware skill to implement USB gamepad input handling, route audio to a selected USB audio device, and add a power assertion to prevent system sleep during a batch file export in your macOS application.

Frequently Asked Questions about macos-iokit-hardware

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

FAQPage Schema
How do I enumerate USB devices and access custom HID peripherals in a macOS Swift application?

You enumerate USB devices and manage custom HID peripherals in macOS by using IOKit to traverse the IORegistry and read hardware properties. This provides Swift code patterns for low-level hardware access to devices like gamepads and custom input peripherals.

What is the best way to route audio to a specific output device using CoreAudio in macOS?

Routing audio to a specific output device in macOS involves configuring CoreAudio audio units and utilizing AVAudioEngine for custom audio workflows. This targets professional USB audio interfaces and routes system sounds to selected hardware.

How do I prevent system sleep during critical operations like file exports on macOS?

Preventing system sleep during critical macOS operations involves creating scoped power assertions using IOPMLib. This power management functionality keeps the system awake during large project exports while allowing battery state and charge level monitoring.

What memory management and entitlement safety guardrails are required for IOKit hardware access?

IOKit hardware access requires strict memory management and specific entitlements to safely interact with low-level system components. This includes safety guardrails and troubleshooting guidance for common IOKit edge cases to ensure stable desktop software operation.

Does this IOKit and CoreAudio approach work with the latest macOS and Swift versions?

Yes, this approach works with macOS 26+ and provides production-ready Swift 6.3 code patterns. It is designed for desktop software needing hardware access, audio routing, and power management, ensuring compatibility with modern macOS development.

Why does my custom HID device fail to connect when traversing the IORegistry?

Custom HID device failures during IORegistry traversal often stem from missing entitlements or memory management edge cases. This Skill provides troubleshooting guidance for common IOKit issues, ensuring safe and stable hardware access for custom peripherals in macOS applications.