Agent skill

Apple Notes Performance Tuning

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Optimize Apple Notes automation performance for large note collections.

MITAuto-check passedBackend & APIs

Install Apple Notes Performance Tuning

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-performance-tuning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apple-notes-performance-tuning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/apple-notes-performance-tuning .claude/skills/apple-notes-performance-tuning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apple-notes-performance-tuning
GitHub stars
2.8k
Token cost
~1.8k tokens
SKILL.md length
468 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize Apple Notes automation performance for large note collections.

  • Works in 4 steps: Measure a bounded read-only workload… → Minimize fields and property calls;… → Keep cache updates idempotent,… → …
  • Backend & APIs work in your project
  • SKILL.md covers Overview, Prerequisites, Instructions and Performance Benchmarks, plus 9 more sections
  • Calls sqlite3, osascript and jq

What it does

Apple Notes Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Apple Notes automation performance for large note collections. Trigger: "apple notes performance".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in Backend & APIs. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “apple notes performance”
  • “/apple-notes-performance-tuning”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(osascript:*), Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Measure a bounded read-only workload before changing timeouts, concurrency, or poll intervals.
  2. Minimize fields and property calls; never cache a body when an opaque identifier or timestamp is sufficient.
  3. Keep cache updates idempotent, encrypted, and scoped; reconcile change cursors before writing a new cursor.
  4. Roll back a tuning change if latency, sync behavior, or data-reconciliation evidence regresses.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(osascript:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sqlite3
    • osascript
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • developer.apple.com
    • sqlite.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Apple Notes Performance Tuning loads about 1.8k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 468 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 468 words, ~1,778 tokens.

Download SKILL.mdSave it as .claude/skills/apple-notes-performance-tuning/SKILL.md (or your agent's skills folder).
name
apple-notes-performance-tuning
description
Optimize Apple Notes automation performance for large note collections. Trigger: "apple notes performance".
allowed-tools
Read, Write, Edit, Bash(osascript:*), Grep
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, macos, apple-notes, automation

Apple Notes Performance Tuning

Overview

Apple 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.

Prerequisites

  • A scoped workload baseline, performance budget, and a non-production corpus for tests.
  • A private encrypted cache with retention, redaction, and explicit access controls; a cache is a duplicate of sensitive notes.
  • A feature flag and rollback plan for polling interval, cache, or batching changes.

Instructions

  1. Measure a bounded read-only workload before changing timeouts, concurrency, or poll intervals.
  2. Minimize fields and property calls; never cache a body when an opaque identifier or timestamp is sufficient.
  3. Keep cache updates idempotent, encrypted, and scoped; reconcile change cursors before writing a new cursor.
  4. Roll back a tuning change if latency, sync behavior, or data-reconciliation evidence regresses.

Performance Benchmarks

Operation100 notes1,000 notes10,000 notes
List all (names only)~0.5s~3s~30s
Search by name (.whose())~0.3s~2s~20s
Full-text search (body scan)~1s~8s~80s
Create single note~0.2s~0.2s~0.2s
Export all to JSON~1s~10s~100s
Count notes only (.length)~0.1s~0.3s~1s

Strategy 1: Minimize Property Access

javascript
// BAD: Each property access is a separate Apple Event IPC call
const Notes = Application("Notes");
const allNotes = Notes.defaultAccount.notes();
allNotes.forEach(n => {
  console.log(n.name());   // IPC call 1
  console.log(n.body());   // IPC call 2
  console.log(n.modificationDate()); // IPC call 3
});
// With 1000 notes = 3000 IPC calls

// GOOD: Batch extract in a single JXA evaluation
const data = Notes.defaultAccount.notes().map(n => ({
  title: n.name(),
  modified: n.modificationDate().toISOString(),
}));
// Single JXA evaluation, much faster for bulk reads

Strategy 2: Local SQLite Cache

bash
#!/bin/bash
# Export notes to SQLite for fast local queries
DB="$HOME/.notes-cache.db"
sqlite3 "$DB" "CREATE TABLE IF NOT EXISTS notes (
  id TEXT PRIMARY KEY, title TEXT, body TEXT, folder TEXT,
  created TEXT, modified TEXT, indexed_at TEXT
);"

osascript -l JavaScript -e '
  const Notes = Application("Notes");
  Notes.defaultAccount.notes().map(n => JSON.stringify({
    id: n.id(), title: n.name(), body: n.plaintext(),
    folder: n.container().name(),
    created: n.creationDate().toISOString(),
    modified: n.modificationDate().toISOString()
  })).join("\n");
' | while IFS= read -r line; do
  echo "$line" | jq -r '[.id, .title, .body, .folder, .created, .modified, now | todate] | @csv' \
    | sqlite3 "$DB" ".import /dev/stdin notes"
done 2>/dev/null

# Now query locally (instant)
sqlite3 "$DB" "SELECT title FROM notes WHERE body LIKE '%project%' ORDER BY modified DESC LIMIT 10;"

Strategy 3: Incremental Sync

typescript
// src/sync/incremental.ts
import { execSync } from "child_process";
import { readFileSync, writeFileSync } from "fs";

const LAST_SYNC_FILE = ".notes-last-sync";

function getLastSync(): Date {
  try { return new Date(readFileSync(LAST_SYNC_FILE, "utf8").trim()); }
  catch { return new Date(0); } // First run: sync everything
}

function incrementalSync(): void {
  const lastSync = getLastSync();
  const allNotes = 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" }
  ));

  const changed = allNotes.filter((n: any) => new Date(n.modified) > lastSync);
  console.log(`${changed.length} notes modified since ${lastSync.toISOString()}`);

  // Process only changed notes (fetch full body only for these)
  for (const note of changed) {
    console.log(`Syncing: ${note.title}`);
    // ... process individual note
  }

  writeFileSync(LAST_SYNC_FILE, new Date().toISOString());
}

