Agent skill

Apple Notes Data Handling

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

Handle Apple Notes data formats: HTML body, attachments, and rich content.

MITAuto-check passed

Install Apple Notes Data Handling

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apple-notes-data-handling --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-data-handling .claude/skills/apple-notes-data-handling && 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-data-handling
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
420 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Handle Apple Notes data formats: HTML body, attachments, and rich content.

  • Works in 4 steps: Scope reads to named folders and… → Write exports to a pre-created,… → Treat HTML and attachment metadata as… → …
  • SKILL.md covers Overview, Prerequisites, Instructions and Note Body HTML Format, plus 8 more sections
  • Calls osascript

What it does

Apple Notes Data Handling is an agent skill from jeremylongshore/tons-of-skills-marketplace. Handle Apple Notes data formats: HTML body, attachments, and rich content. Trigger: "apple notes data handling".

Its SKILL.md is about 1.6k 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

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.

Example prompts

  • “apple notes data handling”
  • “/apple-notes-data-handling”

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. Scope reads to named folders and minimize collected fields before invoking osascript.
  2. Write exports to a pre-created, owner-only directory and validate permissions before any data is emitted.
  3. Treat HTML and attachment metadata as untrusted content: sanitize before rendering, and never execute embedded links or markup.
  4. Hash or redact identifiers in operational logs; record only counts and completion state.

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:

    • osascript

    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):

    • developer.apple.com
    • github.com
    • ciofecaforensics.com

    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 Data Handling loads about 1.6k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 420 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.6k

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). 420 words, ~1,558 tokens.

