ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

mac-contacts

CLI for reading and managing macOS Contacts (CNContactStore). Supports searching by name, email, phone number, city, or country; showing all fields for a contact including list membership; creating and updating contacts with name, org, phone, email, and postal address; deleting contacts; and managing group (list) membership. Use when asked to look up, add, edit, remove, or organise contacts on macOS, or when you need a contact's phone number, email, address, or which lists they belong to.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bdwelle/mac-contacts
Or

mac-contacts

macOS Contacts CLI backed by CNContactStore. All reads use unified contact views (iCloud + local + Exchange merged). All writes are atomic via CNSaveRequest. Group membership removal uses osascript to work around a silent no-op in CNSaveRequest.removeMember_fromGroup_ for iCloud-backed groups.

Dependencies

pip install pyobjc-framework-Contacts
pip install pyyaml

Grant Contacts access to Terminal (or your agent host) when prompted on first run, or via System Settings → Privacy & Security → Contacts.

Invocation

python3 skill://mac-contacts/scripts/mac-contacts.py <subcommand> [options]

All examples below use mac-contacts as shorthand for the full invocation.


Subcommands

search

Search contacts. With a positional query, performs a single-pass search across name, organisation, note, email, phone (digits normalised), and postal address fields. Use explicit flags to restrict to a specific field.

search [QUERY]
       [--list LIST]
       [--email EMAIL]
       [--phone PHONE]
       [--city CITY]
       [--country COUNTRY]
FlagDescription
QUERYComprehensive search across all fields. Phone digits are matched fuzzily (query digits must appear in contact's digit-stripped number; minimum 4 digits required for phone matching).
--list LISTReturn only contacts that are members of the named list/group.
--email EMAILMatch by email address (uses the CNContact native email predicate — efficient).
--phone PHONEMatch by phone number; non-digit characters stripped before comparison. Minimum 4 digits.
--city CITYMatch by city in any postal address.
--country COUNTRYMatch by country in any postal address.

Examples:

# Comprehensive — finds by name, org, email, phone, address
mac-contacts search "John"
mac-contacts search "[email protected]"   # auto-matches email
mac-contacts search "415-555"            # auto-matches phone (≥4 digits)
mac-contacts search "San Francisco"      # auto-matches city

# Explicit field targeting
mac-contacts search --email "[email protected]"
mac-contacts search --phone "415"        # error: fewer than 4 digits
mac-contacts search --phone "4155551234"
mac-contacts search --city "London"
mac-contacts search --country "Germany"

# Filter to list members
mac-contacts search --list "Work"

Output per contact: name, organisation, phone(s), email(s), address(es).


show

Show every available field for a contact, including list membership.

show NAME

Output includes: full name (with prefix/middle/suffix), nickname, organisation, job title, department, phones, emails, postal addresses, URLs, social profiles, birthday, dates, note (if readable), and Lists.

mac-contacts show "Jane Doe"
mac-contacts show "Apple"        # matches any contact whose name contains "Apple"

Metadata

Author@bdwelle
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bdwelle-mac-contacts": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.