微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📝

原生操控 Apple 备忘录,本地安全记笔记

macOS Notes · v1.0.0
办公 安全 A 级 作者 lucaperret 公开目录收录
1.3k 下载 0 安装 5.6k 收藏 20 浏览

简介

通过 AppleScript 原生操控 macOS 备忘录,支持创建、搜索、读取笔记,无需第三方 API,数据完全本地存储。

原始描述

Create, read, search, and manage macOS Notes via AppleScript. Use when the user asks to take a note, jot something down, save an idea, create meeting notes,...

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/macos-notes/
其它 Agent解压到它自己的 skills 目录,目录名用 macos-notes

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

中文使用说明 来自收录源

核心用法

macos-notes 是一款专为 macOS 设计的 Apple Notes 管理 Skill,通过 AppleScript 与系统原生备忘录应用深度集成。用户可通过自然语言指令完成笔记的全生命周期管理:快速记录灵感("记下这个 API 格式")、创建结构化会议笔记、按关键词搜索历史内容、读取特定标题的笔记详情,以及浏览最近笔记列表。所有操作均通过 notes.sh 脚本执行,支持 JSON 标准输入和纯文本/ HTML 内容格式,自动处理账户与文件夹的层级关系。

使用时需注意关键流程:涉及账户或文件夹选择时,必须先执行 list-folders 获取可用账户列表,避免跨账户的文件夹命名冲突;创建笔记时纯文本内容会自动转换为 HTML 存储,而指定 html 字段可保留富格式;读取功能依赖精确标题匹配,不支持模糊搜索。

显著优点

原生生态无缝衔接:直接调用 Apple Notes 应用,笔记数据完全存储于用户 iCloud 或本地账户,与 iPhone、iPad 实时同步,无需第三方云服务中转。

零外部网络依赖:所有操作均为本地系统调用(osascript/python3),无 API 密钥、无服务器通信,从根本上杜绝数据泄露和网络攻击风险。

安全设计周全:自动跳过密码保护笔记,输入严格校验(100KB 长度限制、类型检查),JSON 通过 stdin 传递避免命令行泄露,日志仅记录操作元数据而不含正文内容。

轻量化无依赖:除系统自带工具外零第三方依赖,供应链攻击面极小,MIT 开源许可保障代码可审计。

潜在缺点与局限性

平台独占性:仅限 macOS 系统,Windows/Linux 用户无法使用;需 Notes.app 处于可用状态,若应用被卸载或损坏则 Skill 失效。

功能边界严格:无法读取/修改密码保护笔记(安全特性但构成限制);不支持富文本编辑器的完整功能(如手写、扫描件、复杂排版);搜索仅支持标题匹配,不支持全文内容检索。

交互模式局限:依赖精确标题进行读取操作,用户必须准确记忆笔记命名;批量操作能力有限,缺乏标签系统、智能分类等高级管理功能。

无协作能力:仅操作个人本地笔记,不支持共享笔记的权限管理或多人协作编辑。

适合的目标群体

  • Apple 生态深度用户:已全面使用 iCloud Notes 进行跨设备同步,希望在 AI Agent 中无缝调用笔记数据
  • 效率工具整合者:需要将会议纪要、灵感碎片、待办事项自动归档至 Notes,构建统一的个人知识库
  • 隐私敏感型用户:拒绝云端第三方笔记服务,要求数据完全本地化处理与存储
  • 轻量级笔记管理者:不需要 Notion/Obsidian 的复杂功能,满足于原生备忘录的简洁体验

使用风险

本地敏感数据暴露:Skill 具备读取所有非加密笔记的权限,若 Agent 提示词被恶意构造,可能导致隐私笔记内容被诱导输出。建议为敏感主题笔记启用原生密码保护。

日志残留风险:操作日志记录笔记标题(可能包含敏感关键词),长期使用后日志文件可能积累可分析的隐私模式,需定期手动清理 logs/notes.log。

误操作覆盖:create-note 若使用已存在的标题,Notes.app 默认行为可能创建重复条目或产生混淆,建议建立命名规范(如带日期前缀)。

AppleScript 性能瓶颈:大规模笔记操作(如批量导入)可能受 Apple Events 性能限制,出现响应延迟;极端情况下 Notes.app 无响应会导致 Skill 阻塞。

