# homekit

Assists with Apple smart home development in Swift, covering HomeKit device management and Matter commissioning.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/homekit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/homekit

## What it does

This skill supplies the agent with architecture patterns for Apple's `HomeKit` and `MatterSupport` frameworks. It enforces the correct data hierarchy from `HMHomeManager` down to rooms and writable characteristics, alongside grouped action sets and timer triggers.

Using these APIs requires upfront configuration in Xcode. You must enable the HomeKit capability and specify `NSHomeKitUsageDescription` in `Info.plist`. Commissioning Matter hardware requires a dedicated MatterSupport Extension target subclassing `MatterAddDeviceExtensionRequestHandler` and Bonjour service entries for discovery.

Reading the `homes` array immediately after initializing `HMHomeManager` fails silently because data loads asynchronously. The skill prevents empty reads by waiting for the `homeManagerDidUpdateHomes` callback.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill homekit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/homekit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/homekit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill homekit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/homekit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill homekit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/homekit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills homekit
```

2. **Manually: put the files in place**
- File: `.github/skills/homekit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill homekit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/homekit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/homekit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill homekit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/homekit/SKILL.md

## When to use it
- Structure homes and rooms using the HMHomeManager hierarchy
- Read and update device states via HMCharacteristic
- Create grouped automation scenes using HMActionSet
- Configure extension targets and Info.plist keys for Matter commissioning

## Example prompts
- Show how to initialize HMHomeManager and wait for delegate callbacks
- Write Swift code to toggle an accessory power state using HMCharacteristic
- What Bonjour service names and capabilities are needed for a MatterSupport extension?

## Similar
- [xcode-project-setup](https://affpapa.org/en/nevibecode/skills/xcode-project-setup.md) — skill · 130700 installs
- [expo-migrate-module](https://affpapa.org/en/nevibecode/skills/expo-migrate-module.md) — skill · 19400 installs
- [clerk-swift](https://affpapa.org/en/nevibecode/skills/clerk-swift.md) — skill · 14500 installs
- [swiftdata-pro](https://affpapa.org/en/nevibecode/skills/swiftdata-pro.md) — skill · 9300 installs
- [cmux-architecture](https://affpapa.org/en/nevibecode/skills/cmux-architecture.md) — skill · 4900 installs
- [mobile-apps-create](https://affpapa.org/en/nevibecode/skills/mobile-apps-create.md) — skill · 4800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
