[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78XDBBJ757BQRJFBE7VGGKS":3,"skill-same:01M78XDBBJ757BQRJFBE7VGGKS":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M78XDBBJ757BQRJFBE7VGGKS","apple-notes-performance-tuning",null,"Optimize Apple Notes automation performance for large note collections.\nTrigger: \"apple notes performance\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--apple-notes-pack--apple-notes-performance-tuning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: apple-notes-performance-tuning\ndescription: |\n  Optimize Apple Notes automation performance for large note collections.\n  Trigger: \"apple notes performance\".\nallowed-tools: Read, Write, Edit, Bash(osascript:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, macos, apple-notes, automation]\ncompatible-with: claude-code\n---\n\n# Apple Notes Performance Tuning\n\n## Overview\n\nApple Notes automation performance degrades linearly with note count because JXA loads all note objects into memory when you access a collection. A vault with 10,000+ notes can take 30+ seconds for a simple list operation. The primary bottleneck is the Apple Events bridge between your script and Notes.app — every property access (name, body, date) is a separate IPC call. This guide covers caching strategies, incremental sync, batch optimization, and architectural patterns to keep automation responsive at scale.\n\n## Performance Benchmarks\n\n| Operation | 100 notes | 1,000 notes | 10,000 notes |\n|-----------|----------|-------------|-------------|\n| List all (names only) | ~0.5s | ~3s | ~30s |\n| Search by name (`.whose()`) | ~0.3s | ~2s | ~20s |\n| Full-text search (body scan) | ~1s | ~8s | ~80s |\n| Create single note | ~0.2s | ~0.2s | ~0.2s |\n| Export all to JSON | ~1s | ~10s | ~100s |\n| Count notes only (`.length`) | ~0.1s | ~0.3s | ~1s |\n\n## Strategy 1: Minimize Property Access\n\n```javascript\n\u002F\u002F BAD: Each property access is a separate Apple Event IPC call\nconst Notes = Application(\"Notes\");\nconst allNotes = Notes.defaultAccount.notes();\nallNotes.forEach(n => {\n  console.log(n.name());   \u002F\u002F IPC call 1\n  console.log(n.body());   \u002F\u002F IPC call 2\n  console.log(n.modificationDate()); \u002F\u002F IPC call 3\n});\n\u002F\u002F With 1000 notes = 3000 IPC calls\n\n\u002F\u002F GOOD: Batch extract in a single JXA evaluation\nconst data = Notes.defaultAccount.notes().map(n => ({\n  title: n.name(),\n  modified: n.modificationDate().toISOString(),\n}));\n\u002F\u002F Single JXA evaluation, much faster for bulk reads\n```\n\n## Strategy 2: Local SQLite Cache\n\n```bash\n#!\u002Fbin\u002Fbash\n# Export notes to SQLite for fast local queries\nDB=\"$HOME\u002F.notes-cache.db\"\nsqlite3 \"$DB\" \"CREATE TABLE IF NOT EXISTS notes (\n  id TEXT PRIMARY KEY, title TEXT, body TEXT, folder TEXT,\n  created TEXT, modified TEXT, indexed_at TEXT\n);\"\n\nosascript -l JavaScript -e '\n  const Notes = Application(\"Notes\");\n  Notes.defaultAccount.notes().map(n => JSON.stringify({\n    id: n.id(), title: n.name(), body: n.plaintext(),\n    folder: n.container().name(),\n    created: n.creationDate().toISOString(),\n    modified: n.modificationDate().toISOString()\n  })).join(\"\\n\");\n' | while IFS= read -r line; do\n  echo \"$line\" | jq -r '[.id, .title, .body, .folder, .created, .modified, now | todate] | @csv' \\\n    | sqlite3 \"$DB\" \".import \u002Fdev\u002Fstdin notes\"\ndone 2>\u002Fdev\u002Fnull\n\n# Now query locally (instant)\nsqlite3 \"$DB\" \"SELECT title FROM notes WHERE body LIKE '%project%' ORDER BY modified DESC LIMIT 10;\"\n```\n\n## Strategy 3: Incremental Sync\n\n```typescript\n\u002F\u002F src\u002Fsync\u002Fincremental.ts\nimport { execSync } from \"child_process\";\nimport { readFileSync, writeFileSync } from \"fs\";\n\nconst LAST_SYNC_FILE = \".notes-last-sync\";\n\nfunction getLastSync(): Date {\n  try { return new Date(readFileSync(LAST_SYNC_FILE, \"utf8\").trim()); }\n  catch { return new Date(0); } \u002F\u002F First run: sync everything\n}\n\nfunction incrementalSync(): void {\n  const lastSync = getLastSync();\n  const allNotes = JSON.parse(execSync(\n    `osascript -l JavaScript -e 'JSON.stringify(Application(\"Notes\").defaultAccount.notes().map(n => ({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})))'`,\n    { encoding: \"utf8\" }\n  ));\n\n  const changed = allNotes.filter((n: any) => new Date(n.modified) > lastSync);\n  console.log(`${changed.length} notes modified since ${lastSync.toISOString()}`);\n\n  \u002F\u002F Process only changed notes (fetch full body only for these)\n  for (const note of changed) {\n    console.log(`Syncing: ${note.title}`);\n    \u002F\u002F ... process individual note\n  }\n\n  writeFileSync(LAST_SYNC_FILE, new Date().toISOString());\n}\n```\n\n## Strategy 4: Use `.whose()` for Filtered Queries\n\n```javascript\n\u002F\u002F .whose() pushes filtering to Notes.app (faster than client-side filter)\nconst Notes = Application(\"Notes\");\n\n\u002F\u002F Faster than loading all notes and filtering in JS\nconst recentNotes = Notes.defaultAccount.notes.whose({\n  _match: [ObjectSpecifier().modificationDate, \">\", new Date(Date.now() - 86400000)]\n});\n\n\u002F\u002F Search by name (case-insensitive)\nconst matches = Notes.defaultAccount.notes.whose({\n  name: { _contains: \"project\" }\n});\n```\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Script hangs for >60s | Too many notes with body() access | Use `.length` first to assess scale; use cache for large vaults |\n| Memory spike during export | All note bodies loaded into JXA runtime | Process in batches; stream to file instead of building array |\n| SQLite cache stale | Forgot to re-sync after edits | Run incremental sync on schedule via launchd |\n| `.whose()` returns wrong results | Complex predicates not supported in JXA | Fall back to full load + JS filter for complex queries |\n| iCloud sync slows writes | Each write triggers sync | Batch writes with 1s delay; use \"On My Mac\" for bulk import |\n\n## Resources\n\n- [JXA Performance Tips](https:\u002F\u002Fgithub.com\u002FJXA-Cookbook\u002FJXA-Cookbook\u002Fwiki\u002FOptimizing-JXA)\n- [Mac Automation Scripting Guide](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Farchive\u002Fdocumentation\u002FLanguagesUtilities\u002FConceptual\u002FMacAutomationScriptingGuide\u002F)\n- [SQLite Full-Text Search](https:\u002F\u002Fwww.sqlite.org\u002Ffts5.html)\n\n## Next Steps\n\nFor handling rate limits during bulk operations, see `apple-notes-rate-limits`. For monitoring performance trends, see `apple-notes-observability`.\n","# Apple Notes Performance Tuning\n\n## Overview\n\nApple Notes automation performance degrades linearly with note count because JXA loads all note objects into memory when you access a collection. A vault with 10,000+ notes can take 30+ seconds for a simple list operation. The primary bottleneck is the Apple Events bridge between your script and Notes.app — every property access (name, body, date) is a separate IPC call. This guide covers caching strategies, incremental sync, batch optimization, and architectural patterns to keep automation responsive at scale.\n\n## Performance Benchmarks\n\n| Operation | 100 notes | 1,000 notes | 10,000 notes |\n|-----------|----------|-------------|-------------|\n| List all (names only) | ~0.5s | ~3s | ~30s |\n| Search by name (`.whose()`) | ~0.3s | ~2s | ~20s |\n| Full-text search (body scan) | ~1s | ~8s | ~80s |\n| Create single note | ~0.2s | ~0.2s | ~0.2s |\n| Export all to JSON | ~1s | ~10s | ~100s |\n| Count notes only (`.length`) | ~0.1s | ~0.3s | ~1s |\n\n## Strategy 1: Minimize Property Access\n\n```javascript\n\u002F\u002F BAD: Each property access is a separate Apple Event IPC call\nconst Notes = Application(\"Notes\");\nconst allNotes = Notes.defaultAccount.notes();\nallNotes.forEach(n => {\n  console.log(n.name());   \u002F\u002F IPC call 1\n  console.log(n.body());   \u002F\u002F IPC call 2\n  console.log(n.modificationDate()); \u002F\u002F IPC call 3\n});\n\u002F\u002F With 1000 notes = 3000 IPC calls\n\n\u002F\u002F GOOD: Batch extract in a single JXA evaluation\nconst data = Notes.defaultAccount.notes().map(n => ({\n  title: n.name(),\n  modified: n.modificationDate().toISOString(),\n}));\n\u002F\u002F Single JXA evaluation, much faster for bulk reads\n```\n\n## Strategy 2: Local SQLite Cache\n\n```bash\n#!\u002Fbin\u002Fbash\n# Export notes to SQLite for fast local queries\nDB=\"$HOME\u002F.notes-cache.db\"\nsqlite3 \"$DB\" \"CREATE TABLE IF NOT EXISTS notes (\n  id TEXT PRIMARY KEY, title TEXT, body TEXT, folder TEXT,\n  created TEXT, modified TEXT, indexed_at TEXT\n);\"\n\nosascript -l JavaScript -e '\n  const Notes = Application(\"Notes\");\n  Notes.defaultAccount.notes().map(n => JSON.stringify({\n    id: n.id(), title: n.name(), body: n.plaintext(),\n    folder: n.container().name(),\n    created: n.creationDate().toISOString(),\n    modified: n.modificationDate().toISOString()\n  })).join(\"\\n\");\n' | while IFS= read -r line; do\n  echo \"$line\" | jq -r '[.id, .title, .body, .folder, .created, .modified, now | todate] | @csv' \\\n    | sqlite3 \"$DB\" \".import \u002Fdev\u002Fstdin notes\"\ndone 2>\u002Fdev\u002Fnull\n\n# Now query locally (instant)\nsqlite3 \"$DB\" \"SELECT title FROM notes WHERE body LIKE '%project%' ORDER BY modified DESC LIMIT 10;\"\n```\n\n## Strategy 3: Incremental Sync\n\n```typescript\n\u002F\u002F src\u002Fsync\u002Fincremental.ts\nimport { execSync } from \"child_process\";\nimport { readFileSync, writeFileSync } from \"fs\";\n\nconst LAST_SYNC_FILE = \".notes-last-sync\";\n\nfunction getLastSync(): Date {\n  try { return new Date(readFileSync(LAST_SYNC_FILE, \"utf8\").trim()); }\n  catch { return new Date(0); } \u002F\u002F First run: sync everything\n}\n\nfunction incrementalSync(): void {\n  const lastSync = getLastSync();\n  const allNotes = JSON.parse(execSync(\n    `osascript -l JavaScript -e 'JSON.stringify(Application(\"Notes\").defaultAccount.notes().map(n => ({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})))'`,\n    { encoding: \"utf8\" }\n  ));\n\n  const changed = allNotes.filter((n: any) => new Date(n.modified) > lastSync);\n  console.log(`${changed.length} notes modified since ${lastSync.toISOString()}`);\n\n  \u002F\u002F Process only changed notes (fetch full body only for these)\n  for (const note of changed) {\n    console.log(`Syncing: ${note.title}`);\n    \u002F\u002F ... process individual note\n  }\n\n  writeFileSync(LAST_SYNC_FILE, new Date().toISOString());\n}\n```\n\n## Strategy 4: Use `.whose()` for Filtered Queries\n\n```javascript\n\u002F\u002F .whose() pushes filtering to Notes.app (faster than client-side filter)\nconst Notes = Application(\"Notes\");\n\n\u002F\u002F Faster than loading all notes and filtering in JS\nconst recentNotes = Notes.defaultAccount.notes.whose({\n  _match: [ObjectSpecifier().modificationDate, \">\", new Date(Date.now() - 86400000)]\n});\n\n\u002F\u002F Search by name (case-insensitive)\nconst matches = Notes.defaultAccount.notes.whose({\n  name: { _contains: \"project\" }\n});\n```\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Script hangs for >60s | Too many notes with body() access | Use `.length` first to assess scale; use cache for large vaults |\n| Memory spike during export | All note bodies loaded into JXA runtime | Process in batches; stream to file instead of building array |\n| SQLite cache stale | Forgot to re-sync after edits | Run incremental sync on schedule via launchd |\n| `.whose()` returns wrong results | Complex predicates not supported in JXA | Fall back to full load + JS filter for complex queries |\n| iCloud sync slows writes | Each write triggers sync | Batch writes with 1s delay; use \"On My Mac\" for bulk import |\n\n## Resources\n\n- [JXA Performance Tips](https:\u002F\u002Fgithub.com\u002FJXA-Cookbook\u002FJXA-Cookbook\u002Fwiki\u002FOptimizing-JXA)\n- [Mac Automation Scripting Guide](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Farchive\u002Fdocumentation\u002FLanguagesUtilities\u002FConceptual\u002FMacAutomationScriptingGuide\u002F)\n- [SQLite Full-Text Search](https:\u002F\u002Fwww.sqlite.org\u002Ffts5.html)\n\n## Next Steps\n\nFor handling rate limits during bulk operations, see `apple-notes-rate-limits`. For monitoring performance trends, see `apple-notes-observability`.\n",{"name":5,"tags":24,"author":29,"license":15,"version":30,"description":31,"allowed-tools":32,"compatible-with":33},[25,26,27,28],"saas","macos","apple-notes","automation","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Apple Notes automation performance for large note collections.\nTrigger: \"apple notes performance\".\n","Read, Write, Edit, Bash(osascript:*), Grep","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--apple-notes-pack--apple-notes-performance-tuning",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill apple-notes-performance-tuning",{"tool":49,"command":50},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill apple-notes-performance-tuning",{"tool":52,"command":53},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill apple-notes-performance-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--apple-notes-pack--apple-notes-performance-tuning\u002FSKILL.md",true,[],[58,65,72,79,86,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]