账户配置依赖:若用户更改 iCloud 账户、关闭 Notes 同步或修改文件夹结构,Skill 的默认账户/文件夹假设可能失效,需重新执行 list-folders 适配。

技能正文


name: macos-notes description: Create, read, search, and manage macOS Notes via AppleScript. Use when the user asks to take a note, jot something down, save an idea, create meeting notes, read a note, search notes, or anything involving Apple Notes on macOS. Triggers on requests like "note this down", "save this as a note", "create a note about X", "show my notes", "search my notes for X", "what did I write about X". macOS only. license: MIT compatibility: Requires macOS with Notes.app. Uses osascript (AppleScript) and python3 for JSON parsing. metadata: author: lucaperret version: "1.0.0" openclaw: os: macos emoji: "\U0001F4DD" homepage: https://github.com/lucaperret/agent-skills requires: bins: - osascript - python3

macOS Notes

Manage Apple Notes via $SKILL_DIR/scripts/notes.sh. Notes content is stored as HTML internally; the script accepts plain text or HTML body and returns plaintext when reading.

Quick start

List folders

Always list folders first to discover accounts and folder names:

"$SKILL_DIR/scripts/notes.sh" list-folders

Output format: account → folder (one per line).

Create a note

echo '<json>' | "$SKILL_DIR/scripts/notes.sh" create-note

JSON fields:

Field Required Default Description
title yes - Note title (becomes the first line / heading)
body no "" Note content (plain text — converted to HTML automatically)
html no "" Raw HTML body (overrides body if both provided)
folder no default folder Folder name (from list-folders)
account no default account Account name (from list-folders)

Read a note

echo '<json>' | "$SKILL_DIR/scripts/notes.sh" read-note

JSON fields:

Field Required Default Description
name yes - Note title (exact match)
folder no all folders Folder to search in
account no default account Account to search in

List notes

echo '<json>' | "$SKILL_DIR/scripts/notes.sh" list-notes

JSON fields:

Field Required Default Description
folder no default folder Folder name
account no default account Account name
limit no 20 Max notes to return

Search notes

echo '<json>' | "$SKILL_DIR/scripts/notes.sh" search-notes

JSON fields:

Field Required Default Description
query yes - Text to search for in note titles
account no default account Account to search in
limit no 10 Max results to return

Interpreting natural language

Map user requests to commands:

User says Command Key fields
"Note this down: ..." create-note title, body
"Save meeting notes" create-note title: "Meeting notes — <date>", body
"What did I write about X?" search-notes query: "X"
"Show my notes" list-notes (defaults)
"Read my note about X" read-note name: "X"
"Save this in my work notes" create-note Match closest account/folder from list-folders

Example prompts

"Note down the API key format: prefix_xxxx"

echo '{"title":"API key format","body":"Format: prefix_xxxx"}' | "$SKILL_DIR/scripts/notes.sh" create-note

"Show my recent notes"

echo '{}' | "$SKILL_DIR/scripts/notes.sh" list-notes

"What did I write about passwords?"

echo '{"query":"password"}' | "$SKILL_DIR/scripts/notes.sh" search-notes

"Read my note about Hinge"

echo '{"name":"Hinge"}' | "$SKILL_DIR/scripts/notes.sh" read-note

"Create a meeting summary in my iCloud notes"

"$SKILL_DIR/scripts/notes.sh" list-folders

Then:

echo '{"title":"Meeting summary — 2026-02-17","body":"Discussed roadmap.\n- Q1: launch MVP\n- Q2: iterate","account":"iCloud","folder":"Notes"}' | "$SKILL_DIR/scripts/notes.sh" create-note

Critical rules

  1. Always list folders first if the user hasn't specified an account/folder — folder names are reused across accounts
  2. Specify both account and folder when targeting a specific location — folder: "Notes" alone is ambiguous
  3. Password-protected notes are skipped — the script cannot read or modify them
  4. Pass JSON via stdin — never as a CLI argument (avoids leaking data in process list)
  5. All fields are validated by the script (type coercion, range checks) — invalid input is rejected with an error
  6. All actions are logged to logs/notes.log with timestamp, command, and note title
  7. Body uses plain text — newlines in body are converted to <br> automatically; use html for rich formatting
  8. Note title = first line — Notes.app treats the first line of the body as the note name

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

macosnotesapplescriptautomationproductivitylocal-firstprivacy

同类 Skill