Strategy 4: Use .whose() for Filtered Queries

javascript
// .whose() pushes filtering to Notes.app (faster than client-side filter)
const Notes = Application("Notes");

// Faster than loading all notes and filtering in JS
const recentNotes = Notes.defaultAccount.notes.whose({
  _match: [ObjectSpecifier().modificationDate, ">", new Date(Date.now() - 86400000)]
});

// Search by name (case-insensitive)
const matches = Notes.defaultAccount.notes.whose({
  name: { _contains: "project" }
});
Show full SKILL.md (207 more words)Show less

Error Handling

IssueCauseSolution
Script hangs for >60sToo many notes with body() accessUse .length first to assess scale; use cache for large vaults
Memory spike during exportAll note bodies loaded into JXA runtimeProcess in batches; stream to file instead of building array
SQLite cache staleForgot to re-sync after editsRun incremental sync on schedule via launchd
.whose() returns wrong resultsComplex predicates not supported in JXAFall back to full load + JS filter for complex queries
iCloud sync slows writesEach write triggers syncBatch writes with 1s delay; use "On My Mac" for bulk import

Output

Performance tuning yields a baseline, applied configuration, bounded latency result, cache data classification, and rollback result. Metrics and logs use opaque identifiers and aggregate counts; they do not expose note titles, bodies, or query terms.

Examples

For a slow search, benchmark a scoped metadata-only query in the test corpus, enable a feature-flagged cache that stores only identifiers and modification timestamps, then compare p95 latency and reconciliation correctness before rollout. Disable the flag if cursor reconciliation differs.

Resources

Next Steps

For handling rate limits during bulk operations, see apple-notes-rate-limits. For monitoring performance trends, see apple-notes-observability.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/apple-notes-performance-tuning of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Apple Notes Performance Tuning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apple Notes Performance Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apple Notes Performance Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.8kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api44k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    44k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Apple Notes Performance Tuning

What does Apple Notes Performance Tuning do?

Optimize Apple Notes automation performance for large note collections. Apple Notes Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Apple Notes automation performance for large note collections.

When should I use Apple Notes Performance Tuning?

Apple Notes Performance Tuning fits situations like: backend & APIs work in your project.

How do I install Apple Notes Performance Tuning in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-performance-tuning -a claude-code`. Or copy the skill folder (skills/.curated/apple-notes-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/apple-notes-performance-tuning in your project. Claude Code loads it when a task matches its description.

How do I install Apple Notes Performance Tuning in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-performance-tuning -a codex`. Or copy the skill folder (skills/.curated/apple-notes-performance-tuning in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/apple-notes-performance-tuning in your project. Codex loads it when a task matches its description.

Can I use Apple Notes Performance Tuning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-performance-tuning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apple-notes-performance-tuning, .gemini/skills/apple-notes-performance-tuning, .github/skills/apple-notes-performance-tuning and .opencode/skills/apple-notes-performance-tuning in your project.

What does Apple Notes Performance Tuning need to run?

Going by SKILL.md and its folder, Apple Notes Performance Tuning needs the command-line tools its instructions call (sqlite3, osascript and jq). Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(osascript:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Apple Notes Performance Tuning access the network?

SKILL.md names 3 domains. As links in the text: github.com, developer.apple.com and sqlite.org. This is read from the text; nothing was executed.

Is Apple Notes Performance Tuning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apple Notes Performance Tuning use?

Apple Notes Performance Tuning is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apple Notes Performance Tuning use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Apple Notes Performance Tuning?

Skills that share tags, products or a category with Apple Notes Performance Tuning: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 44k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apple Notes Performance Tuning?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.