Skip to content
Skillv1.0.0

apple-notes-local-dev-loop

Set up local development workflow for Apple Notes automation with JXA hot reload. Trigger: "apple notes dev loop".

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/apple-notes-pack/skills/apple-notes-local-dev-loop/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-local-dev-loop. Copyright stays with the author (MIT).

Apple Notes Local Dev Loop

Overview

Iterative development workflow for Apple Notes JXA scripts with file watching and test helpers.

Prerequisites

  • A local macOS development machine and a test-only On My Mac folder, or a fully mocked Notes adapter.
  • Synthetic test fixtures with no production note content, account names, or credentials.
  • A source-controlled allowlist of scripts eligible for local execution.

Instructions

Step 1: Project Setup

mkdir apple-notes-automation && cd apple-notes-automation
npm init -y
npm install -D chokidar tsx typescript

Step 2: JXA Runner with Hot Reload

// src/dev/watch-runner.ts
import { watch } from "chokidar";
import { execSync } from "child_process";

watch("scripts/*.js", { ignoreInitial: true }).on("change", (path) => {
  console.log(`Changed: ${path} — running...`);
  try {
    const output = execSync(`osascript -l JavaScript "${path}"`, { encoding: "utf8" });
    console.log(output);
  } catch (err: any) {
    console.error(err.stderr);
  }
});

console.log("Watching scripts/*.js for changes...");

Step 3: Test Helper

// src/dev/test-notes.ts
import { execSync } from "child_process";

function runJxa(script: string): string {
  return execSync(`osascript -l JavaScript -e '${script}'`, { encoding: "utf8" }).trim();
}

function getNoteCount(): number {
  return parseInt(runJxa("Application(\"Notes\").defaultAccount.notes.length"));
}

function createTestNote(title: string): string {
  return runJxa(`
    const Notes = Application("Notes");
    const note = Notes.Note({name: "${title}", body: "<p>Test</p>"});
    Notes.defaultAccount.folders[0].notes.push(note);
    note.id();
  `);
}

export { runJxa, getNoteCount, createTestNote };

Step 4: Dev Scripts

{
  "scripts": {
    "dev": "tsx src/dev/watch-runner.ts",
    "test:notes": "tsx src/dev/test-notes.ts"
  }
}

Output

  • Hot-reload JXA development with file watching
  • Test helpers for note CRUD operations
  • Iterative script development workflow

Error Handling

Stop the watcher when a script fails and surface only the exit status plus a redacted error category. Never hot-run an edited script against a production or synchronized default account. If a test mutation is required, use the designated test folder and reconcile it before the next run.

Examples

Run unit tests against a mock client while editing. When a JXA smoke test is necessary, point it at the designated local test folder with a synthetic title, verify the resulting opaque identifier, and clean it up under a test fixture lifecycle—do not run the watcher against defaultAccount.

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-apple-notes-l-0e0de7/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-apple-notes-l-0e0de7.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-apple-notes-l-0e0de7",
  "kind": "skill",
  "name": "apple-notes-local-dev-loop",
  "description": "Set up local development workflow for Apple Notes automation with JXA hot reload. Trigger: \"apple notes dev loop\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "macos",
      "apple-notes",
      "automation",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Set up local development workflow for Apple Notes automation with JXA hot reload. Trigger: \"apple notes dev loop\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/apple-notes-pack/skills/apple-notes-local-dev-loop/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/apple-notes-pack/skills/apple-notes-local-dev-loop/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/apple-notes-pack/skills/apple-notes-local-dev-loop/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(osascript:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Apple Notes Local Dev Loop\n\n## Overview\n\nIterative development workflow for Apple Notes JXA scripts with file watching and test helpers.\n\n## Prerequisites\n\n- A local macOS development machine and a test-only `On My Mac` folder, or a fully mocked Notes adapter.\n- Synthetic test fixtures with no production note content, account names, or credentials.\n- A source-controlled allowlist of scripts eligible for local execution.\n\n## Instructions\n\n### Step 1: Project Setup\n\n```bash\nmkdir apple-notes-automation && cd apple-notes-automation\nnpm init -y\nnpm install -D chokidar tsx typescript\n```\n\n### Ste",
  "cost": {
    "context_tokens": 716
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-apple-notes-l-0e0de7/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.