agentsclimarketplace

Apple notes core workflow b

Skill ComeOnOliver/skillshub/skills/jeremylongshore/claude-code-plugins-plus-skills/apple-notes-core-workflow-b

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill apple-notes-core-workflow-b

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Export and convert Apple Notes to Markdown, JSON, HTML, and SQLite. Use when backing up notes, exporting to other apps, converting HTML to Markdown, or building searchable note archives from Apple Notes. Trigger: "export apple notes", "apple notes to markdown", "backup apple notes", "apple notes to JSON", "convert apple notes".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.6 KB, as published. Nobody here has run it

Apple Notes Core Workflow B — Export & Conversion

Overview

Export Apple Notes to portable formats: Markdown, JSON, HTML files, and SQLite databases. Apple Notes stores content as HTML internally — these workflows convert it to developer-friendly formats.

Instructions

Step 1: Export All Notes to JSON

osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const allNotes = Notes.defaultAccount.notes();
  const exported = allNotes.map(n => ({
    id: n.id(),
    title: n.name(),
    body: n.body(),
    folder: n.container().name(),
    created: n.creationDate().toISOString(),
    modified: n.modificationDate().toISOString(),
  }));
  JSON.stringify(exported, null, 2);
' > apple-notes-export.json

echo "Exported $(jq length apple-notes-export.json) notes to apple-notes-export.json"

Step 2: Export Notes as Markdown Files

#!/bin/bash
# scripts/notes-to-markdown.sh
OUTPUT_DIR="${1:-./notes-export}"
mkdir -p "$OUTPUT_DIR"

osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const notes = Notes.defaultAccount.notes();
  notes.map(n => JSON.stringify({
    title: n.name(),
    body: n.body(),
    folder: n.container().name(),
  })).join("\n---SEPARATOR---\n");
' | while IFS= read -r line; do
  if [ "$line" = "---SEPARATOR---" ]; then continue; fi
  title=$(echo "$line" | jq -r '.title' 2>/dev/null)
  body=$(echo "$line" | jq -r '.body' 2>/dev/null)
  folder=$(echo "$line" | jq -r '.folder' 2>/dev/null)

  # Convert HTML to basic Markdown
  md_body=$(echo "$body" | sed 's/<h1>/# /g; s/<\/h1>//g; s/<h2>/## /g; s/<\/h2>//g; s/<p>//g; s/<\/p>/\n/g; s/<br>/\n/g; s/<li>/- /g; s/<\/li>//g; s/<[^>]*>//g')

  safe_title=$(echo "$title" | tr '/:' '-' | head -c 100)
  mkdir -p "$OUTPUT_DIR/$folder"
  echo -e "# $title\n\n$md_body" > "$OUTPUT_DIR/$folder/$safe_title.md"
done

echo "Export complete: $OUTPUT_DIR"

Step 3: Export to SQLite Database

# Using apple-notes-to-sqlite (pip install apple-notes-to-sqlite)
pip install apple-notes-to-sqlite
apple-notes-to-sqlite export notes.db

# Or build your own with JXA + sqlite3
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const notes = Notes.defaultAccount.notes();
  const rows = notes.map(n =>
    `INSERT INTO notes (title, body, folder, created) VALUES (${JSON.stringify(n.name())}, ${JSON.stringify(n.body())}, ${JSON.stringify(n.container().name())}, ${JSON.stringify(n.creationDate().toISOString())});`
  ).join("\n");
  rows;
' > /tmp/notes-inserts.sql

sqlite3 notes.db << 'SQL'
CREATE TABLE IF NOT EXISTS notes (id INTEGER PRIMARY KEY, title TEXT, body TEXT, folder TEXT, created TEXT);
.read /tmp/notes-inserts.sql
SELECT COUNT(*) || ' notes imported' FROM notes;
SQL

Step 4: Full-Text Search on Exported Notes

# Search across all exported notes
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const query = "project plan";
  const results = Notes.defaultAccount.notes().filter(n => {
    const body = n.body().toLowerCase();
    const name = n.name().toLowerCase();
    return body.includes(query) || name.includes(query);
  });
  results.map(n => `${n.name()} (${n.container().name()})`).join("\n");
'

Output

  • JSON export of all notes with metadata
  • Markdown files organized by folder
  • SQLite database with full note content
  • Full-text search across notes

Error Handling

ErrorCauseSolution
Slow exportThousands of notesExport in batches by folder
HTML artifacts in MarkdownComplex formattingUse a proper HTML-to-MD library (turndown)
Missing attachmentsImages not exportedAttachments need separate export path
Encoding issuesUnicode in note titlesUse safe filename sanitization

Resources

Next Steps

For common errors, see apple-notes-common-errors.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.