← 返回 Skills 市场
atomtanstudio

Craft API Skill and Obsidian Migration Tool

作者 Atom Tan Studio · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1862
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install craft-do
功能描述
Integrate with Craft.do to automate tasks, create/manage documents and folders, edit markdown content, and migrate Obsidian vaults using their REST API.
使用说明 (SKILL.md)

Craft.do Integration Skill

Complete REST API integration for Craft.do - the beautiful note-taking and document app.

Overview

This skill provides full programmatic access to Craft.do for:

  • Task automation: Create, update, manage tasks across inbox/daily notes/logbook
  • Document workflows: Programmatically create, read, organize documents
  • Folder management: Build nested folder hierarchies via API
  • Obsidian migration: One-time full vault migration with content preservation
  • Content manipulation: Add/edit markdown content via blocks API

Craft.do features:

  • Native markdown support
  • Task management (inbox, daily notes, logbook)
  • Collections (database tables)
  • Hierarchical folders and documents
  • Full REST API access

Setup

  1. Get your API key from Craft.do settings
  2. Store credentials securely:
export CRAFT_API_KEY="pdk_xxx"
export CRAFT_ENDPOINT="https://connect.craft.do/links/YOUR_LINK/api/v1"

API Capabilities

✅ What Works

List Folders

curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/folders"

Returns all locations: unsorted, daily_notes, trash, templates, and custom folders.

List Documents

curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/documents?folderId=FOLDER_ID"

Create Folder (with optional parent for nesting)

# Root-level folder
curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "folders": [{
      "name": "Projects"
    }]
  }' \
  "$CRAFT_ENDPOINT/folders"

# Nested folder (requires parent folder ID)
curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "folders": [{
      "name": "Q1 2024",
      "parentFolderId": "PARENT_FOLDER_ID"
    }]
  }' \
  "$CRAFT_ENDPOINT/folders"

Create Document

curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [{
      "title": "Document Title"
    }],
    "destination": {
      "folderId": "FOLDER_ID"
    }
  }' \
  "$CRAFT_ENDPOINT/documents"

Note: Documents are created without content initially. Use the /blocks endpoint to add content.

Add Content to Document

curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blocks": [{
      "type": "text",
      "markdown": "# Document content\
\
Full markdown support!"
    }],
    "position": {
      "pageId": "DOCUMENT_ID",
      "position": "end"
    }
  }' \
  "$CRAFT_ENDPOINT/blocks"

Read Document Content

curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/blocks?id=DOCUMENT_ID"

Returns full markdown content with all blocks.

Create Task

curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tasks": [{
      "markdown": "Task description",
      "location": {"type": "inbox"},
      "status": "active"
    }]
  }' \
  "$CRAFT_ENDPOINT/tasks"

Update Task (Mark Complete)

curl -X PUT \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tasksToUpdate": [{
      "id": "TASK_ID",
      "markdown": "- [x] Completed task"
    }]
  }' \
  "$CRAFT_ENDPOINT/tasks"

List Tasks

# Active tasks
curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=active"

# All completed (logbook)
curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=logbook"

# Upcoming
curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=upcoming"

# Inbox only
curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=inbox"

Move Documents

curl -X PUT \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documentIds": ["DOC_ID"],
    "destination": {"location": "unsorted"}
  }' \
  "$CRAFT_ENDPOINT/documents/move"

Note: Can only move to unsorted, templates, or custom folder IDs. Cannot move directly to trash.

❌ Limitations

  • No Collections API - Collections (databases) not accessible via API
  • No task deletion - Can only create/update tasks, not delete
  • No document deletion - Cannot delete documents directly (only move)
  • No search endpoint - Search requires specific query format (needs more testing)
  • Limited filtering - Collections filtering/grouping only in UI, not via API

Common Use Cases

Sync Tasks from External System

# Create task in Craft from Mission Control
TASK_TITLE="Deploy new feature"
curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"tasks\": [{
      \"markdown\": \"$TASK_TITLE\",
      \"location\": {\"type\": \"inbox\"},
      \"status\": \"active\"
    }]
  }" \
  "$CRAFT_ENDPOINT/tasks"

Create Daily Note

TODAY=$(date +%Y-%m-%d)
curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"documents\": [{
      \"title\": \"Daily Note - $TODAY\",
      \"content\": [{\"textContent\": \"# $TODAY\\
