360 Secure SkillHub
360 安全技能中心

Apple Contacts

仅适用于 macOS:调用 osascript 执行 AppleScript 脚本访问系统通讯录,支持列出全部联系人、按姓名搜索(不区分大小写、支持部分匹配)以及获取某人的电话、邮箱、生日和备注等详情;首次运行需授予通讯录访问权限。

neriros
neriros
热度 84.72
最近更新 2026-05-11 17:33:02
分类:搜索依赖:代码执行 / 读写文件

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add macos-contacts
Metadata
name
macos-contacts
description
Access and search Apple Contacts on macOS using AppleScript. Use when the user asks to look up a contact, find a phone number or email, search contacts by name, or get details about someone in their address book. macOS only.

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

# List all contacts
osascript <skill_dir>/scripts/contacts.applescript list

# Search by name (case-insensitive)
osascript <skill_dir>/scripts/contacts.applescript search "Alice"

# Get full details for a contact
osascript <skill_dir>/scripts/contacts.applescript get "Alice Smith"

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 → Name | Phone | Email
  • get: full details (all phones, emails, birthday, notes), contacts separated by ---

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")