Agent skill · Audited from source
contacts-framework
skill · dpearson2699/swift-ios-skillsNOASSERTION licenceAudited 13 Nov 2026 · source 8c7069c512a0
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 8c7069c512a0 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Read, create, update, and pick contacts using the Contacts and ContactsUI frameworks. Use when fetching contact data, saving new contacts, wrapping CNContactPickerViewController in SwiftUI, handling contact permissions,…
Cite
Cite this page
ModelsAtlas. “contacts-framework (dpearson2699/swift-ios-skills)”. Retrieved 13 Nov 2026. https://modelsatlas.com/skills/dpearson2699/contacts-framework
Trust audit
Audit 0.4.1 · source read 13 Nov 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 8c7069c512a0 · 13 Nov 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherdpearson2699 GitHub userOwner of the repository this skill is read from
- Source folderdpearson2699/swift-ios-skills/skills/contacts-frameworkThe exact folder we audited
- LicenceNOASSERTIONAs the repository states it
- Commit pinned for this verdict8c7069c512a0A new audit runs when the source changes
- Repository statusNot archivedLast push 104 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Read, create, update, and pick contacts using the Contacts and ContactsUI frameworks. Use when fetching contact data, saving new contacts, wrapping CNContactPickerViewController in SwiftUI, handling contact permissions,…
---
name: contacts-framework
description: "Read, create, update, and pick contacts using the Contacts and ContactsUI frameworks. Use when fetching contact data, saving new contacts, wrapping CNContactPickerViewController in SwiftUI, handling contact permissions, or working with CNContactStore fetch and save requests."
---
# Contacts Framework
Use `CNContactStore`, `CNSaveRequest`, and `CNContactPickerViewController` to
fetch, create, update, or pick contacts in Swift 6.3 / iOS 26+ apps.
## Contents
- [Setup](#setup)
- [Authorization](#authorization)
- [Fetching Contacts](#fetching-contacts)
- [Key Descriptors](#key-descriptors)
- [Creating and Updating Contacts](#creating-and-updating-contacts)
- [Contact Picker](#contact-picker)
- [Observing Changes](#observing-changes)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## Setup
### Project Configuration
1. Add `NSContactsUsageDescription` to Info.plist explaining why the app accesses contacts. The app crashes if it uses contact data APIs without this key.
2. No additional capability or entitlement is required for ordinary Contacts access.
3. Add `com.apple.developer.contacts.notes` only when reading or writing `CNContactNoteKey` / `CNContact.note`; this entitlement requires Apple approval before public distribution.
### Imports
```swift
@preconcurrency import Contacts // CNContactStore, CNSaveRequest, CNContact
import ContactsUI // CNContactPickerViewController
```
## Authorization
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.
```swift
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)
}
```
### Authorization States
| 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 |
Treat both `.authorized` and `.limited` as usable Contacts API states. With
`.limited`, fetch, edit, and delete operations only apply to contacts the user
granted or the app created. Use `ContactAccessButton` or
`contactAccessPicker(isPresented:completionHandler:)` to let users add contacts
to the app's limited-access set.
## Fetching Contacts
Use `unifiedContacts(matching:keysToFetch:)` for predicate-based queries.
Use `enumerateContacts(with:usingBlock:)` for batch enumeration of all contacts.
For large cached address books, first fetch identifiers, then fetch detailed
contacts in batches by identifier.
### Fetch by Name
```swift
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)
}
```
### Fetch by Identifier
```swift
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)
}
```
### Enumerate All Contacts
Perform I/O-heavy enumeration off the main thread.
```swift
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
}
```
## Key Descriptors
Only fetch the properties you need. Accessing an unfetched property throws
`CNContactPropertyNotFetchedException`.
### Common Keys
| 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 |
### Composite Key Descriptors
Use `CNContactFormatter.descriptorForRequiredKeys(for:)` to fetch all keys needed
for formatting a contact's name.
```swift
let nameKeys = CNContactFormatter.descriptorForRequiredKeys(for: .fullName)
let keys: [CNKeyDescriptor] = [nameKeys, CNContactPhoneNumbersKey as CNKeyDescriptor]
```
## Creating and Updating Contacts
Use `CNMutableContact` to build new contacts and `CNSaveRequest` to persist changes.
### Creating a New Contact
```swift
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.execuExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 8c7069c
git clone https://github.com/dpearson2699/swift-ios-skills git -C swift-ios-skills checkout 8c7069c512a0
The author documents no install command, so this uses the repository directly. Our verdict covers commit 8c7069c512a0 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
8c7069c512a0
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/dpearson2699/contacts-framework/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All design & front-end skills →dpearson2699/swift-ios-skills
Build direct Bluetooth Low Energy workflows with Core Bluetooth. Use when implementing BLE central or peripheral GATT communication, scanning or connecting with CBCentralManager, discovering services and…
dpearson2699/swift-ios-skills
Build CarPlay-enabled apps using the CarPlay framework. Use when creating navigation, audio, communication, EV charging, parking, or food ordering apps for the car display, working with CPTemplateApplicationScene,…
dpearson2699/swift-ios-skills
Implement, review, or improve CloudKit and iCloud sync in iOS/macOS apps. Use when working with CKContainer, CKRecord, CKQuery, CKSubscription, CKSyncEngine, CKShare, NSUbiquitousKeyValueStore, or iCloud Drive file…
dpearson2699/swift-ios-skills
Schedule and execute background work on iOS using BGTaskScheduler. Use when registering BGAppRefreshTask for short background fetches, BGProcessingTask for long-running maintenance, BGContinuedProcessingTask (iOS 26+)…
dpearson2699/swift-ios-skills
Build alternative browser engines using BrowserEngineKit. Use when developing a non-WebKit browser engine for iOS/iPadOS in supported regions, managing web content/rendering/networking extension processes, configuring…
dpearson2699/swift-ios-skills
Implement iOS authentication flows with AuthenticationServices and LocalAuthentication. Use when building Sign in with Apple, passkey/WebAuthn registration or sign-in with…
Add this badge to your README
[](https://modelsatlas.com/skills/dpearson2699/contacts-framework/)
<a href="https://modelsatlas.com/skills/dpearson2699/contacts-framework/"><img src="https://modelsatlas.com/skills/dpearson2699/contacts-framework/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about contacts-framework
What does the contacts-framework skill do?
Is contacts-framework safe to install?
What can contacts-framework access on my machine?
How current is this page?
Sources
- github.com/dpearson2699/swift-ios-skills/tree/main/skills/contac — the audited source at commit 8c7069c512a0 and every finding aboveObserved · 13 Nov 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the contacts-framework skill do?
- Is contacts-framework safe to install?
- What can contacts-framework access on my machine?