技能图谱SKILLSGROVE
技能图谱/效率工具/Stellven/AI4Research/office-notes

office-notes

安装

$npx skills add https://github.com/Stellven/AI4Research --skill office-notes
$git clone --depth 1 https://github.com/Stellven/AI4Research.git /tmp/AI4Research && mkdir -p ~/.claude/skills && cp -r /tmp/AI4Research/skills/office-notes ~/.claude/skills/office-notes
请帮我安装这个 Agent Skill:https://github.com/Stellven/AI4Research/tree/b0bf165f9ab073aae23e45b3b2796973e5677eea/skills/office-notes ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MIT管理 Apple Notes - 创建、搜索、列出笔记 (macOS)
以下 SKILL.md 内容转载自 Stellven/AI4Research(提交 b0bf165),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 Sihao Li 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

Apple Notes 管理

通过 AppleScript 管理 Apple Notes (macOS)。

前提条件

  • macOS
  • 授予终端 Automation 权限 (系统设置 → 隐私与安全 → 自动化)

操作

列出笔记文件夹

osascript -e 'tell application "Notes" to get name of every folder'

列出笔记 (默认文件夹)

osascript -e 'tell application "Notes" to get name of every note in folder "Notes"'

搜索笔记

osascript -e 'tell application "Notes"
  set matchingNotes to every note whose name contains "关键词"
  repeat with n in matchingNotes
    log (name of n) & " | " & (id of n)
  end repeat
end tell'

创建笔记

osascript -e 'tell application "Notes"
  make new note at folder "Notes" with properties {name:"标题", body:"内容"}
end tell'

读取笔记内容

osascript -e 'tell application "Notes"
  set theNote to first note whose name is "笔记标题"
  get body of theNote
end tell'

追加内容到笔记

osascript -e 'tell application "Notes"
  set theNote to first note whose name is "笔记标题"
  set body of theNote to (body of theNote) & "<br>追加内容"
end tell'

注意事项

  • 笔记内容使用 HTML 格式
  • 换行使用 <br>
  • 操作需要 Notes 应用在后台运行
  • 首次使用会弹出权限请求
查看许可证全文(MIT)
MIT License

Copyright (c) 2026 Sihao Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.