AGENT SKILL

api-sketches

Call nodetool.sketches from a code action: create a sketch (layered image document), read it, add, arrange and restyle layers, place images on layers, resize the canvas, validate it, render it to a PNG or PSD, manage its versions, and delete it. Load before the first call into nodetool.sketches.

License 许可
AGPL-3.0
最近更新
2026-11-15
Stars
★ 635
Forks
91

01 前言 Front Matter

name
api-sketches
description
Call nodetool.sketches from a code action: create a sketch (layered image document), read it, add, arrange and restyle layers, place images on layers, resize the canvas, validate it, render it to a PNG or PSD, manage its versions, and delete it. Load before the first call into nodetool.sketches.

03 SKILL.md 正文

nodetool.sketches

A sketch is an image document: a canvas, a stack of layers, and the bindings that say where the picture of a layer comes from. How to compose one is nodetool-sketch. This is the call reference. One finished image with no layers to keep is nodetool.media.generateImage, not a sketch.

Call Does Answers
list({query, limit}) Lists sketches, newest first. Rows with id, name and canvas size
create(name, {width, height, background_color, project_id, id}) Creates a blank canvas. The defaults are 1024×1024 on #ffffff. An existing id you own is returned instead of a copy. {image_document_id, …}
get(id) Reads the document: canvas, background, layers, bindings. Layer bitmaps stay opaque. The document
edit(id, ops) Applies layer ops in order and saves. An open editor picks the change up live. The result of each op
validate(idOrDocument, {width, height, background_color}) Checks the structure without a render. For an inline document, pass the canvas it is stored against so a mismatch is reported. {ok, issues}
render(idOrDocument, {format, width, height, background, layer_id, mask}) Composites the sketch as the editor does and saves it. format is "png" (default) or "psd". One of width and height alone keeps the aspect ratio. layer_id renders one layer alone, mask the inpainting mask. The PNG is transparent unless background is set. {image, width, height, layers}. image.uri is the saved asset. Each layer row says whether it was drawn and, if not, why
versions(id, {save_type, limit}), getVersion(id, n) Lists and reads whole-document snapshots. Version rows, newest first
snapshot(id, {name}) Saves a manual version. The version number
restore(id, n) Rolls back. The state it replaces is snapshotted first. The findings of the validation after the restore
deleteVersion(id, n) Deletes one snapshot. This cannot be undone. —
delete(id) Deletes the sketch and all its versions. This cannot be undone. Deleting every version leaves the sketch in place. {image_document_id, deleted}

Ops

target is a layer id, its name, or "active". Layer index 0 is the bottom layer.

Op Arguments
add_layer name?, type? ("raster" or "mask"), index?, image?, x?, y?, width?, height?
remove_layer target
rename_layer target, name
set_layer_props target, visible?, locked?, opacity?, blendMode?
set_layer_image target, image, x?, y?, width?, height?
reorder_layer target, index
duplicate_layer target
select_layer target
resize_canvas width, height
set_setup brief?, use_case?, variations?, stage? — the state of the guided image flow. It renders nothing.
  • image is an asset id, an asset:// locator, a data: URL or an http(s) URL. The layer points at it and the editor draws it at its natural size from the top-left of {x, y, width, height}, which defaults to the whole canvas. Pass the dimensions of the image when you know them.
  • use_case is scene, product, portrait, key-art, social, logo, concept or texture, and it also sets the canvas size.
  • Ops never paint. Painting and generation happen in an open editor or a workflow run. render is the one call that reads pixels, and it writes only the output asset.
const { image_document_id: id } = await nodetool.sketches.create("Poster",
  { width: 1080, height: 1350 });
await nodetool.sketches.edit(id, [
  { op: "add_layer", name: "Backdrop", image: bgUri },
  { op: "add_layer", name: "Product", image: productUri, x: 240, y: 300, width: 600, height: 600 },
  { op: "set_layer_props", target: "Product", blendMode: "normal", opacity: 1 }
]);
const check = await nodetool.sketches.validate(id);
const { image } = await nodetool.sketches.render(id, { width: 540 });

04 同仓库更多 Skills

nodetool-ai
nodetool-ai/nodetool

humanizer

Rewrite AI-sounding text so it reads like the writer without changing what it says. Use when editing or reviewing prose for AI tells: not-X-but-Y contrasts, one-line closers, staged openers, forced triads, dashes everywhere, inflated claims, sales language, stock AI words, bold labels, or filler.

★ 635
nodetool-ai
nodetool-ai/nodetool

nodetool

Use the NodeTool MCP server to build, validate, run, and debug visual AI workflows, and to work with assets, collections, and jobs. Use when the user mentions NodeTool or asks for a workflow graph, a node, or a media generation run on their NodeTool server.

开发工程师Skill与智能体开发
★ 635
nodetool-ai
nodetool-ai/nodetool

wan-2-6-prompting

Prompt Alibaba's Wan 2.6 video — text-to-video with a global style line plus timing-bracketed shots, and image-to-video that describes only what changes over time. Covers the shot-mode switch per provider, the prompt budget, negative prompts, motion intensity wording, audio input and prompt expansion. Use whenever the model id names a Wan 2.6 video route (alibaba/wan-2.6/text-to-video, alibaba/wan-2.6/image-to-video, wan-video/wan-2.6-t2v, wan-video/wan-2.6-i2v, wan-video/wan2.6-i2v-flash) on generate_video, animate_image or a TextToVideo node. Not for Wan 2.5 or 2.7, or the Wan 2.6 image routes.

图像与多媒体
★ 635
nodetool-ai
nodetool-ai/nodetool

video-workflow

Build a reusable NodeTool video workflow for batches or repeated inputs. For a single finished piece, use a storyboard skill.

图像与多媒体Skill与智能体开发
★ 635
nodetool-ai
nodetool-ai/nodetool

video-clone

Analyze a reference video and recreate its shot structure with a new product or cast in NodeTool.

图像与多媒体
★ 635
nodetool-ai
nodetool-ai/nodetool

video-audio-continuity

Keep sound continuous across a multi-scene piece cut from generated video — why one clip per scene hard-cuts the audio at every boundary, when to write all the scenes into a single generation instead, the sound-design vocabulary that survives a provider's copyright filter, and how to check the length, the aspect ratio and the mix of what came back. Use when a piece has more than one scene and the video model writes its own audio (Seedance 2, Veo 3, MiniMax H3, Kling 2.6 and later), or when a cut's sound drops out at the shot changes.

图像与多媒体
★ 635