From apple-notes-pack
Sets up macOS permissions for Apple Notes automation with AppleScript, JXA, osascript, and Shortcuts. Includes access tests, CLI wrapper script, and Shortcuts verification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apple-notes-pack:apple-notes-install-authThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apple Notes has no REST API. Automation uses macOS scripting technologies: AppleScript, JavaScript for Automation (JXA), Shortcuts, and the `osascript` command-line tool. No SDK to install — but you need macOS accessibility permissions.
Apple Notes has no REST API. Automation uses macOS scripting technologies: AppleScript, JavaScript for Automation (JXA), Shortcuts, and the osascript command-line tool. No SDK to install — but you need macOS accessibility permissions.
# macOS requires explicit permission for scripts to control Notes.app
# The first time you run an osascript command targeting Notes, macOS will prompt.
# You can also pre-grant in: System Preferences > Privacy & Security > Automation
# Test basic Notes access (will trigger permission prompt)
osascript -e 'tell application "Notes" to get name of every note in default account'
# JXA is the modern alternative to AppleScript
# Run JavaScript via osascript with -l JavaScript flag
osascript -l JavaScript -e '
const Notes = Application("Notes");
Notes.includeStandardAdditions = true;
const noteCount = Notes.defaultAccount.notes.length;
`Apple Notes accessible: ${noteCount} notes found`;
'
#!/bin/bash
# scripts/notes-cli.sh — Wrapper for common Apple Notes operations
case "$1" in
count)
osascript -l JavaScript -e '
const Notes = Application("Notes");
Notes.defaultAccount.notes.length;
'
;;
list)
osascript -l JavaScript -e '
const Notes = Application("Notes");
const notes = Notes.defaultAccount.notes();
notes.slice(0, 20).map(n => `${n.id()} | ${n.name()}`).join("\n");
'
;;
folders)
osascript -l JavaScript -e '
const Notes = Application("Notes");
Notes.defaultAccount.folders().map(f => f.name()).join("\n");
'
;;
*)
echo "Usage: notes-cli.sh {count|list|folders}"
;;
esac
# Apple Shortcuts can also interact with Notes
# Check available shortcuts
shortcuts list | grep -i note
# Run a shortcut that creates a note
shortcuts run "Create Note" --input-path /dev/stdin <<< "Test content"
| Technology | Language | Best For | Docs |
|---|---|---|---|
| AppleScript | AppleScript | Simple operations | Apple Scripting Guide |
| JXA | JavaScript | Complex logic, JSON handling | Apple JXA Reference |
| osascript | CLI wrapper | Scripts, CI/CD | man osascript |
| Shortcuts | Visual | Non-developer workflows | Shortcuts app |
| PyXA | Python | Python automation | pyxa.dev |
| Error | Cause | Solution |
|---|---|---|
Not authorized to send Apple events | Missing automation permission | Grant in System Preferences > Privacy > Automation |
Notes got an error: AppleEvent timed out | Notes.app not running | Launch Notes first or add activate |
-1743 errAEAppNotAllowed | Denied by TCC | Reset TCC: tccutil reset AppleEvents |
execution error: Notes is not running | Notes.app closed | Add tell app "Notes" to activate |
Proceed to apple-notes-hello-world for your first note creation.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin apple-notes-packAutomates Apple Notes on macOS: create, read, list, search, and delete using JXA and AppleScript via osascript. For learning scripting or testing note access.
Automates macOS apps via Apple Events using AppleScript (discovery), JXA (legacy), and PyXA (modern Python). Use when asked to "automate Mac apps", "write AppleScript", "JXA scripting", "osascript automation", or "PyXA Python automation". Foundation skill for all macOS app automation.
Manages Apple Notes on macOS: create, search, read, update, delete and organize notes and folders via natural language commands.