Back to Skills

homekit

Control smart-home accessories and commission Matter devices using HomeKit and MatterSupport. Use when managing homes/rooms/accessories, creating action sets or triggers, reading accessory characteristics, onboarding Matter devices, or building a third-party smart-home ecosystem app.

857stars43forksUpdated 7/9/2026

Security Assessment

Safe(100/100)
Security Score100/100

About homekit

Coverage of HomeKit and MatterSupport for building smart-home apps on Swift 6.3 / iOS 26+. HomeKit manages the home model (homes, rooms, accessories, services, and characteristics) along with action sets and triggers, while MatterSupport handles commissioning Matter devices into your ecosystem.

Setup requires enabling the HomeKit capability and adding NSHomeKitUsageDescription. Matter commissioning adds a MatterSupport extension target whose principal class subclasses MatterAddDeviceExtensionRequestHandler, Bonjour service entries for _matter._tcp, _matterc._udp, and _matterd._udp, and the allow-setup-payload entitlement when a setup payload is supplied programmatically.

The data model is a hierarchy: HMHomeManager to HMHome to HMRoom to HMAccessory to HMService to HMCharacteristic, with HMZone, HMActionSet, and HMTrigger hanging off the home. Because HomeKit loads asynchronously, code must use a single HMHomeManager and wait for its delegate (homeManagerDidUpdateHomes) before accessing homes or primaryHome; authorization status arrives through a separate delegate callback.

Accessory work includes system-UI discovery via addAndSetupAccessories, enumerating accessories, services, and characteristics, and moving accessories between rooms with assignAccessory. Characteristics support reading with readValue, writing with writeValue, and real-time observation through enableNotification plus the HMAccessoryDelegate update callback. Automation is built from HMActionSet grouping HMCharacteristicWriteAction items (executed with executeActionSet) and two trigger types: HMTimerTrigger for time-based firing with recurrence, and HMEventTrigger driven by HMCharacteristicEvent conditions such as a motion sensor. A scope boundary clarifies the division of labor: HomeKit and MatterSupport handle the home-automation model and Matter commissioning, whereas lower-level Bluetooth or Wi-Fi accessory discovery and authorization belong to AccessorySetupKit, with post-setup communication handed to CoreBluetooth/GATT or NetworkExtension.

FAQ

When is it safe to access the homes array?

Only after the HMHomeManagerDelegate fires (homeManagerDidUpdateHomes); HomeKit loads asynchronously, so accessing homes or primaryHome before then is unsafe.

What does MatterSupport require beyond HomeKit setup?

A MatterSupport extension target with a MatterAddDeviceExtensionRequestHandler subclass, Bonjour entries for _matter._tcp, _matterc._udp, and _matterd._udp, and the allow-setup-payload entitlement when passing a payload programmatically.

How do I create a scene that runs several actions together?

Use an HMActionSet populated with HMCharacteristicWriteAction objects, then run it with executeActionSet.

What trigger types are available?

HMTimerTrigger for time-based firing with a recurrence, and HMEventTrigger driven by characteristic events such as a motion sensor reaching a trigger value.

How does this relate to AccessorySetupKit?

HomeKit and MatterSupport handle the home model and Matter commissioning; lower-level Bluetooth or Wi-Fi discovery and authorization belong to AccessorySetupKit, with post-setup communication handed to CoreBluetooth or NetworkExtension.

All Files

3 files
references/matter-commissioning.md13.1 KB
View
SKILL.md14.6 KB
View
evals/evals.json4.5 KB
View

Install homekit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill