draft-cli

Manage and interact with "Draft" pages and documents using the @innosage/draft-cli. Use this skill whenever the user explicitly asks to read, create, list, patch, or append content to a "Draft page", "Draft doc", or their "Draft workspace" (e.g., "my draft page named 'Founder Sync'", "all the pages I have in my draft workspace", "Draft CLI"). This connects to the Draft PWA (draft.innosage.co) via a local daemon to read or modify living documents. DO NOT use this skill for generalized writing tasks where "draft" is used as a verb (e.g., "draft an email", "draft a response") or when referring to local markdown/text files with "draft" in the name (e.g., "draft.md", "investor_update_draft.md"). Only use when interacting with the actual InnoSage Draft web application or Draft CLI tool. When triggered, ALWAYS follow the "Connection First" operational pattern: check status before any other command, and start the daemon if not connected.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "draft-cli" with this command: npx skills add innosage-llc/draft-skills/innosage-llc-draft-skills-draft-cli

Draft CLI Skill

Use the draft CLI to manage Draft pages directly from the command line. This allows you to work with Draft documents seamlessly without leaving your terminal workflow.

Setup and Connection

Before running Draft CLI commands, you must ensure the Draft CLI package is globally installed:

npm install -g @innosage/draft-cli

Operational Pattern: Always Check Connection First

To ensure a stable session, you MUST follow this sequence before executing any functional Draft command (like ls, cat, create, etc.):

  1. Check Status: Always start by running draft status.
  2. Handle Disconnection: If draft status reports that it is not connected (e.g., "not connected", "PWA is not connected", or ECONNREFUSED), you MUST attempt to connect.
  3. Start Daemon: Run draft daemon [url].
    • The [url] parameter is optional and defaults to the production environment (https://draft.innosage.co).
    • Only specify a [url] if the user explicitly instructs you to use a specific staging or development environment.
  4. Verify: After starting the daemon, run draft status again to confirm the "Locked Connection" is established.
# 1. ALWAYS start with status
draft status

# 2. If NOT connected, start the daemon (url defaults to production)
draft daemon

# 3. Confirm connection is stable
draft status

[!IMPORTANT] The Draft CLI operates by establishing a 1:1 secure "Locked Connection" with a single Draft PWA tab. Starting the daemon will automatically launch a securely trusted tab. If you encounter a connection error later in the session, repeat this status-check-and-daemon-start sequence.

Command Reference

The Draft CLI uses conventional command structures.

Listing and Reading

To see all available pages in the user's Draft workspace:

# Requires active connection
draft ls

Output includes the page id, title, and parentId. You need the id to read or modify a page.

To read the content of a specific page:

# Returns the page in rich Markdown format (default)
draft cat <id>

# Other available formats if you need raw data:
draft cat <id> --format json
draft cat <id> --format raw

Creating and Modifying

To create a brand new page:

draft create "My New Page Title"

To append content to the END of a page. You can pass the content as a string, but for multiline Markdown, it is usually safer and much more robust to pipe it via stdin:

# Simple append
draft append <id> "This is a new line at the bottom."

# Multiline append via stdin (RECOMMENDED)
cat << 'EOF' | draft append <id>
## New Section
- Item 1
- Item 2
EOF

To replace the content underneath a specific heading (up until the next heading of the same or higher level). This is incredibly useful for updating specific sections like "Status" or "Action Items" without overwriting the whole document.

cat << 'EOF' | draft replace <id> --heading "Status"
This is the new status content. Everything previously under the 'Status' heading was replaced by this text.
EOF

To apply a precise unified diff to a page. This is best for surgical edits to existing paragraphs.

cat patch.diff | draft patch <id>

Common Workflows

1. The Edit Cycle (Read, Modify, Verify) ALWAYS follow the "Connection First" pattern, then read the page before modifying it.

# 1. Check/Start Connection
draft status
# (if needed: draft daemon && draft status)

# 2. Read
draft ls
draft cat abc-123-def

# 3. Modify
cat << 'EOF' | draft append abc-123-def
New content...
EOF

# 4. Verify
draft cat abc-123-def

2. Switching Tabs/Context (Locked Connection) The Draft daemon secures a strict 1:1 lock with the tab it opened. Multi-tab conflicts are eliminated because second tabs cannot connect to a locked daemon. If you need to connect to a new document session:

  1. Kill the running daemon (e.g., Ctrl+C or kill the process).
  2. Run draft daemon again to generate a new token and open a new locked tab.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated