AGENT SKILL

notes_pin

Pin or unpin a Notes note (by exact title match). Uses UI menu navigation because macOS 14+ removed the AppleScript `pinned` property — direct `set pinned of note to true` errors with "Can't make pinned of note ... into type specifier". This skill activates Notes, selects the target note, then clicks the appropriate File-menu item ("Pin Note" or "Unpin Note"). The menu item label automatically toggles based on current state, so the skill checks which one exists and clicks the right one for the requested target state.

License 许可
Apache-2.0
所属仓库
LocalKinAI/kinclaw
最近更新
2026-11-01
Stars
★ 9
Forks
3

01 前言 Front Matter

args
[ "{{note}}", "{{state}}" ]
name
notes_pin
schema
{ "note": { "type": "string", "required": true, "description": "Exact note title" }, "state": { "type": "string", "default": "true", "required": false, "description": "true (pin) or false (unpin). Defaults to true." } }
command
[ "sh", "-c", "NOTE=\"$1\"; STATE=\"$2\"\n[ -z \"$NOTE\" ] && { echo \"note title required\" >&2; exit 1; }\n[ -z \"$STATE\" ] && STATE=\"true\"\ncase \"$STATE\" in\n true|pin|pinned|1) WANT=\"pin\" ;;\n false|unpin|unpinned|0) WANT=\"unpin\" ;;\n *) echo \"state must be true|false\" >&2; exit 1 ;;\nesac\n\nosascript 2>&1 <<APPLE\ntell application \"Notes\"\n activate\n try\n show (first note whose name = \"$NOTE\")\n on error\n return \"ERR: note not found\"\n end try\nend tell\ndelay 0.8\n\nset didAct to false\nset targetState to \"$WANT\"\ntell application \"System Events\"\n tell process \"Notes\"\n try\n set fileMenu to menu \"File\" of menu bar 1\n if targetState is \"pin\" then\n if exists (menu item \"Pin Note\" of fileMenu) and ¬\n (enabled of menu item \"Pin Note\" of fileMenu) then\n click menu item \"Pin Note\" of fileMenu\n set didAct to true\n else if exists (menu item \"Unpin Note\" of fileMenu) then\n -- already pinned: idempotent success\n set didAct to true\n end if\n else\n if exists (menu item \"Unpin Note\" of fileMenu) and ¬\n (enabled of menu item \"Unpin Note\" of fileMenu) then\n click menu item \"Unpin Note\" of fileMenu\n set didAct to true\n else if exists (menu item \"Pin Note\" of fileMenu) then\n -- already unpinned: idempotent success\n set didAct to true\n end if\n end if\n on error e\n return \"ERR_MENU: \" & e\n end try\n end tell\nend tell\ndelay 0.3\nif didAct then\n return \"ok: \" & targetState\nend if\nreturn \"ERR: menu item not found\"\nAPPLE\n", "_" ]
timeout
20
description
Pin or unpin a Notes note (by exact title match). Uses UI menu navigation because macOS 14+ removed the AppleScript `pinned` property — direct `set pinned of note to true` errors with "Can't make pinned of note ... into type specifier". This skill activates Notes, selects the target note, then clicks the appropriate File-menu item ("Pin Note" or "Unpin Note"). The menu item label automatically toggles based on current state, so the skill checks which one exists and clicks the right one for the requested target state.

03 SKILL.md 正文

notes_pin — pin / unpin a Notes note via File menu

macOS 14+ removed AppleScript's pinned property. The only reliable way to set pin state is the File menu's "Pin Note" / "Unpin Note" item, which Notes shows toggled based on current state.

This skill:

  1. Activates Notes + selects the note (by exact name match)
  2. Looks for "Pin Note" or "Unpin Note" in the File menu
  3. Clicks the right one for the requested target state
  4. Idempotent — if already in the desired state, returns success without re-clicking

Examples

notes_pin note="KinBench Pinned 164" state=true
  → ok: pin

notes_pin note="KinBench Unpin 165" state=false
  → ok: unpin

Note: pin state remains unverifiable via AppleScript on macOS 14+, so this skill cannot self-verify. The skill returns ok based on "correct menu item was clicked" — the caller's eval should confirm via UI inspection or trust the action.

04 同仓库更多 Skills

LocalKinAI
LocalKinAI/kinclaw

web

Universal web tool — fetches and interacts with web pages through real Chromium (Playwright). Renders JavaScript, follows redirects, handles cookies, bypasses many anti-scrape stubs that block plain `web_fetch`. Each call launches a fresh browser, executes the requested flow, closes. ~2-3s cold start; no persistent state. Use INSTEAD of `web_fetch` when: - Target is a JS-heavy SPA (prices via XHR, lazy content) - `web_fetch` returned an anti-scrape placeholder (Zhihu's "click here" stub, JD's chrome-only HTML) - You need to interact (click, fill input) before extracting Common patterns: fetch rendered text: url=X wait for content then read: url=X wait_for=".price" extract specific element: url=X selector=".product-list" click and read result: url=X click=".search-button" fill form, then read: url=X click="input[name=q]" type_text="kinclaw" fill + Enter (React forms): url=X click="input" type_text="hi" press_enter=true wait_for=".reply" screenshot the page: url=X screenshot=true (returns image:// marker) run JS and get result: url=X js="document.title" First-time setup (one-time per machine, ~500MB Chromium download): pip install playwright playwright install chromium

文档处理测试与质量
★ 9
LocalKinAI
LocalKinAI/kinclaw

weather

Current conditions plus a three-day forecast (today / tomorrow / day after) for a place, in metric, from wttr.in. No API key. Use this for any weather question — including "明天" and "后天" — before reaching for web search.

★ 9
LocalKinAI
LocalKinAI/kinclaw

tts

Synthesize speech from text and play it through the macOS speakers. Talks to a local LocalKin Service Audio Server (default :8001 / Kokoro). When `record` is running with audio=true, the spoken audio is captured into the recording — use this in place of `shell say` for high-quality multilingual narration in demo videos. Set the TTS_ENDPOINT env var to point at a different server.

图像与多媒体Skill与智能体开发
★ 9
LocalKinAI
LocalKinAI/kinclaw

translate

Translate text between languages using the system's translate command

★ 9
LocalKinAI
LocalKinAI/kinclaw

summarize

Summarize a file's contents into key bullet points

资料检索与研究
★ 9
LocalKinAI
LocalKinAI/kinclaw

stt

Transcribe an audio file (wav/mp3/mp4/m4a) into text via a local LocalKin Service Audio Server (default :8000 / SenseVoice). Pair with `record action=start mic=true` to turn a recorded mic track into text. Set STT_ENDPOINT env var to point at a different server.

图像与多媒体
★ 9