openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > 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.

开发与 DevOps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.0

统计:⭐ 1 · 1.8k · 4 current installs · 4 all-time installs

1

安装量(当前) 4

🛡 VirusTotal :良性 · OpenClaw :良性

Package:drafts

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :良性

OpenClaw 评估

The skill is internally consistent with its stated purpose: it requires the Drafts CLI on macOS and its instructions stay within that scope — review the upstream GitHub repo before installing the CLI binary because installing/running it gives that code access to your Drafts data.

目的

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.

说明范围

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.

安装机制

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.

证书

The skill requests no environment variables, credentials, or config paths. This is appropriate for a local CLI that interacts with the Drafts app.

持久

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.

综合结论

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' bina…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Drafts CLI」。简介:Manage Drafts app notes via CLI on macOS. Create, view, list, edit, append, pre…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/nerveband/drafts/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: drafts
description: 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.
homepage: https://github.com/nerveband/drafts
metadata: {"clawdbot":{"emoji":"📋","os":["darwin"],"requires":{"bins":["drafts"]}}}
---

# Drafts CLI

Manage [Drafts](https://getdrafts.com) 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:
```bash
go install github.com/nerveband/drafts/cmd/drafts@latest
```

Or build from source:
```bash
git clone https://github.com/nerveband/drafts
cd drafts && go build ./cmd/drafts
```

## Commands

### Create a Draft

```bash
# 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

```bash
# 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

```bash
# Get specific draft
drafts get <uuid>

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

### Modify Drafts

```bash
# Prepend text
drafts prepend "New first line" -u <uuid>

# Append text
drafts append "Added at the end" -u <uuid>

# Replace entire content
drafts replace "Completely new content" -u <uuid>
```

### Edit in Editor

```bash
drafts edit <uuid>
```

### Run Actions

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

# Run action on existing draft
drafts run "Copy" -u <uuid>
```

### Get Schema

```bash
# Full schema for LLM integration
drafts schema

# Schema for specific command
drafts schema create
```

## Output Format

**JSON (default)** - All commands return structured JSON:
```json
{
  "success": true,
  "data": {
    "uuid": "ABC123",
    "content": "Note content",
    "title": "Note title",
    "tags": ["tag1", "tag2"],
    "folder": "inbox"
  }
}
```

**Plain text** - Human-readable output:
```bash
drafts list --plain
```

## Common Workflows

### Quick Capture
```bash
drafts create "Remember to call dentist tomorrow" -t reminder
```

### Daily Journal
```bash
drafts append "$(date): Completed project review" -u <journal-uuid>
```

### Search and Review
```bash
# List all drafts with a specific tag
drafts list -t work

# Get full content of a draft
drafts get <uuid>
```

## 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)