\\
## Tasks\\
\\
## Notes\\
\"}],
      \"location\": \"daily_notes\"
    }]
  }" \
  "$CRAFT_ENDPOINT/documents"

Archive Completed Work

# Get all completed tasks
curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=logbook" | jq '.items[] | {id, markdown, completedAt}'

Integration Patterns

Mission Control → Craft Sync

Problem: Mission Control has automation but ugly UI. Craft has beautiful UI but no automation.

Solution: Use Mission Control as the source of truth, sync completed work to Craft for viewing.

#!/bin/bash
# sync-to-craft.sh - Sync completed tasks to Craft

# Read completed tasks from Mission Control
COMPLETED_TASKS=$(cat mission-control/tasks.json | jq -r '.[] | select(.status=="done") | .title')

# Push each to Craft
echo "$COMPLETED_TASKS" | while read -r task; do
  curl -X POST \
    -H "Authorization: Bearer $CRAFT_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{
      \"tasks\": [{
        \"markdown\": \"- [x] $task\",
        \"location\": {\"type\": \"inbox\"}
      }]
    }" \
    "$CRAFT_ENDPOINT/tasks"
done

Markdown Support

Craft fully supports markdown:

  • Headers: # H1, ## H2, etc.
  • Lists: - item, 1. item
  • Tasks: - [ ] todo, - [x] done
  • Links: [text](url)
  • Code: `inline` or ```block```
  • Emphasis: *italic*, **bold**

All content is stored and returned as markdown, making it perfect for programmatic manipulation.

Best Practices

  1. Store API key securely - Never commit to code
  2. Test in unsorted folder first - Easy to find/clean up
  3. Use markdown format - Native to both systems
  4. One-way sync only - Craft → read-only, Mission Control → write
  5. Batch operations - API supports arrays for efficiency
  6. Handle errors gracefully - API returns detailed validation errors

Error Handling

Common errors:

  • VALIDATION_ERROR - Check required fields (markdown, location)
  • 403 - Invalid/expired API key
  • 404 - Document/task ID not found

Example validation error:

{
  "error": "Validation failed",
  "code": "VALIDATION_ERROR",
  "details": [{
    "path": ["tasks", 0, "markdown"],
    "message": "Invalid input: expected string"
  }]
}

Future Possibilities

When Craft adds to their API:

  • Collections CRUD via API
  • Task deletion
  • Document deletion
  • Advanced search
  • Webhooks for real-time sync
  • Batch operations for large datasets

Resources

Testing Checklist

  • List folders
  • List documents
  • Create document
  • Add content to document (via /blocks endpoint)
  • Read document content
  • Create task
  • Update task (mark complete)
  • List tasks (all scopes)
  • Move documents between locations
  • Full Obsidian → Craft migration with content
  • Search (needs format refinement)
  • Collections - NOT accessible via API
  • Delete tasks - NOT supported
  • Delete documents - NOT supported (only move)

Example: Complete Workflow

# 1. Create a project folder
PROJECT_ID=$(curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q1 2024 Projects"}' \
  "$CRAFT_ENDPOINT/folders" | jq -r '.id')

# 2. Create a project document
DOC_ID=$(curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"documents\": [{
      \"title\": \"Project Alpha\",
      \"content\": [{\"textContent\": \"## Overview\\
\\
Project details here.\"}],
      \"location\": \"$PROJECT_ID\"
    }]
  }" \
  "$CRAFT_ENDPOINT/documents" | jq -r '.items[0].id')

# 3. Create tasks for the project
curl -X POST \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tasks": [
      {"markdown": "Design wireframes", "location": {"type": "inbox"}},
      {"markdown": "Build prototype", "location": {"type": "inbox"}},
      {"markdown": "User testing", "location": {"type": "inbox"}}
    ]
  }' \
  "$CRAFT_ENDPOINT/tasks"

# 4. Mark first task complete
TASK_ID=$(curl -H "Authorization: Bearer $CRAFT_API_KEY" \
  "$CRAFT_ENDPOINT/tasks?scope=active" | jq -r '.items[0].id')

curl -X PUT \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"tasksToUpdate\": [{
      \"id\": \"$TASK_ID\",
      \"markdown\": \"- [x] Design wireframes\"
    }]
  }" \
  "$CRAFT_ENDPOINT/tasks"

