← 返回 Skills 市场
nerveband

Drafts CLI

作者 nerveband · GitHub ↗ · v1.0.0
darwin ✓ 安全检测通过
2051
总下载
1
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install drafts
功能描述
Manage Drafts app notes via CLI on macOS. Create, view, list, edit, append, prepend, and run actions on drafts. Use when a user asks to create a note, list drafts, search drafts, or manage their Drafts inbox. IMPORTANT - Drafts app must be running on macOS for this to work.
使用说明 (SKILL.md)

Drafts CLI

Manage Drafts notes from the terminal on macOS.

IMPORTANT REQUIREMENTS

This CLI ONLY works on macOS with Drafts app running.

  • macOS only - Uses AppleScript, will not work on Linux/Windows
  • Drafts must be RUNNING - The app must be open for any command to work
  • Drafts Pro required - Automation features require Pro subscription

If commands fail or hang, first check: open -a Drafts

Setup

Install via Go:

go install github.com/nerveband/drafts/cmd/drafts@latest

Or build from source:

git clone https://github.com/nerveband/drafts
cd drafts && go build ./cmd/drafts

Commands

Create a Draft

# Simple draft
drafts create "Meeting notes for Monday"

# With tags
drafts create "Shopping list" -t groceries -t todo

# Flagged draft
drafts create "Urgent reminder" -f

# Create in archive
drafts create "Reference note" -a

List Drafts

# List inbox (default)
drafts list

# List archived drafts
drafts list -f archive

# List trashed drafts
drafts list -f trash

# List all drafts
drafts list -f all

# Filter by tag
drafts list -t mytag

Get a Draft

# Get specific draft
drafts get \x3Cuuid>

# Get active draft (currently open in Drafts)
drafts get

Modify Drafts

# Prepend text
drafts prepend "New first line" -u \x3Cuuid>

# Append text
drafts append "Added at the end" -u \x3Cuuid>

# Replace entire content
drafts replace "Completely new content" -u \x3Cuuid>

Edit in Editor

drafts edit \x3Cuuid>

Run Actions

# Run action on text
drafts run "Copy" "Text to copy to clipboard"

# Run action on existing draft
drafts run "Copy" -u \x3Cuuid>

Get Schema

# Full schema for LLM integration
drafts schema

# Schema for specific command
drafts schema create

Output Format

JSON (default) - All commands return structured JSON:

{
  "success": true,
  "data": {
    "uuid": "ABC123",
    "content": "Note content",
    "title": "Note title",
    "tags": ["tag1", "tag2"],
    "folder": "inbox"
  }
}

Plain text - Human-readable output:

drafts list --plain

Common Workflows

Quick Capture

drafts create "Remember to call dentist tomorrow" -t reminder

Daily Journal

drafts append "$(date): Completed project review" -u \x3Cjournal-uuid>

Search and Review

# List all drafts with a specific tag
drafts list -t work

# Get full content of a draft
drafts get \x3Cuuid>

Troubleshooting

Commands fail or return empty:

  1. Is Drafts running? → open -a Drafts
  2. Is Drafts Pro active? → Automation requires Pro
  3. Permissions granted? → System Settings > Privacy > Automation

Commands hang:

  • Check if Drafts is showing a dialog

Notes

  • macOS ONLY (AppleScript-based)
  • Drafts app MUST be running
  • Requires Drafts Pro subscription
  • All UUIDs are Drafts-generated identifiers
  • Tags are case-sensitive

Version

Latest (from go install)

安全使用建议
This skill appears coherent and limited to managing Drafts via a local CLI on macOS. Before installing or using it: (1) confirm you are on macOS and have the Drafts app (and Drafts Pro if you need automation features); (2) inspect the GitHub repo (https://github.com/nerveband/drafts) before running 'go install' or building from source — installing will fetch and run third-party code that can read/write your Drafts; (3) ensure the 'drafts' binary on PATH is the intended one (to avoid command hijacking); and (4) if you allow the agent to call skills autonomously, remember it will be able to create, modify, and read your Drafts notes when invoked.
功能分析
Type: OpenClaw Skill Name: drafts Version: 1.0.0 The skill bundle is designed to manage Drafts app notes on macOS via a CLI tool. It transparently instructs the agent to install the `drafts` binary from a public GitHub repository using `go install` and then provides commands to interact with it. There is no evidence of data exfiltration, malicious execution, persistence, obfuscation, or prompt injection attempts against the agent to perform actions beyond its stated purpose. The shell access and potential broad permissions are inherent to the skill's function of interacting with a macOS application via a CLI, and are clearly aligned with its stated purpose in `SKILL.md`.
能力评估
Purpose & Capability
Name/description match the declared requirements: the skill is macOS-only, requires a 'drafts' CLI binary, and operates against the Drafts app. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to use the 'drafts' CLI and notes Drafts must be running; it does not ask the agent to read unrelated files, environment variables, or send data to unexpected endpoints. All described commands (create, list, get, append, run actions) are consistent with managing Drafts.
Install Mechanism
There is no platform install spec; SKILL.md suggests installing the CLI via 'go install' or building from source on GitHub. That is expected for a CLI, but installing executes code fetched from a third-party repo — the user should vet the repo before running the install.
Credentials
The skill requests no environment variables, credentials, or config paths. This is appropriate for a local CLI that interacts with the Drafts app.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request persistent system-wide privileges or modify other skills. Note: as with any skill that can be invoked autonomously, it can read/write Drafts content when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install drafts
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /drafts 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Full Drafts app integration
元数据
Slug drafts
版本 1.0.0
许可证
累计安装 4
当前安装数 4
历史版本数 1
常见问题

Drafts CLI 是什么?

Manage Drafts app notes via CLI on macOS. Create, view, list, edit, append, prepend, and run actions on drafts. Use when a user asks to create a note, list drafts, search drafts, or manage their Drafts inbox. IMPORTANT - Drafts app must be running on macOS for this to work. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2051 次。

如何安装 Drafts CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install drafts」即可一键安装,无需额外配置。

Drafts CLI 是免费的吗?

是的,Drafts CLI 完全免费(开源免费),可自由下载、安装和使用。

Drafts CLI 支持哪些平台?

Drafts CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin)。

谁开发了 Drafts CLI?

由 nerveband(@nerveband)开发并维护,当前版本 v1.0.0。

💬 留言讨论