agentsclimarketplace

Apple notes hello world

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/apple-notes-pack/skills/apple-notes-hello-world

425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill apple-notes-hello-world

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

'Create, read, and list Apple Notes using JXA and AppleScript.

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.8 KB, as published. Nobody here has run it

Apple Notes Hello World

Overview

Create, read, search, and delete Apple Notes using JXA (JavaScript for Automation) via osascript. All examples work from the command line on macOS.

Prerequisites

  • Completed apple-notes-install-auth (permissions granted)
  • macOS with Notes.app

Instructions

Step 1: Create a Note

# JXA: Create a note in the default folder
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const defaultFolder = Notes.defaultAccount.folders[0];
  const newNote = Notes.Note({
    name: "Hello from Automation",
    body: "<h1>Hello World</h1><p>This note was created via JXA at " + new Date().toISOString() + "</p>"
  });
  defaultFolder.notes.push(newNote);
  newNote.id();
'

# AppleScript equivalent:
osascript -e '
  tell application "Notes"
    tell account "iCloud"
      make new note at folder "Notes" with properties {name:"Hello AppleScript", body:"<p>Created via AppleScript</p>"}
    end tell
  end tell
'

Step 2: List All Notes

# List notes with title and creation date
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const notes = Notes.defaultAccount.notes();
  notes.slice(0, 10).map(n =>
    `${n.name()} | Created: ${n.creationDate().toISOString().split("T")[0]}`
  ).join("\n");
'

Step 3: Read a Note's Content

# Read note body (returns HTML)
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const notes = Notes.defaultAccount.notes();
  const target = notes.find(n => n.name() === "Hello from Automation");
  if (target) {
    `Title: ${target.name()}\nBody: ${target.body()}\nModified: ${target.modificationDate()}`;
  } else {
    "Note not found";
  }
'

Step 4: Search Notes

# Search by keyword in note name
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const query = "Hello";
  const results = Notes.defaultAccount.notes().filter(n =>
    n.name().toLowerCase().includes(query.toLowerCase())
  );
  results.map(n => n.name()).join("\n") || "No results";
'

Step 5: Create Note in Specific Folder

# Create a folder and add a note to it
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const account = Notes.defaultAccount;

  // Create folder if it does not exist
  let folder = account.folders().find(f => f.name() === "Automation");
  if (!folder) {
    folder = Notes.Folder({ name: "Automation" });
    account.folders.push(folder);
  }

  // Add note to folder
  const note = Notes.Note({
    name: "Organized Note",
    body: "<p>This note lives in the Automation folder.</p>"
  });
  folder.notes.push(note);
  `Created in folder: ${folder.name()}`;
'

Step 6: Delete a Note

# Delete by name (moves to Recently Deleted)
osascript -l JavaScript -e '
  const Notes = Application("Notes");
  const notes = Notes.defaultAccount.notes();
  const target = notes.find(n => n.name() === "Hello from Automation");
  if (target) {
    Notes.delete(target);
    "Note deleted";
  } else {
    "Note not found";
  }
'

Note Properties

PropertyTypeWritableDescription
namestringYesNote title (first line)
bodystring (HTML)YesFull note content as HTML
idstringNoUnique identifier
creationDateDateNoWhen note was created
modificationDateDateNoLast modification
containerFolderNoParent folder

Output

  • Created a note via JXA and AppleScript
  • Listed, searched, and read note content
  • Organized note into a folder
  • Deleted a note

Error Handling

ErrorCauseSolution
Notes got an errorNotes.app not runningAdd Notes.activate() first
Empty bodyNote has no text contentCheck note is not just an image
Can't make folderFolder already existsCheck before creating
Slow responseiCloud sync in progressWait for sync; use local account

Resources

Next Steps

Proceed to apple-notes-local-dev-loop for development workflow setup.

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.