Automates macOS Contacts via JXA with AppleScript dictionary discovery. Use when asked to "automate contacts", "JXA contacts automation", "macOS address book scripting", "AppleScript contacts", or "Contacts app automation". Covers querying, CRUD, multi-value fields, groups, images, and ObjC bridge fallbacks.
automating-mac-apps for: TCC permissions setup, shell command helpers, UI scripting fallbacks, and ObjC bridge patterns.automating-mac-apps skill (PyXA Installation section).name(), emails()), write with assignments.push()add ... to command or .people.push; handle duplicates defensively.whose for coarse filtering; fall back to hybrid (coarse filter + JS refine) when needed.make, then assign primitives and push multi-values; Contacts.save() to persist.person.id() exists after save; handle TCC permission errors..id() checksconst Contacts = Application("Contacts");
const email = "ada@example.com";
try {
const existing = Contacts.people.whose({ emails: { value: { _equals: email } } })();
const person = existing.length ? existing[0] : Contacts.Person().make();
person.firstName = "Ada";
person.lastName = "Lovelace";
// Handle multi-value email
const work = Contacts.Email({ label: "Work", value: email });
person.emails.push(work);
Contacts.save();
// Handle groups with error checking
let grp;
try {
grp = Contacts.groups.byName("VIP");
grp.name(); // Verify exists
} catch (e) {
grp = Contacts.Group().make();
grp.name = "VIP";
}
Contacts.add(person, { to: grp });
Contacts.save();
console.log("Contact upserted successfully");
} catch (error) {
console.error("Contacts operation failed:", error);
}
automating-contacts/references/contacts-basics.mdautomating-contacts/references/contacts-recipes.mdautomating-contacts/references/contacts-advanced.mdautomating-contacts/references/contacts-dictionary.mdautomating-contacts/references/contacts-pyxa-api-reference.mdSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer