Fetch, create, update, and pick contacts from the user's Contacts database using
Works with
CNContactStore, CNSaveRequest, and CNContactPickerViewController. Targets
Swift 6.3 / iOS 26+.
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncontacts-frameworkExecute the skills CLI command in your project's root directory to begin installation:
Fetches contacts-framework from dpearson2699/swift-ios-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate contacts-framework. Access via /contacts-framework in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
372
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
372
stars
Fetch, create, update, and pick contacts from the user's Contacts database using
CNContactStore, CNSaveRequest, and CNContactPickerViewController. Targets
Swift 6.3 / iOS 26+.
NSContactsUsageDescription to Info.plist explaining why the app accesses contactscom.apple.developer.contacts.notes entitlementimport Contacts // CNContactStore, CNSaveRequest, CNContact
import ContactsUI // CNContactPickerViewController
Request access before fetching or saving contacts. The picker (CNContactPickerViewController)
does not require authorization -- the system grants access only to the contacts
the user selects.
let store = CNContactStore()
func requestAccess() async throws -> Bool {
return try await store.requestAccess(for: .contacts)
}
// Check current status without prompting
func checkStatus() -> CNAuthorizationStatus {
CNContactStore.authorizationStatus(for: .contacts)
}
| Status | Meaning |
|---|---|
.notDetermined |
User has not been prompted yet |
.authorized |
Full read/write access granted |
.denied |
User denied access; direct to Settings |
.restricted |
Parental controls or MDM restrict access |
.limited |
iOS 18+: user granted access to selected contacts only |
Use unifiedContacts(matching:keysToFetch:) for predicate-based queries.
Use enumerateContacts(with:usingBlock:) for batch enumeration of all contacts.
func fetchContacts(named name: String) throws -> [CNContact] {
let predicate = CNContact.predicateForContacts(matchingName: name)
let keys: [CNKeyDescriptor] = [
CNContactGivenNameKey as CNKeyDescriptor,
CNContactFamilyNameKey as CNKeyDescriptor,
CNContactPhoneNumbersKey as CNKeyDescriptor
]
return try store.unifiedContacts(matching: predicate, keysToFetch: keys)
}
func fetchContact(identifier: String) throws -> CNContact {
let keys: [CNKeyDescriptor] = [
CNContactGivenNameKey as CNKeyDescriptor,
CNContactFamilyNameKey as CNKeyDescriptor,
CNContactEmailAddressesKey as CNKeyDescriptor
]
return try store.unifiedContact(withIdentifier: identifier, keysToFetch: keys)
}
Perform I/O-heavy enumeration off the main thread.
func fetchAllContacts() throws -> [CNContact] {
let keys: [CNKeyDescriptor] = [
CNContactGivenNameKey as CNKeyDescriptor,
CNContactFamilyNameKey as CNKeyDescriptor
]
let request = CNContactFetchRequest(keysToFetch: keys)
request.sortOrder = .givenName
var contacts: [CNContact] = []
try store.enumerateContacts(with: request) { contact, _ in
contacts.append(contact)
}
return contacts
}
Only fetch the properties you need. Accessing an unfetched property throws
CNContactPropertyNotFetchedException.
| Key | Property |
|---|---|
CNContactGivenNameKey |
First name |
CNContactFamilyNameKey |
Last name |
CNContactPhoneNumbersKey |
Phone numbers array |
CNContactEmailAddressesKey |
Email addresses array |
CNContactPostalAddressesKey |
Mailing addresses array |
CNContactImageDataKey |
Full-resolution contact photo |
CNContactThumbnailImageDataKey |
Thumbnail contact photo |
CNContactBirthdayKey |
Birthday date components |
CNContactOrganizationNameKey |
Company name |
Use CNContactFormatter.descriptorForRequiredKeys(for:) to fetch all keys needed
for formatting a contact's name.
let nameKeys = CNContactFormatter.descriptorForRequiredKeys(for: .fullName)
let keys: [CNKeyDescriptor] = [nameKeys, CNContactPhoneNumbersKey as CNKeyDescriptor]
Use CNMutableContact to build new contacts and CNSaveRequest to persist changes.
func createContact(givenName: String, familyName: String, phone: String) throws {
let contact = CNMutableContact()
contact.givenName = givenName
contact.familyName = familyName
contact.phoneNumbers = [
CNLabeledValue(
label: CNLabelPhoneNumberMobile,
value: CNPhoneNumber(stringValue: phone)
)
]
let saveRequest = CNSaveRequest()
saveRequest.add(contact, toContainerWithIdentifier: nil) // nil = default container
try store.execute(saveRequest)
}
You must fetch the contact with the properties you intend to modify, create a mutable copy, change the properties, then save.
func updateContactEmail(identifier: String, email: String) throws {
let keys: [CNKeyDescriptor] = [
CNContactEmailAddressesKey as CNKeyDescriptor
]
let contact = try store.unifiedContact(withIdentifier: identifier, keysToFetch: keys)
guard let mutable = contact.mutableCopy() as? CNMutableContact else { return }
mutable.emailAddresses.append(
CNLabeledValue(label: CNLabelWork, value: email as NSString)
)
let saveRequest = CNSaveRequest()
saveRequest.update(mutable)
try store.execute(saveRequest)
}
func deleteContact(identifier: String) throwsMake data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
mattpocock/skills
contacts-framework reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added contacts-framework from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
We added contacts-framework from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
contacts-framework is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: contacts-framework is focused, and the summary matches what you get after install.
contacts-framework is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added contacts-framework from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
contacts-framework reduced setup friction for our internal harness; good balance of opinion and flexibility.
contacts-framework reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: contacts-framework is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 62