notes_format
Apply a Notes-app text format (bold / italic / underline / title / heading / subheading / body) to text in a note. Handles selection + format keystroke + verification. The #1 mistake agents make: pressing Cmd+B without selecting text first. Notes' format shortcuts only act on the current selection; no selection = no-op. This skill always selects first.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-01
- Stars
- ★ 9
- Forks
- 3
01 前言 Front Matter
- args
- [ "{{note}}", "{{format}}", "{{selection}}" ]
- name
- notes_format
- schema
- { "note": { "type": "string", "required": true, "description": "Exact note title" }, "format": { "type": "string", "required": true, "description": "bold | italic | underline | title | heading | subheading | body" }, "selection": { "type": "string", "default": "all", "required": false, "description": "all (Cmd+A whole body — default) | first_line | last_line" } }
- command
- [ "sh", "-c", "NOTE=\"$1\"; FORMAT=\"$2\"; SELECTION=\"$3\"\n[ -z \"$NOTE\" ] && { echo \"note title required\" >&2; exit 1; }\n[ -z \"$FORMAT\" ] && { echo \"format required\" >&2; exit 1; }\n[ -z \"$SELECTION\" ] && SELECTION=\"all\"\n\n# Map format → keystroke\ncase \"$FORMAT\" in\n bold) KS_KEY=\"b\"; KS_MOD=\"command\" ;;\n italic) KS_KEY=\"i\"; KS_MOD=\"command\" ;;\n underline) KS_KEY=\"u\"; KS_MOD=\"command\" ;;\n title) KS_KEY=\"1\"; KS_MOD=\"command_option\" ;;\n heading) KS_KEY=\"2\"; KS_MOD=\"command_option\" ;;\n subheading) KS_KEY=\"3\"; KS_MOD=\"command_option\" ;;\n body) KS_KEY=\"4\"; KS_MOD=\"command_option\" ;;\n *) echo \"unknown format '$FORMAT' — use bold|italic|underline|title|heading|subheading|body\" >&2; exit 1 ;;\nesac\n\n# Select the note, focus body, then select-all + apply format\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\ntell application \"System Events\"\n tell process \"Notes\"\n -- Click the note body so keystrokes go there. The body is the\n -- ScrollArea / TextArea inside the main window. We try the\n -- canonical AX path; on failure, fall back to a generic click.\n try\n set mainWin to window 1\n try\n set bodyArea to text area 1 of scroll area 1 of group 1 of splitter group 1 of mainWin\n perform action \"AXFocus\" of bodyArea\n end try\n end try\n end tell\nend tell\ndelay 0.3\n\n-- Select per SELECTION arg\ntell application \"System Events\"\n if \"$SELECTION\" is \"all\" then\n keystroke \"a\" using {command down}\n else if \"$SELECTION\" is \"first_line\" then\n -- Cmd+Up to top, then Shift+End to extend selection to end of line\n key code 126 using {command down}\n key code 119 using {shift down}\n else if \"$SELECTION\" is \"last_line\" then\n key code 125 using {command down}\n key code 115 using {shift down}\n end if\nend tell\ndelay 0.2\n\n-- Apply format\ntell application \"System Events\"\n if \"$KS_MOD\" is \"command\" then\n keystroke \"$KS_KEY\" using {command down}\n else\n keystroke \"$KS_KEY\" using {command down, option down}\n end if\nend tell\ndelay 0.3\nreturn \"ok: $FORMAT applied to $SELECTION\"\nAPPLE\n", "_" ]
- timeout
- 15
- description
- Apply a Notes-app text format (bold / italic / underline / title / heading / subheading / body) to text in a note. Handles selection + format keystroke + verification. The #1 mistake agents make: pressing Cmd+B without selecting text first. Notes' format shortcuts only act on the current selection; no selection = no-op. This skill always selects first.
03 SKILL.md 正文
notes_format — apply Notes formatting reliably
Wraps the select-then-format pattern that agents routinely get wrong. Always selects text BEFORE pressing the format keystroke, so the format applies to something rather than no-op'ing.
Examples
notes_format note="KinBench Bold 173" format=bold
→ ok: bold applied to all
notes_format note="KinBench Heading 174" format=title selection=first_line
→ ok: title applied to first_line
Format → keystroke mapping
| format | macOS shortcut |
|---|---|
| bold | Cmd+B |
| italic | Cmd+I |
| underline | Cmd+U |
| title | Cmd+Opt+1 (largest) |
| heading | Cmd+Opt+2 |
| subheading | Cmd+Opt+3 |
| body | Cmd+Opt+4 |
04 同仓库更多 Skills
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
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.
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.
translate
Translate text between languages using the system's translate command
summarize
Summarize a file's contents into key bullet points
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.