
Homekit
Guide Swift iOS code for HomeKit homes, action sets, timer triggers, and automations with correct Apple capability and timing patterns.
Overview
HomeKit is an agent skill for the Build phase that provides Swift and HomeKit API guidance for automations, timer triggers, action sets, and iOS capability setup.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill homekitWhat is this skill?
- Eval-driven guidance for nightly Good Night automations with HMTimerTrigger
- Daily recurrence via DateComponents(day: 1) instead of reusing wall-clock components
- Prerequisites: HomeKit capability and NSHomeKitUsageDescription
- Single HMHomeManager pattern and homeManagerDidUpdateHomes access timing
- Distinguishes HomeKit APIs from MatterSupport-only routing when appropriate
- Skill eval pack with structured HomeKit automation scenarios (e.g. eval id 0 Good Night flow)
Adoption & trust: 1.2k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are coding HomeKit automations but risk wrong recurrence components, early home access, or missing entitlements that break nightly scenes in production.
Who is it for?
Indie iOS developers building first-party HomeKit apps with scenes and time-based automations.
Skip if: Android-only smart-home apps or teams that need full Matter commissioning docs without any HomeKit bridge.
When should I use this skill?
User builds a HomeKit iOS app, timer automations, action sets, or asks for Swift guidance on homes, triggers, and entitlements.
What do I get? / Deliverables
You ship Swift that creates action sets, attaches daily HMTimerTrigger schedules, enables triggers safely, and documents required Info.plist and capability setup.
- Swift snippets for triggers, action sets, and scene attachment
- Checklist of capability and timing gotchas for automations
Recommended Skills
Journey fit
HomeKit app work is native mobile integration during Build when you connect accessories, scenes, and automations to your product. The skill focuses on HMHomeManager, triggers, and entitlements—platform integration rather than SwiftUI layout or App Store marketing.
How it compares
Focused HomeKit automation skill—not a cross-platform IoT backend or generic SwiftUI design system.
Common Questions / FAQ
Who is homekit for?
Solo Swift/iOS builders adding HomeKit scenes, timer triggers, and home manager lifecycle code to a smart-home app.
When should I use homekit?
Use it in Build integrations when creating HMActionSet flows, daily HMTimerTrigger automations, or clarifying HomeKit versus Matter entry points for accessories.
Is homekit safe to install?
Review the Security Audits panel on this Prism page; HomeKit skills describe APIs that control real accessories—test on sandbox homes and validate privacy strings before shipping.
SKILL.md
READMESKILL.md - Homekit
{ "skill_name": "homekit", "evals": [ { "id": 0, "prompt": "I'm building a HomeKit app that should create a nightly Good Night automation at 10:30 PM. Sketch the Swift guidance for creating the action set, adding a timer trigger that repeats daily, attaching the scene, and enabling the trigger. Call out the HomeKit setup prerequisites and any timing gotchas.", "expected_output": "HomeKit automation guidance that uses a single HMHomeManager, creates an HMActionSet, creates an HMTimerTrigger with a first fire date at 22:30 and a daily recurrence interval, attaches the action set, enables the trigger, and lists HomeKit capability/usage-description prerequisites.", "files": [], "expectations": [ "Uses HomeKit/HMHomeManager, HMHome, HMActionSet, and HMTimerTrigger rather than routing the task to MatterSupport or AccessorySetupKit.", "Computes the first fire date from hour/minute components such as 22:30.", "Uses a recurrence interval such as DateComponents(day: 1) for daily repeat instead of reusing hour/minute wall-clock components as the recurrence.", "Adds the trigger to the home, adds the action set to the trigger, and enables the trigger.", "Mentions the HomeKit capability and NSHomeKitUsageDescription, and does not access homes before homeManagerDidUpdateHomes." ] }, { "id": 1, "prompt": "We need to add Matter lights into our own smart-home ecosystem from an iOS app. Write the setup checklist and Swift-oriented commissioning outline, including discovery configuration, the extension handler callbacks, optional setup-code handling, and what the app should do after perform() succeeds.", "expected_output": "MatterSupport commissioning guidance that adds the MatterSupport extension, declares Matter Bonjour services, uses MatterAddDeviceRequest with topology and isSupported, explains conditional setup-payload entitlement/MTRSetupPayload usage, and outlines the extension handler callbacks for credential validation, rooms, commissioning, configuration, and optional network selection.", "files": [], "expectations": [ "Adds or verifies a MatterSupport extension target with a MatterAddDeviceExtensionRequestHandler principal handler.", "Includes NSBonjourServices entries for _matter._tcp, _matterc._udp, and _matterd._udp.", "Checks MatterAddDeviceRequest.isSupported and builds a topology with ecosystem name and homes before perform().", "Limits com.apple.developer.matter.allow-setup-payload to callers that provide setup codes programmatically and mentions MTRSetupPayload from the Matter framework for that case.", "Names extension callbacks such as validateDeviceCredential(_:), rooms(in:), commissionDevice(in:onboardingPayload:commissioningID:), configureDevice(named:in:), and optional Wi-Fi/Thread network selection.", "Does not present MatterSupport commissioning as ordinary HMHome accessory setup or a lower-level AccessorySetupKit picker flow." ] }, { "id": 2, "prompt": "A product proposal says one Apple accessory guide should cover Matter light onboarding, HomeKit rooms and automations, BLE discovery for a setup-only accessory, GATT control after selection, and joining a temporary Wi-Fi setup network. Write a routing note that assigns each part to the right framework domain and explains what belongs in the HomeKit skill.", "expected_output": "A boundary-aware routing note that assigns HomeKit/MatterSupport to homes, rooms, HMAccessory characteristics, action sets, triggers, and Matter onboarding; AccessorySetupKit to Bluetooth/Wi-Fi discovery, picker authorization, session events, and migration; CoreBluetooth/GATT to BLE communication after selection; and NetworkExtension to Wi-Fi setup-network joins.", "files": [], "expectations": [ "Identifies HomeKit/MatterSupport as the owner for homes, rooms, HMAccessory services