Apple Contacts (AppleScript)
Uses osascript to query the macOS Contacts app. macOS only. Requires Contacts permission on first run — macOS will show a prompt, click Allow.
Setup
No installation required. Just ensure the skill's scripts/ directory is intact after installing.
Usage
CODEBLOCK0
Replace <skill_dir> with the absolute path to this skill's directory (use pwd inside the skill folder if unsure).
Output format
- -
list / search: one line per match → INLINECODE6 - INLINECODE7 : full details (all phones, emails, birthday, notes), contacts separated by INLINECODE8
Notes
- - First run may trigger a macOS Contacts permission dialog — user must click Allow
- If no contacts found, returns a descriptive message instead of empty output
- Script supports partial name matching (e.g. "Ali" matches "Alice Smith")
Apple Contacts (AppleScript)
使用 osascript 查询 macOS 通讯录应用。仅限 macOS。 首次运行时需要通讯录权限——macOS 会弹出提示,请点击允许。
设置
无需安装。只需确保技能安装后 scripts/ 目录完整即可。
使用方法
bash
列出所有联系人
osascript
/scripts/contacts.applescript list
按姓名搜索(不区分大小写)
osascript /scripts/contacts.applescript search Alice
获取联系人完整详情
osascript /scripts/contacts.applescript get Alice Smith
将 替换为此技能目录的绝对路径(如果不确定,可在技能文件夹内使用 pwd 命令)。
输出格式
- - list / search:每行一个匹配结果 → 姓名 | 电话 | 邮箱
- get:完整详情(所有电话、邮箱、生日、备注),联系人之间用 --- 分隔
备注
- - 首次运行可能触发 macOS 通讯录权限对话框——用户必须点击允许
- 如果未找到联系人,将返回描述性消息而非空输出
- 脚本支持部分姓名匹配(例如,Ali 可匹配 Alice Smith)