mail_draft
Create a Mail draft (saved, not sent) with subject + body and an optional attachment. Uses Mail's AppleScript dictionary directly: `make new outgoing message` then `save` (NOT `send`). The draft appears in the Drafts mailbox of the default account. This is the CORRECT path for any task that says "save as Mail draft" / "share via Mail as draft". Common wrong path: agents open a compose window with Cmd+N, type subject + body, then close with Cmd+W — that prompts a Save sheet they often skip, losing the draft. This skill bypasses the compose window entirely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-01
- Stars
- ★ 9
- Forks
- 3
01 前言 Front Matter
- args
- [ "{{subject}}", "{{body}}", "{{attachment}}", "{{to}}" ]
- name
- mail_draft
- schema
- { "to": { "type": "string", "default": "", "required": false, "description": "Recipient email address (optional — drafts can have empty to)" }, "body": { "type": "string", "default": "", "required": false, "description": "Plain-text body of the email" }, "subject": { "type": "string", "required": true, "description": "Email subject line (required)" }, "attachment": { "type": "string", "default": "", "required": false, "description": "Absolute POSIX path to a file to attach (optional)" } }
- command
- [ "sh", "-c", "SUBJECT=\"$1\"; BODY=\"$2\"; ATTACH=\"$3\"; TO=\"$4\"\n[ -z \"$SUBJECT\" ] && { echo \"subject required\" >&2; exit 1; }\n\n# Escape backslashes and double-quotes for AppleScript string literals.\nesc() { printf '%s' \"$1\" | /usr/bin/sed -e 's/\\\\/\\\\\\\\/g' -e 's/\"/\\\\\"/g'; }\nSUBJECT_E=\"$(esc \"$SUBJECT\")\"\nBODY_E=\"$(esc \"$BODY\")\"\nTO_E=\"$(esc \"$TO\")\"\n# ATTACH is a path — leave it as-is for POSIX file coercion\n\nosascript 2>&1 <<APPLE\ntell application \"Mail\"\n set newMsg to make new outgoing message with properties ¬\n {subject:\"$SUBJECT_E\", content:\"$BODY_E\", visible:false}\n if \"$TO_E\" is not \"\" then\n try\n tell newMsg to make new to recipient at end of to recipients ¬\n with properties {address:\"$TO_E\"}\n end try\n end if\n if \"$ATTACH\" is not \"\" then\n try\n tell newMsg to make new attachment ¬\n with properties {file name:(POSIX file \"$ATTACH\")}\n on error errMsg\n save newMsg\n return \"draft_saved_no_attach: \" & errMsg\n end try\n end if\n save newMsg\n return \"draft_saved\"\nend tell\nAPPLE\n", "_" ]
- timeout
- 30
- description
- Create a Mail draft (saved, not sent) with subject + body and an optional attachment. Uses Mail's AppleScript dictionary directly: `make new outgoing message` then `save` (NOT `send`). The draft appears in the Drafts mailbox of the default account. This is the CORRECT path for any task that says "save as Mail draft" / "share via Mail as draft". Common wrong path: agents open a compose window with Cmd+N, type subject + body, then close with Cmd+W — that prompts a Save sheet they often skip, losing the draft. This skill bypasses the compose window entirely.
03 SKILL.md 正文
mail_draft — create + save a Mail draft (no send)
Wraps the canonical AppleScript Mail draft pattern. save commits
the message to the Drafts mailbox without sending. send is NEVER
called from this skill.
Examples
mail_draft subject="KinBench Share 167" body="forwarding the note"
→ draft_saved
mail_draft subject="KinBench 369" body="see attached" attachment="/Users/me/Desktop/kinbench/369-note.pdf"
→ draft_saved
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.