360 Secure SkillHub
360 安全技能中心

Apple Contacts

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

分类:搜索
neriros
neriros
热度 41.45
最近更新 2026-05-11 17:33:02

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add neriros/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")