/apple-pim:apple-pimfrom apple-pim
Manages macOS calendars, reminders, contacts, and local Mail.app via EventKit, Contacts framework, and JXA/AppleScript. Handles TCC permissions, authorization states, and SSH session caveats.
Ships in apple-pim. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Apple provides frameworks and scripting interfaces for personal information management:
EventKit and Contacts require explicit user permission via privacy prompts. Mail.app requires Automation permission and must be running.
For detailed API property tables and code examples, see:
references/eventkit-api.md — EKEvent, EKReminder, EKCalendar, recurrence rules, alarmsreferences/contacts-api.md — CNContact, labeled values, groupsreferences/mail-jxa.md — JXA message properties, batch fetching, Mail.app vs Fastmail scopeEach PIM domain requires separate macOS authorization:
| Domain | Framework | Permission Section |
|---|---|---|
| Calendars | EventKit | Privacy & Security > Calendars |
| Reminders | EventKit | Privacy & Security > Reminders |
| Contacts | Contacts | Privacy & Security > Contacts |
| Mail (mutations) | Automation (JXA) | Privacy & Security > Automation |
| Mail (fast reads) | Full Disk Access | Privacy & Security > Full Disk Access |
| Calendars (subscribed availability) | Full Disk Access | Privacy & Security > Full Disk Access |
| State | Meaning | Action |
|---|---|---|
notDetermined | Never requested | Use apple-pim with action authorize to trigger prompt |
authorized | Full access granted | Ready to use |
denied | User refused access | Must enable in System Settings manually |
restricted | System policy (MDM, parental) | Cannot override |
writeOnly | Limited write access (macOS 17+) | Upgrade to Full Access in Settings |
Permissions must be granted on the Mac where the CLI runs. SSH does not inherit GUI-level permission dialogs. Grant permissions locally first.
The PIM CLIs share a configuration system for filtering calendars/reminder lists and setting defaults.
| Path | Purpose |
|---|---|
~/.config/apple-pim/config.json | Base configuration |
~/.config/apple-pim/profiles/{name}.json | Named profile overrides |
{
"calendars": {
"enabled": true,
"mode": "blocklist",
"items": ["US Holidays", "Birthdays"],
"default": "Personal"
},
"reminders": {
"enabled": true,
"mode": "allowlist",
"items": ["Tasks", "Shopping", "Work"],
"default": "Tasks"
},
"contacts": {
"enabled": true
},
"mail": {
"enabled": true
}
}
| Field | Type | Description |
|---|---|---|
enabled | boolean | Whether the domain is active (default: true) |
mode | string | Filter mode: all, allowlist, or blocklist (default: all) |
items | string[] | Calendar/list names for allowlist or blocklist |
default | string | Default calendar or list for creating new items |
| Mode | Behavior |
|---|---|
all | No filtering — all calendars/lists are visible (default) |
allowlist | Only calendars/lists named in items are visible |
blocklist | All calendars/lists are visible EXCEPT those named in items |
Profiles allow different configurations for different contexts (e.g., work vs personal).
Selection priority: --profile CLI flag > APPLE_PIM_PROFILE env var > base config only.
Merge semantics: A profile replaces entire domain sections. If a profile defines calendars, it completely replaces the base calendars config (not a field-by-field merge).
apple-pim with action config_show: Returns the current resolved config after profile merging. Shows domains, filters, defaults, and paths.apple-pim with action config_init: Lists all available calendars and reminder lists from macOS with their sources and system defaults. Does NOT write any files.Both accept an optional profile parameter.
When creating events or reminders, the default calendar/list is resolved in this order:
--calendar or --list parameterdefault value for the domainThere is no MCP tool for writing config files. Users must manually create or edit ~/.config/apple-pim/config.json. Use apple-pim with action config_init to discover available calendars/lists, then guide the user on creating the config.
The auth_check action verifies sender identity by parsing Authentication-Results headers (DKIM + SPF) against a trusted senders config.
Config file: ~/.config/apple-pim/trusted-senders.json
{
"version": 1,
"trustedSenders": [
{
"name": "Alice",
"emails": ["[email protected]"],
"expectedDkimDomains": ["example.com"],
"requireSpf": true
}
]
}
Override path with trustedSenders parameter: mail({ action: "auth_check", id: "<msg-id>", trustedSenders: "~/custom/senders.json" })
.thisEvent vs .futureEvents span for recurring event edits (see EKSpan below)allowsContentModifications before attempting writescalendar with action batch_create when creating multiple events for efficiencyavailability for free/busy: busy, free, tentative, unavailable, or notSupportedEventKit uses EKSpan to control which occurrences are affected by save/delete operations:
| Span | Effect | When to Use |
|---|---|---|
.thisEvent | Affects only the single occurrence | Default for delete and update. Use when cancelling one meeting. |
.futureEvents | Affects this and all future occurrences | Use when ending a series or changing the pattern going forward. |
.thisEvent. Pass --future-events to use .futureEvents..thisEvent. Pass --future-events to apply changes to all future occurrences.recurrence: { frequency: "none" } with --future-events to convert a recurring event into a single event.When reading events/reminders, the recurrence array includes:
frequency: daily, weekly, monthly, yearlyinterval: repeat every N periodsdaysOfTheWeek: which days (e.g., ["monday", "wednesday", "friday"])daysOfTheMonth: which days of month (e.g., [1, 15])endDate or occurrenceCount: when the series endsDefault to incomplete reminders when listing
Use filters for focused views: overdue for urgent items, today for daily planning, week for weekly review
Set completionDate when marking complete
Respect priority levels (1=high is flagged in UI)
Use dueDateComponents not absolute dates for better handling
Use batch operations (reminder with action batch_complete, batch_delete) when acting on multiple items
url is an EventKit field Apple Reminders never renders — a link written only to
EKReminder.url is invisible to the user. The CLI therefore mirrors it into the notes as
a 🔗 <url> line, which Reminders does display and data-detect. Clearing the URL removes
that line; updating other fields preserves both. Pass urlInNotes: false (or
--no-url-in-notes on the CLI) when you want the value stored for machine use only
alarm on a reminder moves the reminder; it is not an early heads-up — Apple Reminders
has one notion of a reminder's time and draws the earliest alarm, falling back to the due
date only when a reminder has no alarms. alarm: [15] on a reminder due at 3:00 makes it
read and fire at 2:45, and the 3:00 due time appears nowhere in the app. Adding a companion
alarm at the due date does not restore it (earliest still wins), and an absolute alarm
resolves to the same instant. Use alarm: [0] to alert at the due date — that is what
Reminders itself writes — or set the due date to the time the user actually wants. The CLI
returns a warnings array whenever a write moves the visible time; surface it
A timed due date gets an alert automatically — Reminders.app attaches an alarm at the
due moment to every timed reminder created in its UI (measured in a live library: 116 of
178 timed reminders carry it) and attaches nothing to an all-day one (115 of 119 carry
nothing). The CLI now writes the same shape, so a reminder created here is
indistinguishable from one created in the app. All-day dues get nothing — an alert on a
date with no time resolves to midnight. An explicit alarm is left exactly as passed.
Opt out with dueAlert: false (--no-due-alert). On update this applies only when due
is also being set, so an unrelated edit never grows an alarm.
This is about matching Apple's representation, not about whether the reminder fires:
dated reminders written with no alarm at all do still notify. Do not re-investigate that;
it is settled
startDate mirrors the due date and is returned on reads — Reminders offers no separate
start-date control, so the CLI keeps the two in sync on every write. A reminder that ends up
with a start date but no due date renders as dateless in Reminders while still occupying a
date slot in EventKit; the returned startDate is how you diagnose that
These Reminders features have no EventKit API. Some are reachable another way (below);
for the rest, say so and stop — do not improvise an adjacent thing. Writing #tag into a
title, creating five flat reminders to stand in for a checklist, or putting "SUBTASK:" in the
notes produces data the user did not ask for and has to clean up by hand.
| Feature | Read | Write |
|---|---|---|
| Subtasks / nesting | parentId, isSubtask, subtaskIds on reads | add_subtask, move_subtask (private) |
| Tags | tags on reads | set_tags (private) |
| Flag | flagged on reads (distinct from priority) | set_flag (private) |
| Sections within a list | section on reads; sections on lists | set_section (private); removing from a section is not supported |
| Urgent | urgent on reads | Not supported |
| Rich links / attached images / files | richLinks, attachments (metadata) on reads | Not supported. A link still has to live in notes to be visible |
| Smart Lists, templates, groceries, list groups | — | Not supported |
| Remind me when messaging | — | No API |
| Assignee on a shared list | — | Not supported |
Reads come from the Reminders database and need Full Disk Access. When the result's
metadata.available is false, these fields are absent: say so (the reason tells the user
what to grant) instead of concluding a reminder has no tags or subtasks. EventKit's own
parentID route is still dead (it does not survive eventStore.save()); the writes above go
through Apple's private ReminderKit framework instead.
Private writes (set_flag, add_subtask, move_subtask, set_section, set_tags) work only
when the user has turned on reminders.privateWrites for this Mac (reminder-cli config private-writes --on, or /apple-pim:configure). It is off by default. If the switch is off, the error says how to turn it on. Do not turn it on yourself; that is the user's decision. Only use them
when the user asked for that change. Each is read back and verified; on failure the error says what was observed and the
write was not retried, so do not retry it yourself either: report it and let the user check
Reminders.app. Subtasks are one level deep and stay in the parent's list.
Calendar's url field is not on this list: Calendar renders EKEvent.url as a live link in
the event inspector, so url on an event reaches the user as-is and needs no mirroring. Only
Reminders hides it.
content search (reads use the direct SQLite path and work with Mail.app closed when Full Disk Access is granted)mail with action batch_update, batch_delete) for inbox triagemail with action send) uses AppleScript — supports to, cc, bcc, from (account selection), subject, bodymail with action reply) preserves threading — looks up message by RFC 2822 ID, then uses Mail.app's reply verbmail with action auth_check) verifies DKIM/SPF against ~/.config/apple-pim/trusted-senders.json — returns verified, suspicious, untrusted, or unknown, plus evaluated. A missing config file no longer stops the check: authentication is still evaluated, nobody is enrolled, and the result says so. A config file that exists but will not parse is a hard errorevaluated before trusting a verdict — unknown with evaluated: false means the DKIM/SPF checks never ran (no headers, no trusted authserv-id), which is a different situation from running them and being unsure. Treating the first as the second means acting on a check that did not happensenderAddress for decisions, sender for display — sender joins the display name and the address into one string, and the display name is chosen by the sender. messages, search, and get all return senderAddress/senderName separately (get adds replyToAddress/replyToName); route, filter, and match on the addressapple-pim action status when encountering errorsapple-pim action authorize to request access for notDetermined domainsdenied domainsSupport flexible input:
2024-01-15T14:30:00localStart/localEndlocalStart/localEnd, never by startDate/endDate. Past a
cutoff in the day the two name a different calendar day, and grouping by the UTC field
shifts those events one day forward — the most common way a calendar answer goes wrong
while looking entirely reasonablestartDate agree on the daylocalStart = 2026-03-31 7:00 PM <- the day this event belongs to
startDate = 2026-04-01T02:00:00Z <- same moment, next calendar day
An availability answer built on startDate calls March 31 free and April 1 busy. Both are
wrong, and nothing in the output looks offstart/startDate via fields auto-includes localStart for this reason.
Do not strip it back outCNContact.predicateForContacts(matchingName:)CNContact.predicateForContacts(withIdentifiers:)eventStore.predicateForEvents(withStart:end:calendars:)apple-pim with action status to check all domains at onceapple-pim with action authorize to trigger permission promptsavailability stays notSupported without Full Disk Access; after granting it to the helper, restart the MCP server or gatewayapple-pim with action config_show to verify the active config. Check if an unexpected profile is being applied via APPLE_PIM_PROFILE env var.apple-pim with action config_init to see all available calendars/lists from macOS, then compare with action config_show to see what's being filtered.--profile flag > APPLE_PIM_PROFILE env var > base config. Profile files must be at ~/.config/apple-pim/profiles/{name}.json.config.json has invalid JSON, CLIs fall back to default behavior (all domains enabled, no filtering). Use apple-pim with action config_show to verify — it reports the config path and whether it was loaded successfully.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
eventkit, contacts-framework, jxa, applescript, macos-automation, tcc-permissions
npx claudepluginhub omarshahine/apple-pim --plugin apple-pimOther plugins' skills for the same job