Download SKILL.mdSave it as .claude/skills/apple-notes-data-handling/SKILL.md (or your agent's skills folder).
name
apple-notes-data-handling
description
Handle Apple Notes data formats: HTML body, attachments, and rich content. Trigger: "apple notes data handling".
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 Data Handling

Overview

Apple Notes stores note content as a restricted subset of HTML internally. The body() property in JXA returns this HTML, which includes <div>, <h1>-<h3>, <b>, <i>, <ul>, <li>, and Apple-specific classes for checklists and tables. Attachments (images, PDFs, sketches, scans) are embedded as <img> or object references but cannot be directly extracted via JXA — they require the attachments() property. Understanding these data formats is essential for building reliable import, export, and backup pipelines.

Prerequisites

  • Written authorization for the accounts, folders, and note categories to be exported or transformed.
  • An encrypted destination outside a shared directory, a retention limit, and a tested restore path.
  • A conversion test corpus containing only synthetic notes; do not use the examples as proof that Apple Notes HTML is a stable public format.

Instructions

  1. Scope reads to named folders and minimize collected fields before invoking osascript.
  2. Write exports to a pre-created, owner-only directory and validate permissions before any data is emitted.
  3. Treat HTML and attachment metadata as untrusted content: sanitize before rendering, and never execute embedded links or markup.
  4. Hash or redact identifiers in operational logs; record only counts and completion state.

Note Body HTML Format

html
<!-- Apple Notes uses a subset of HTML wrapped in <div> blocks -->
<div><h1>Title</h1></div>
<div><br></div>
<div>Paragraph text here.</div>
<div><b>Bold text</b> and <i>italic text</i></div>
<div><br></div>
<div><ul><li>List item 1</li><li>List item 2</li></ul></div>

<!-- Checklists use Apple's custom class -->
<div><ul class="com-apple-note-checklist">
  <li class="done">Completed item</li>
  <li>Incomplete item</li>
</ul></div>

<!-- Tables (macOS Ventura+) use standard HTML tables -->
<div><table><tr><td>Cell 1</td><td>Cell 2</td></tr></table></div>

<!-- Tags (macOS Sonoma+) are stored as hashtags in body text -->
<div>#project #important</div>

Export All Notes to JSON

bash
#!/bin/bash
# Full export with metadata — useful for backups and migration
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const results = Notes.defaultAccount.notes().map(n => ({
    id: n.id(),
    title: n.name(),
    body: n.body(),
    plaintext: n.plaintext(),
    folder: n.container().name(),
    created: n.creationDate().toISOString(),
    modified: n.modificationDate().toISOString(),
    attachmentCount: n.attachments().length,
  }));
  JSON.stringify(results, null, 2);
' > "$HOME/notes-export-$(date +%Y%m%d).json"

HTML to Markdown Converter

typescript
// src/data/html-to-markdown.ts
function notesHtmlToMarkdown(html: string): string {
  return html
    .replace(/<h1>(.*?)<\/h1>/g, "# $1")
    .replace(/<h2>(.*?)<\/h2>/g, "## $1")
    .replace(/<h3>(.*?)<\/h3>/g, "### $1")
    .replace(/<b>(.*?)<\/b>/g, "**$1**")
    .replace(/<strong>(.*?)<\/strong>/g, "**$1**")
    .replace(/<i>(.*?)<\/i>/g, "*$1*")
    .replace(/<em>(.*?)<\/em>/g, "*$1*")
    .replace(/<li class="done">(.*?)<\/li>/g, "- [x] $1")
    .replace(/<li>(.*?)<\/li>/g, "- [ ] $1")
    .replace(/<br\s*\/?>/g, "\n")
    .replace(/<div>/g, "").replace(/<\/div>/g, "\n")
    .replace(/<[^>]*>/g, "")
    .replace(/\n{3,}/g, "\n\n")
    .trim();
}

Attachment Handling

bash
# List all notes with attachments and their counts
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  Notes.defaultAccount.notes()
    .filter(n => n.attachments().length > 0)
    .map(n => n.name() + ": " + n.attachments().length + " attachments (" +
      n.attachments().map(a => a.name()).join(", ") + ")")
    .join("\n");
'

# Note: JXA cannot directly save attachment binary data.
# For full attachment export, use Shortcuts:
# shortcuts run "Export Note Attachments" --input-type text --input "Note Title"
Show full SKILL.md (210 more words)Show less

Error Handling

IssueCauseSolution
body() returns empty stringNote contains only attachments (no text)Check attachments().length; use plaintext() as fallback
HTML contains unexpected tagsNote created on iOS with unsupported formattingStrip unknown tags; keep only known Apple Notes subset
plaintext() truncatedVery large note bodyExport via body() HTML instead; convert after
Checklist state lost in exportCustom class not preserved in conversionMap class="done" to [x] before stripping HTML
Attachment names are genericAuto-generated names like Image.pngUse note title + index for meaningful filenames

Output

An export produces a scoped, encrypted artifact plus a separate receipt containing the folder scope, record count, checksum, and expiration—not note bodies, titles, or attachment names. A conversion produces Markdown only after the source has been sanitized and its unsupported constructs have been recorded for review.

Examples

For a migration rehearsal, export a synthetic test folder to an owner-only staging directory, convert it, validate the expected count and checksum, then securely remove the rehearsal artifact under the retention policy. For a live backup, use a job-owned encrypted volume and report only completed: 42 records to monitoring.

Resources

Next Steps

For migrating between note platforms, see apple-notes-migration-deep-dive. For backup automation, see apple-notes-deploy-integration.

© 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-data-handling of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Apple Notes Data Handling 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 Data Handling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apple Notes Data Handling this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Error Handlingaffaan-m/ECC277k1 repos~2.7kAutomated safety check: PassMIT
Error Handlingthedaviddias/Front-End-Checklist74k—~416Automated safety check: PassMIT
Error Handlingaffaan-m/ECC276k—~2.4kAutomated safety check: PassMIT
Apple Remindersopenclaw/openclaw392k1 repos~760Automated safety check: PassMIT
Python Error Handlingwshobson/agents40k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Error Handling

    affaan-m/ECC

    Patterns for robust error handling across TypeScript, Python, and Go.

    277k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Error Handling

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Implement proper error handling.

    74k GitHub stars~416 tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Error Handling

    affaan-m/ECC

    TypeScript、Python、Goにわたる堅牢なエラー処理のパターン。型付きエラー、エラー境界、リトライ、サーキットブレーカー、ユーザー向けエラーメッセージをカバーします。

    276k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Apple Reminders

    openclaw/openclaw

    List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

    392k GitHub starsUsed in 1 repo~760 tokens
    Productivity & AutomationAuto-check passed
  • Python Error Handling

    wshobson/agents

    Python error handling patterns including input validation, exception hierarchies, and partial failure handling.

    40k GitHub stars~1.5k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Gh Attach

    sickn33/agentic-awesome-skills

    Upload and download GitHub user-attachments (screenshots, PDFs, zips, videos) from the terminal; use when asked to attach or embed a file in a PR, issue, or comment, or download an attachment URL.

    47k GitHub starsUsed in 1 repo~1.6k tokens
    Documents & OfficeAuto-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

Questions about Apple Notes Data Handling

What does Apple Notes Data Handling do?

Handle Apple Notes data formats: HTML body, attachments, and rich content. Apple Notes Data Handling is an agent skill from jeremylongshore/tons-of-skills-marketplace. Handle Apple Notes data formats: HTML body, attachments, and rich content.

How do I install Apple Notes Data Handling in Claude Code?

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

How do I install Apple Notes Data Handling in Codex?

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

Can I use Apple Notes Data Handling 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-data-handling -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-data-handling, .gemini/skills/apple-notes-data-handling, .github/skills/apple-notes-data-handling and .opencode/skills/apple-notes-data-handling in your project.

What does Apple Notes Data Handling need to run?

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

Does Apple Notes Data Handling access the network?

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

Is Apple Notes Data Handling 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 Data Handling use?

Apple Notes Data Handling 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 Data Handling use?

About 1.6k tokens (SKILL.md is roughly 6.2k 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 Data Handling?

Skills that share tags, products or a category with Apple Notes Data Handling: Error Handling (affaan-m/ECC, 277k stars), Error Handling (thedaviddias/Front-End-Checklist, 74k stars), Error Handling (affaan-m/ECC, 276k stars) and Apple Reminders (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apple Notes Data Handling?

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.