Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add omarshahine/apple-pim/plugin install apple-pimWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/omarshahine/apple-pim/doctor)<a href="https://agentmods.dev/commands/omarshahine/apple-pim/doctor"><img src="https://agentmods.dev/badge/commands/omarshahine/apple-pim/doctor.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.00891 |
| Opus 5 | $0.00010 | $0.00445 |
| Sonnet 5 | $0.00004 | $0.00178 |
| Haiku 4.5 | $0.00002 | $0.00089 |
Grade A, and why
doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Apple PIM Doctor
Run the end-to-end install diagnostic and interpret the results for the user.
Run it
bash "${CLAUDE_PLUGIN_ROOT}/scripts/doctor.sh"
With --fix (only when the user asked to fix, or after showing them a stuck-helper failure):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/doctor.sh" --fix
What it checks, in dependency order
- Swift CLI binaries in
~/.local/bin— flags broken symlinks (the classic post-repo-rename failure), missing binaries, and non-executable files. A symlinked install gets a dev-mode warning: it breaks if the source repo is moved, renamed, or cleaned. - PATH visibility of
~/.local/bin. - Apple PIM Helper.app — presence, dispatcher executability, code signature.
(Installs made before the rename are named
PIMHelper.app; the doctor reports them and tells you to re-run the installer, which renames in place.) The signature matters: macOS TCC binds permission grants to it. - Stuck helper processes — a wedged
pim-helper(usually an unanswered permission dialog) blocks every later call with Launch Services error -1712.--fixreaps these. - TCC authorization per domain, prompt-free, on both routes. The direct
route is what a normal terminal gets. The helper route is what an agent
shell gets, and it carries its own grant, bound to the helper's bundle and
signature. Each domain prints one line per route.
auth-statusonly reads the authorization status and never requests access, so probing through the helper cannot raise a dialog. The helper-route probe is skipped, with a warning, while a helper is already resident — only one can run at a time. - MCP server artifacts —
dist/server.jsand node_modules.
Interpreting results for the user
- Exit 0 = healthy; summarize any warnings briefly.
- Broken symlink → the source repo moved or was renamed. Remedy: rebuild
and reinstall as copies (
setup.sh --installfrom the repo), which is immune to future renames. - Stuck helper → offer
--fix, then have the user retry their original request. - notDetermined on the direct route, helper installed → normal in an agent shell, and not a verdict on its own. Read the helper-route line under it.
- notDetermined + no helper → run
scripts/build-helper-app.sh, then the next Calendar/Reminders/Contacts call raises the macOS dialog; tell the user to answer it (they have ~2 minutes). - helper route not granted (failure) → calls from an agent shell will block on a dialog nobody sees for up to 2 minutes, then wedge the helper. The usual cause is a helper rebuild, which re-signs the bundle and drops every grant. Have the user make a real Calendar / Reminders / Contacts call from a normal terminal and answer the prompt.
- helper route not yet granted (warning) → the same missing grant, but the direct route works here, so nothing is broken until something calls from an embedded shell.
- helper route denied → the grant exists and is switched off. System Settings > Privacy & Security > the matching section, enable Apple PIM Helper.
- helper probe inconclusive → the probe could not reach the helper: one was
already resident, the launch failed, or it returned nothing. Check the
Helper processes section, clear a stuck instance with
--fix, re-run. - After any fix, verify by calling a real tool (e.g. reminder lists), not just by re-running doctor.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago Changed · +2 lines 14a40f525827
- 7d ago First seen · 73 lines · 20 tokens per session scan A 86e24b823855
doctor is a command published in the GitHub repository omarshahine/apple-pim (51 stars, last pushed 3d ago), licensed MIT. It adds 20 tokens to every session and 891 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
check-tcc
Print che-ical-mcp's current TCC permission state, binary path, and ready-to-paste reset / re-prompt commands. Use when user says "check TCC", "permission status", "tccutil"。.
quick-event
Quickly create a calendar event from natural language when the time and place are already known and stated directly. For deriving an event from a source — a meeting notice, an announcement, a message thread — where the time may have been corrected and the basis should be recorded, use the archive-event skill instead.
remind
Create a reminder from natural language.
week
Show this week's calendar overview.
today
Show today's calendar events and pending reminders.
perf-profile.template
This prompt was authored for Claude-style slash workflows. In Codex runtime, adapt tool calls as follows.