contacts-framework — Claude Code skill for Swift contacts
This skill guides Swift projects through contact lookup, creation, edits, permissions, and presenting the system contact picker in SwiftUI.
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a claude-codeWhat contacts-framework 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.
What it helps with
- 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 for the agent
- 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.
How to install contacts-framework
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a claude-code2Manually: put the files in place
~/.claude/skills/contacts-framework/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/contacts-framework/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a codex2Manually: put the files in place
.agents/skills/contacts-framework/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a cursor2Manually: put the files in place
.cursor/skills/contacts-framework/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills contacts-framework2Manually: put the files in place
.github/skills/contacts-framework/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/contacts-frameworkManually: put the files in place
.devin/skills/contacts-framework/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about contacts-framework
How do I install contacts-framework in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill contacts-framework -a claude-code. The skill file is at ~/.claude/skills/contacts-framework/SKILL.md.
What does contacts-framework do?
It guides contact queries and saves with Apple’s Contacts frameworks, including permission handling and presenting the system picker in SwiftUI.
Does CNContactPickerViewController require contact authorization?
No. The system picker can be used without a separate authorization request; the app can access only the records the user selects.