# contacts-framework

This skill guides Swift projects through contact lookup, creation, edits, permissions, and presenting the system contact picker in SwiftUI.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3600 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/contacts-framework/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/contacts-framework

## What it does

The skill covers `CNContactStore` queries by name or identifier, full contact enumeration, and saving changes with `CNSaveRequest`. It also explains how to build or modify records using `CNMutableContact` and present `CNContactPickerViewController` from a SwiftUI app.

Fetch the property keys your code will read. Accessing a property that was not fetched raises `CNContactPropertyNotFetchedException`. For ordinary Contacts API access, add `NSContactsUsageDescription` to `Info.plist`; without it, using contact data APIs crashes the app. The system picker needs no authorization request and gives the app access only to the contacts the user selects.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -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/contacts-framework/SKILL.md

## When to use it
- request permission before reading or saving contacts
- look up records by name or identifier
- enumerate an address book away from the main thread
- create or edit a record and commit it with `CNSaveRequest`
- present the system contact picker from SwiftUI

## Example prompts
- Add contact lookup by name to my Swift app using `CNContactStore`.
- Create a contact with a name and phone number, then save it using `CNSaveRequest`.
- Present the system contact picker in SwiftUI and handle the selected record.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 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