Status: Tested and working (2026-01-31) Tested with: Craft API v1 Author: Eliza

安全使用建议
Do not install blindly. Before using: (1) Inspect the migrate-obsidian*.sh, craft-api.sh, and cleanup scripts line-by-line to confirm exactly which files/paths are read and uploaded; (2) Only provide a Craft API key with the minimum required scope and consider creating a dedicated/limited account for migration; (3) Prefer running the migration scripts manually in a sandboxed environment (not allowing the agent to run them autonomously); (4) Set disableModelInvocation=true or otherwise prevent autonomous invocation if you don't want the model to trigger uploads; (5) Verify the CRAFT_ENDPOINT value is the official Craft endpoint (avoid custom/personal servers); (6) Backup your vault before running and test on a small subset first. The inconsistencies between declared requirements and what the skill actually asks for are the main red flags.
功能分析
Type: OpenClaw Skill Name: craft-do Version: 1.0.0 The skill bundle provides legitimate integration with Craft.do, including tools for Obsidian vault migration, task management, and document organization. All scripts (`cleanup-craft.sh`, `craft-api.sh`, `migrate-obsidian-nested.sh`, `migrate-obsidian.sh`) use `curl` to interact with a user-defined Craft.do API endpoint and API key. File system access is limited to reading user-specified Obsidian vault paths and example `mission-control` JSON files for data synchronization, which is directly aligned with the stated purpose. There is no evidence of unauthorized data exfiltration, malicious execution, persistence mechanisms, obfuscation, or prompt injection attempts to subvert the agent's intended behavior.
能力评估
Purpose & Capability
The skill name/README advertise Craft API integration plus an Obsidian vault migration. That purpose would legitimately require an API key and access to the local Obsidian vault. However the registry metadata declares no required environment variables or config paths while SKILL.md explicitly instructs users to set CRAFT_API_KEY and CRAFT_ENDPOINT and the package contains multiple migration shell scripts. The mismatch between declared requirements and the actual instructions/files is incoherent.
Instruction Scope
SKILL.md contains curl examples that upload content to a remote Craft endpoint and promises a 'one-time full vault migration.' The included shell scripts (migrate-obsidian*.sh, cleanup-craft.sh, craft-api.sh) strongly imply filesystem traversal and bulk upload behavior. That means the skill's runtime behavior can read many local files (notes, attachments) and send them to an external service — a scope that should be explicit and justified but isn't in the metadata or permissions.
Install Mechanism
No install spec is provided (instruction-only). That lowers the risk of arbitrary remote code download during installation. However the skill still ships multiple executable shell scripts that the agent could run at runtime; there is no automated installer, so the scripts will execute in the agent environment if invoked.
Credentials
The registry lists no required env vars or primary credential, but SKILL.md requires CRAFT_API_KEY and CRAFT_ENDPOINT. That inconsistency means the manifest understates secrets needed. The skill will need (and asks for) a bearer API key that grants write access to your Craft account — a sensitive credential that should be declared explicitly and scoped to the minimum privileges.
Persistence & Privilege
No special 'always' flag is set, but disable-model-invocation is not set (model invocation is allowed by default). Allowing autonomous model invocation combined with scripts that can read and upload entire vaults and an API key is a notable risk: the skill could be triggered by the model and perform data transfer without an explicit user action unless model invocation is disabled.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install craft-do
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /craft-do 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial Release.
元数据
Slug craft-do
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Craft API Skill and Obsidian Migration Tool 是什么?

Integrate with Craft.do to automate tasks, create/manage documents and folders, edit markdown content, and migrate Obsidian vaults using their REST API. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1862 次。

如何安装 Craft API Skill and Obsidian Migration Tool?

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

Craft API Skill and Obsidian Migration Tool 是免费的吗?

是的,Craft API Skill and Obsidian Migration Tool 完全免费(开源免费),可自由下载、安装和使用。

Craft API Skill and Obsidian Migration Tool 支持哪些平台?

Craft API Skill and Obsidian Migration Tool 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Craft API Skill and Obsidian Migration Tool?

由 Atom Tan Studio(@atomtanstudio)开发并维护,当前版本 v1.0.0。

💬 留言讨论