AGENT SKILL

motion-painter

Receives SVG painting exports from the MotionPainter R1 Creation and saves them to your local machine.

License 许可
MIT
最近更新
2026-09-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
motion-painter
author
rabbit-r1-skillz
version
1.0.0
description
Receives SVG painting exports from the MotionPainter R1 Creation and saves them to your local machine.

02 资源文件 3

03 SKILL.md 正文

MotionPainter — OpenClaw Skill

This skill is the local-machine handler for the MotionPainter R1 Creation. When the user long-presses PTT inside the app, it sends the completed SVG artwork through the OpenClaw storage bridge. This skill receives the command, writes the SVG file to disk, and returns the saved path back to the device.

What This Skill Does

  1. Watches the OpenClaw shared-storage key openclaw:cmd for commands with skill: "motion-painter".
  2. On command: "save_svg", writes the SVG document to ~/Pictures/MotionPainter/<filename> (or a configured output directory).
  3. Writes a response to openclaw:resp with the full file path, so the R1 can speak the filename back to the user.
  4. Logs each export to ~/Pictures/MotionPainter/export-log.jsonl (one JSON line per export).

Setup

Prerequisites

  • Node.js 18+ or Python 3.10+ (either runtime works; instructions below cover Node.js)
  • OpenClaw running on your local machine and connected to the R1

Installation

# Clone or locate your local OpenClaw skills directory
cd ~/openclaw/skills

# Create the skill directory
mkdir motion-painter && cd motion-painter

# Create the skill entry point
touch index.js

Paste the following into index.js:

import fs from "fs";
import path from "path";
import os from "os";

const OUTPUT_DIR = path.join(os.homedir(), "Pictures", "MotionPainter");

fs.mkdirSync(OUTPUT_DIR, { recursive: true });

export default async function handler(command, params) {
  if (command !== "save_svg") {
    return { ok: false, error: `Unknown command: ${command}` };
  }

  const { filename, svg, palette, points, strokes } = params;

  if (!filename || !svg) {
    return { ok: false, error: "Missing filename or svg content" };
  }

  const safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "_");
  const outPath  = path.join(OUTPUT_DIR, safeName);

  fs.writeFileSync(outPath, svg, "utf8");

  const logEntry = JSON.stringify({
    ts:      Date.now(),
    file:    outPath,
    palette: palette ?? "unknown",
    points:  points  ?? 0,
    strokes: strokes ?? 0,
  });
  fs.appendFileSync(path.join(OUTPUT_DIR, "export-log.jsonl"), logEntry + "\n", "utf8");

  return { ok: true, path: outPath };
}

Register the Skill

Add motion-painter to your OpenClaw skills.config.json:

{
  "skills": [
    { "name": "motion-painter", "entry": "./skills/motion-painter/index.js" }
  ]
}

Restart OpenClaw. The skill is now active.

Output Location

Paintings are saved to:

~/Pictures/MotionPainter/motion-painting-<unix-timestamp>.svg

You can open them in any SVG viewer (browser, Inkscape, Affinity Designer, Figma import).

Changing the Output Directory

Edit the OUTPUT_DIR constant at the top of index.js to any absolute path on your machine.

Data Format Sent from R1

The R1 Creation sends the following payload via openclaw:cmd:

{
  "skill":   "motion-painter",
  "command": "save_svg",
  "params": {
    "filename": "motion-painting-1718300000000.svg",
    "svg":      "<full SVG document as string>",
    "palette":  "Ocean",
    "points":   847,
    "strokes":  12
  }
}

The skill must respond by writing to openclaw:resp:

{
  "status": "done",
  "ts":     1718300001000,
  "data": {
    "ok":   true,
    "path": "/Users/yourname/Pictures/MotionPainter/motion-painting-1718300000000.svg"
  }
}

Troubleshooting

"Save failed. Check OpenClaw is running." — The R1 timed out after 20 seconds waiting for a response. Verify OpenClaw is running and the skill is registered.

SVG file is empty or corrupt — Ensure the R1 had at least one completed stroke before long-pressing PTT. The app will say "Canvas is empty. Paint something first." if no strokes exist.

File permission error — Make sure the output directory is writable. Run mkdir -p ~/Pictures/MotionPainter && chmod 755 ~/Pictures/MotionPainter.

Wrong output directory on Windows — Change OUTPUT_DIR to an absolute Windows path, e.g. path.join("C:\\Users\\YourName\\Pictures\\MotionPainter").

04 同仓库更多 Skills

ajohnsonnow
ajohnsonnow/r1-warren

whisper-quiz

WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

walk-cast

Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters / Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-novel

Local machine skill for VoiceNovel — handles story export to disk.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-guide

Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people/vehicles/food/hazards/exits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-draft

Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-commit

Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git/CI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.

★ 0