notesctl (Apple Notes, low-token) Goal Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts. Quick start Create a new note (deterministic title/body) - JSON stdin (recommended): - Direct args: List/search/export Output conventions - Keep receipts short: . Notes on editing Editing existing notes is inherently more fragile: - Prefer append workflows or create a new note with a reference. - If the user explicitly wants interactive editing, use (manual selection + editor). ---

Body line 1\\nBody line 2' \"Notes\"\n```\n\n### List/search/export\n\n```bash\n{baseDir}/scripts/notes_list.sh \"Notes\"\n{baseDir}/scripts/notes_search.sh \"query\" \"Notes\"\n{baseDir}/scripts/notes_export.sh \"query\" \"Notes\" \"/tmp\" # interactive select then export\n```\n\n## Output conventions\n\n- Keep receipts short: `Wrote to Notes: \u003ctitle>`. \n\n## Notes on editing\n\nEditing existing notes is inherently more fragile:\n- Prefer append workflows or create a new note with a reference.\n- If the user explicitly wants interactive editing, use `memo notes -e` (manual selection + editor).\n---","attachment_filenames":["_meta.json",".clawhub/origin.json","README.md","scripts/notes_export.sh","scripts/notes_list.sh","scripts/notes_new.sh","scripts/notes_post.sh","scripts/notes_search.sh"],"attachments":[{"filename":"_meta.json","content":"{\n \"ownerId\": \"kn794nct6zn5kh05g6tga4scmx80pazj\",\n \"slug\": \"notesctl-skill-for-openclaw\",\n \"version\": \"0.1.0\",\n \"publishedAt\": 1770449478233\n}","content_type":"application/json; charset=utf-8","language":"json","size":146,"content_sha256":"e0df987a34cc5a19af3b0dd4ff69282cee94f3a44ed160d3f9575bbebb04468c"},{"filename":".clawhub/origin.json","content":"{\n \"version\": 1,\n \"registry\": \"https://clawhub.ai\",\n \"slug\": \"notesctl-skill-for-openclaw\",\n \"installedVersion\": \"0.1.0\",\n \"installedAt\": 1770478757539\n}\n","content_type":"application/json; charset=utf-8","language":"json","size":159,"content_sha256":"74d2fa99c0fa5cda6be689faa2874acecfb6038d9186732f00d49698c9b59652"},{"filename":"README.md","content":"# notesctl (Apple Notes skill)\n\nA small, deterministic Apple Notes helper skill for OpenClaw.\n\nIt wraps Apple Notes operations in scripts so the agent can reliably create/search/export notes without fragile quoting or UI automation.\n\nWhy: this was built to replace the original OpenClaw Apple Notes skill, which can occasionally create a note titled \"New Notes\" and can be token-expensive; notesctl keeps the system logic deterministic and minimizes LLM usage (ideally a single call to produce the final output).\n\n## Requirements (macOS)\n\n- `python3`\n- `osascript`\n- `memo` (CLI used by the scripts)\n\n## What’s inside\n\n- `SKILL.md` — the skill metadata + concise operating instructions\n- `scripts/`\n - `notes_new.sh` — create a new note with title/body/folder\n - `notes_post.sh` — create a new note via JSON stdin (recommended for automation)\n - `notes_list.sh` — list notes in a folder\n - `notes_search.sh` — search notes (optionally within a folder)\n - `notes_export.sh` — interactively select a matching note and export it to a directory\n\n## Usage\n\n### 1) Create a new note (recommended: JSON stdin)\n\n```bash\nbaseDir=/path/to/notesctl\n\necho '{\"title\":\"标题\",\"body\":\"第一行\\n第二行\",\"folder\":\"Notes\"}' \\\n | \"$baseDir/scripts/notes_post.sh\"\n```\n\n### 2) Create a new note (direct args)\n\n```bash\nbaseDir=/path/to/notesctl\n\n\"$baseDir/scripts/notes_new.sh\" \\\n \"标题\" \\\n

notesctl (Apple Notes, low-token) Goal Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts. Quick start Create a new note (deterministic title/body) - JSON stdin (recommended): - Direct args: List/search/export Output conventions - Keep receipts short: . Notes on editing Editing existing notes is inherently more fragile: - Prefer append workflows or create a new note with a reference. - If the user explicitly wants interactive editing, use (manual selection + editor). ---

正文第一行\\n正文第二行' \\\n \"Notes\"\n```\n\n### 3) List notes in a folder\n\n```bash\nbaseDir=/path/to/notesctl\n\n\"$baseDir/scripts/notes_list.sh\" \"Notes\"\n```\n\n### 4) Search notes\n\n```bash\nbaseDir=/path/to/notesctl\n\n# search all folders\n\"$baseDir/scripts/notes_search.sh\" \"keyword\"\n\n# search within a specific folder\n\"$baseDir/scripts/notes_search.sh\" \"keyword\" \"Notes\"\n```\n\n### 5) Export a note\n\nThis is interactive: it searches, then prompts you to choose which note to export.\n\n```bash\nbaseDir=/path/to/notesctl\n\n\"$baseDir/scripts/notes_export.sh\" \"keyword\" \"Notes\" \"/tmp\"\n```\n\n## Notes / gotchas\n\n- Editing existing notes is intentionally not the default workflow (fragile). Prefer append workflows or creating a new note.\n- If you do need manual editing, use `memo notes -e` (interactive selection + editor).\n\n## License\n\nInternal / personal use (adjust as needed).\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":2275,"content_sha256":"24a63057c7b28e1e3ebe7a8b26ca2e895e2efad43113c3053592bc4b6249cc75"},{"filename":"scripts/notes_export.sh","content":"#!/usr/bin/env bash\nset -euo pipefail\n\n# Export a note via memo (interactive selection).\n# Usage: notes_export.sh [query] [folder] [outdir]\nQUERY=\"${1:-}\"\nFOLDER=\"${2:-Notes}\"\nOUTDIR=\"${3:-.}\"\n\nmkdir -p \"$OUTDIR\"\n\nif [[ -n \"$QUERY\" ]]; then\n # Narrow down list first; export remains interactive in memo.\n memo notes -f \"$FOLDER\" -s \"$QUERY\"\nfi\n\n# memo will prompt for which note to export\n(cd \"$OUTDIR\" && memo notes -f \"$FOLDER\" -ex)","content_type":"application/x-sh; charset=utf-8","language":"bash","size":436,"content_sha256":"d9d108de63e50606c0ffb2d02aedd395ca2de12cd789953d41ddc399f7cb9a46"},{"filename":"scripts/notes_list.sh","content":"#!/usr/bin/env bash\nset -euo pipefail\n\n# List notes in a folder (default: Notes)\nFOLDER=\"${1:-Notes}\"\n\nmemo notes -f \"$FOLDER\"","content_type":"application/x-sh; charset=utf-8","language":"bash","size":126,"content_sha256":"1057848ad9030aba8aa42ecb928e799c3149585ed901ee7157ddb80f0e55da8d"},{"filename":"scripts/notes_new.sh","content":"#!/usr/bin/env bash\nset -euo pipefail\n\n# Create a new Apple Note with explicit title/body (stable; avoids \"New Note\" placeholder).\n# Usage:\n# notes_new.sh \"TITLE\" \"BODY\" [FOLDER]\n# Example:\n# notes_new.sh \"My title\"

notesctl (Apple Notes, low-token) Goal Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts. Quick start Create a new note (deterministic title/body) - JSON stdin (recommended): - Direct args: List/search/export Output conventions - Keep receipts short: . Notes on editing Editing existing notes is inherently more fragile: - Prefer append workflows or create a new note with a reference. - If the user explicitly wants interactive editing, use (manual selection + editor). ---

Line1\\nLine2' \"Notes\"\n\nTITLE=\"${1:-}\"\nBODY=\"${2:-}\"\nFOLDER=\"${3:-Notes}\"\n\nif [[ -z \"$TITLE\" ]]; then\n echo \"ERROR: TITLE is required\" >&2\n exit 1\nfi\n\n# Notes body is HTML-ish: escape + convert newlines to \u003cbr>\nexport TITLE BODY\nBODY_HTML=$(python3 - \u003c\u003c'PY'\nimport html, os\ns = os.environ.get('BODY','')\nprint(html.escape(s).replace('\\n','\u003cbr>'))\nPY\n)\n\n# Escape for AppleScript string literal\nexport BODY_HTML\nBODY_AS=$(python3 - \u003c\u003c'PY'\nimport os\ns=os.environ['BODY_HTML']\nprint(s.replace('\\\\','\\\\\\\\').replace('\"','\\\\\"'))\nPY\n)\n\nTITLE_AS=$(python3 - \u003c\u003c'PY'\nimport os\ns=os.environ['TITLE']\nprint(s.replace('\\\\','\\\\\\\\').replace('\"','\\\\\"'))\nPY\n)\n\nosascript -e \"tell application \\\"Notes\\\" to make new note at folder \\\"$FOLDER\\\" with properties {name:\\\"$TITLE_AS\\\", body:\\\"$BODY_AS\\\"}\"","content_type":"application/x-sh; charset=utf-8","language":"bash","size":1002,"content_sha256":"5a2215bbe27b3c785902d50774cfb466e8565e63548a83f2ec2d4333960e8c38"},{"filename":"scripts/notes_post.sh","content":"#!/usr/bin/env bash\nset -euo pipefail\n\n# Read a JSON payload from stdin and create a new Apple Note.\n# JSON schema:\n# {\"title\":\"...\",\"body\":\"...\",\"folder\":\"Notes\"}\n# Usage:\n# echo '{\"title\":\"T\",\"body\":\"Line1\\nLine2\",\"folder\":\"Notes\"}' | scripts/notes_post.sh\n\npayload=\"$(cat)\"\n\nexport NOTES_PAYLOAD=\"$payload\"\n\n# Extract fields (title required)\nTITLE=$(python3 - \u003c\u003c'PY'\nimport json, os\nobj=json.loads(os.environ.get('NOTES_PAYLOAD','') or '{}')\nprint(obj.get('title',''))\nPY\n)\n\nif [[ -z \"$TITLE\" ]]; then\n echo \"ERROR: title is required in JSON stdin\" >&2\n exit 1\nfi\n\nBODY=$(python3 - \u003c\u003c'PY'\nimport json, os\nobj=json.loads(os.environ.get('NOTES_PAYLOAD','') or '{}')\nprint(obj.get('body',''))\nPY\n)\n\nFOLDER=$(python3 - \u003c\u003c'PY'\nimport json, os\nobj=json.loads(os.environ.get('NOTES_PAYLOAD','') or '{}')\nprint(obj.get('folder','Notes'))\nPY\n)\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\"$SCRIPT_DIR/notes_new.sh\" \"$TITLE\" \"$BODY\" \"$FOLDER\" >/dev/null\n\necho \"OK: wrote note -> $FOLDER / $TITLE\"","content_type":"application/x-sh; charset=utf-8","language":"bash","size":1011,"content_sha256":"2c0369b798a799b7cc2c2cb27e1962d5783ad5d3f08c4c990dad10638115f6c1"},{"filename":"scripts/notes_search.sh","content":"#!/usr/bin/env bash\nset -euo pipefail\n\n# Search notes (fuzzy) optionally within a folder.\nQUERY=\"${1:-}\"\nFOLDER=\"${2:-}\"\n\nif [[ -z \"$QUERY\" ]]; then\n echo \"Usage: notes_search.sh \u003cquery> [folder]\" >&2\n exit 1\nfi\n\nif [[ -n \"$FOLDER\" ]]; then\n memo notes -f \"$FOLDER\" -s \"$QUERY\"\nelse\n memo notes -s \"$QUERY\"\nfi","content_type":"application/x-sh; charset=utf-8","language":"bash","size":313,"content_sha256":"ab85833b827942bc5b272c12ce752625187d11fcac7087f193356e2dde4a2301"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"notesctl (Apple Notes, low-token)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Goal","type":"text"}]},{"type":"paragraph","content":[{"text":"Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick start","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Create a new note (deterministic title/body)","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"JSON stdin (recommended):","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"echo '{\"title\":\"Title\",\"body\":\"Line 1\\nLine 2\",\"folder\":\"Notes\"}' | {baseDir}/scripts/notes_post.sh","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Direct args:","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"{baseDir}/scripts/notes_new.sh \"Title\"

notesctl (Apple Notes, low-token) Goal Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts. Quick start Create a new note (deterministic title/body) - JSON stdin (recommended): - Direct args: List/search/export Output conventions - Keep receipts short: . Notes on editing Editing existing notes is inherently more fragile: - Prefer append workflows or create a new note with a reference. - If the user explicitly wants interactive editing, use (manual selection + editor). ---

Body line 1\\nBody line 2' \"Notes\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"List/search/export","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"{baseDir}/scripts/notes_list.sh \"Notes\"\n{baseDir}/scripts/notes_search.sh \"query\" \"Notes\"\n{baseDir}/scripts/notes_export.sh \"query\" \"Notes\" \"/tmp\" # interactive select then export","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Output conventions","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Keep receipts short: ","type":"text"},{"text":"Wrote to Notes: \u003ctitle>","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Notes on editing","type":"text"}]},{"type":"paragraph","content":[{"text":"Editing existing notes is inherently more fragile:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prefer append workflows or create a new note with a reference.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If the user explicitly wants interactive editing, use ","type":"text"},{"text":"memo notes -e","type":"text","marks":[{"type":"code_inline"}]},{"text":" (manual selection + editor).","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"notesctl","author":"@skillopedia","source":{"stars":0,"repo_name":"openclaw-workspace","origin_url":"https://github.com/boomsystel-code/openclaw-workspace/blob/HEAD/skills/notesctl-skill-for-openclaw/SKILL.md","repo_owner":"boomsystel-code","body_sha256":"ecd11c4b4b0e46680db9f269d95d87e9e648edf6c2c3ba5a5767f36693ffc37c","cluster_key":"a05d88887dd15dba875678acaa31f5671ba1e6e6fb244a9dafd98a9aca854c3c","clean_bundle":{"format":"clean-skill-bundle-v1","source":"boomsystel-code/openclaw-workspace/skills/notesctl-skill-for-openclaw/SKILL.md","attachments":[{"id":"76fbdde1-0253-5d99-9aaf-1477a766937f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/76fbdde1-0253-5d99-9aaf-1477a766937f/attachment.json","path":".clawhub/origin.json","size":159,"sha256":"74d2fa99c0fa5cda6be689faa2874acecfb6038d9186732f00d49698c9b59652","contentType":"application/json; charset=utf-8"},{"id":"39db9642-d70c-5632-a214-1a251fb18041","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/39db9642-d70c-5632-a214-1a251fb18041/attachment.md","path":"README.md","size":2275,"sha256":"24a63057c7b28e1e3ebe7a8b26ca2e895e2efad43113c3053592bc4b6249cc75","contentType":"text/markdown; charset=utf-8"},{"id":"00b25af1-49b2-54f4-af59-581011de1f7c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/00b25af1-49b2-54f4-af59-581011de1f7c/attachment.json","path":"_meta.json","size":146,"sha256":"e0df987a34cc5a19af3b0dd4ff69282cee94f3a44ed160d3f9575bbebb04468c","contentType":"application/json; charset=utf-8"},{"id":"b0ceef5f-2f0a-5ebe-abc7-969375e5aa02","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b0ceef5f-2f0a-5ebe-abc7-969375e5aa02/attachment.sh","path":"scripts/notes_export.sh","size":436,"sha256":"d9d108de63e50606c0ffb2d02aedd395ca2de12cd789953d41ddc399f7cb9a46","contentType":"application/x-sh; charset=utf-8"},{"id":"f8d0ce98-c53e-565a-9b9b-ccc18b5fd1fd","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f8d0ce98-c53e-565a-9b9b-ccc18b5fd1fd/attachment.sh","path":"scripts/notes_list.sh","size":126,"sha256":"1057848ad9030aba8aa42ecb928e799c3149585ed901ee7157ddb80f0e55da8d","contentType":"application/x-sh; charset=utf-8"},{"id":"0b9a56d1-5d6a-50d3-a978-b3ad37af3644","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0b9a56d1-5d6a-50d3-a978-b3ad37af3644/attachment.sh","path":"scripts/notes_new.sh","size":1002,"sha256":"5a2215bbe27b3c785902d50774cfb466e8565e63548a83f2ec2d4333960e8c38","contentType":"application/x-sh; charset=utf-8"},{"id":"69a175cc-be37-5030-bf26-a0dc64448452","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/69a175cc-be37-5030-bf26-a0dc64448452/attachment.sh","path":"scripts/notes_post.sh","size":1011,"sha256":"2c0369b798a799b7cc2c2cb27e1962d5783ad5d3f08c4c990dad10638115f6c1","contentType":"application/x-sh; charset=utf-8"},{"id":"8aabaa83-2ca9-521c-b81d-f6ee3c07c723","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8aabaa83-2ca9-521c-b81d-f6ee3c07c723/attachment.sh","path":"scripts/notes_search.sh","size":313,"sha256":"ab85833b827942bc5b272c12ce752625187d11fcac7087f193356e2dde4a2301","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"d8f8ab04f952b745118b2d77888c8c4a6a7b10d8bbf9ee40aa16576407d227bd","attachment_count":8,"text_attachments":8,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/notesctl-skill-for-openclaw/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"productivity-workflow","category_label":"Productivity"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"productivity-workflow","metadata":{"openclaw":{"os":["darwin"],"emoji":"📝","requires":{"bins":["memo","python3","osascript"]}}},"import_tag":"clean-skills-v1","description":"Manage Apple Notes via deterministic local scripts (create, append, list, search, export, and edit). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders."}},"renderedAt":1782979294554}

notesctl (Apple Notes, low-token) Goal Minimize token usage and avoid fragile quoting by routing Apple Notes operations through bundled scripts. Quick start Create a new note (deterministic title/body) - JSON stdin (recommended): - Direct args: List/search/export Output conventions - Keep receipts short: . Notes on editing Editing existing notes is inherently more fragile: - Prefer append workflows or create a new note with a reference. - If the user explicitly wants interactive editing, use (manual selection + editor). ---