From apple-notes-pack
Monitors Apple Notes changes on macOS via file system events, Shortcuts triggers, or JXA polling with osascript. Trigger: 'apple notes events'. Useful for automation lacking native webhooks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apple-notes-pack:apple-notes-webhooks-eventsThis 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 webhook API. Monitor changes using: (1) File system watching on the Notes database, (2) Apple Shortcuts automation triggers, or (3) Periodic polling via JXA.
Apple Notes has no webhook API. Monitor changes using: (1) File system watching on the Notes database, (2) Apple Shortcuts automation triggers, or (3) Periodic polling via JXA.
// src/events/notes-watcher.ts
import { execSync } from "child_process";
interface NoteSnapshot { id: string; title: string; modified: string; }
let lastSnapshot: Map<string, string> = new Map();
function detectChanges(): { added: string[]; modified: string[]; deleted: string[] } {
const current = JSON.parse(execSync(
`osascript -l JavaScript -e 'JSON.stringify(Application("Notes").defaultAccount.notes().map(n => ({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})))'`,
{ encoding: "utf8" }
)) as NoteSnapshot[];
const currentMap = new Map(current.map(n => [n.id, n.modified]));
const added = current.filter(n => !lastSnapshot.has(n.id)).map(n => n.title);
const modified = current.filter(n => lastSnapshot.has(n.id) && lastSnapshot.get(n.id) !== n.modified).map(n => n.title);
const deleted = [...lastSnapshot.keys()].filter(id => !currentMap.has(id));
lastSnapshot = currentMap;
return { added, modified, deleted };
}
// Poll every 60 seconds
setInterval(() => {
const changes = detectChanges();
if (changes.added.length || changes.modified.length || changes.deleted.length) {
console.log("Changes detected:", changes);
}
}, 60000);
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.
Manages Apple Notes on macOS: create, search, read, update, delete and organize notes and folders via natural language commands.
Automates Apple Notes via JXA. Use when asked to "create notes programmatically", "automate Notes app", "JXA notes scripting", or "organize notes with automation". Covers accounts/folders/notes, HTML bodies, queries, moves, and Objective-C/UI fallbacks for Notes.app automation on macOS.