NodeTool 迷你应用构建
nodetool-app-builder
构建或修复 NodeTool 迷你应用:操作、部件、绑定、变量、资源。当交付物是供人运行的界面而非图(graph)时使用。
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 635
- Forks
- 91
01 前言 Front Matter
- name
- nodetool-app-builder
- featured
- true
- description
- Build or repair a NodeTool mini app: operations, widgets, bindings, variables, resources. Use when the deliverable is a screen a person runs, not a graph.
03 SKILL.md 正文
Build NodeTool mini apps
A mini app is a screen over one or more workflows: widgets bound to Input and
Output nodes, a run trigger, and the variables that hold what the app remembers.
The graph stays the graph. The app is a second document (ApplicationDocument)
that names it.
Use this skill when the user wants something to click. Use
nodetool-workflow-builder when the deliverable is the graph itself, and fix
the graph there first: an app over a broken workflow only reports that the app
is broken.
The workflow decides what the app can do
Before placing a widget, confirm the bound workflow satisfies all four. Each one is a wiring failure the app surface cannot work around.
- Anything the user changes needs an Input node. The exception is a node
setting, reachable through an
op:<id>/prop:<nodeId>#<prop>binding. - Anything the user sees needs an Output node. A graph that ends without one produces nothing an app can display.
- Every input needs a default, so the first run is one click.
- Run the workflow on its own first (
nodetool debug, orrun_workflow).
The loop
- Find or create the app.
list_apps, thenget_app. New app:create_app {name, description, project_id?, from_workflow_id?}.from_workflow_idbinds the first operation, so there is something to run the moment a widget lands. - Read the editor.
edit_app {application_id, steps: []}with no steps returns the tool catalog and the app's current state. Do this before the first edit in a session rather than guessing a schema. - Declare the operations. One operation is one workflow plus its wiring
(
ui_app_add_operation). An app with several modes has several operations, each with its own state. - Read the bindable surface.
ui_app_get_binding_targetslists the inputs, outputs, node settings and variables that exist. It covers the workflows the app's operations name; to bind a workflow the app does not use yet, pass it inedit_app {workflow_ids: [...]}. Bindings point at node ids, so a rename in the graph editor never breaks the app. Never invent a binding string. - Place and wire the widgets.
ui_app_add_component/ui_app_update_component, plusui_app_declare_variablefor anything the app remembers andui_app_add_resourcefor a document it reads or edits. Read Mini app contract below for the widget catalog, binding forms, actions, conditions and format filters. - Check the wiring.
debug_app {application_id, run: false}. Free, instant, and the only thing that catches a binding pointing at nothing. Run it after every edit pass. - Run it.
debug_app {application_id, interact: [...]}executes the real workflows and spends real money.rundefaults totrue, so a baredebug_app {application_id}also runs them. Confirm with the user before a run that calls paid models, and run it to confirm the app works, not to explore. A long run takes minutes: raisetimeout_ms.poll: truereturns a session id that only the HTTP API (GET /api/debug/sessions/<id>) reads, and no agent tool does. - Report the app id, its operations, and the verdict. Do not claim an app
works on a
run: falsecheck alone.
edit_app applies its steps in order against the saved document and writes once
at the end. Pass base_updated_at to refuse the save if the app changed
underneath. With the app open in a browser, the same tools are callable directly
as ui_app_* against the live document.
Four verdict failures that are not about the graph
debug_app reports these, and each one is an app-layer mistake with a fixed
remedy.
| Verdict | What it means | Fix |
|---|---|---|
| Binding references a missing input/output/variable | The widget points at a node the workflow no longer has | Re-read ui_app_get_binding_targets and rebind |
| No run trigger | Nothing in the app can start an operation | Add a Button with a run action, or a change event |
| Display widget never receives a value | The bound output produced nothing on a completed run | Check the Output node is connected in the graph |
| Output mapped to an undeclared variable | An operation writes a variable that does not exist | ui_app_declare_variable first |
Three warnings that only bite a real user
Structural checks pass and the app still fails the person using it. Fix these before handing an app over.
- A run button with no
disabledWhenonop:<id>/exec#running. No policy refuses the second click, so the user drives a race: the run is cancelled and restarted, stacked, or started alongside, depending on the operation's concurrency rule. - An operation with nothing bound to
exec#error. The run fails and the app looks idle. Bind a Text or Markdown widget to the error field. - A media input widget with no default behind an unguarded run trigger.
Image, Sketch Pad, Camera Capture, Audio, Audio Recorder, Video and Document
all let the run start with the input unset, which is a paid call the user
never got to fill in. Guard the trigger with a
notEmptycondition. A Workflow Form is exempt: it renders every input of its operation, so there is no single binding to guard.
What the headless check does not simulate
Layout, styling, focus and scroll. Stored resource collections: a run never
reads the database, so seed one with {"seedResource": {"id": "<binding>", "items": [...]}} as an interaction step or a resource:<binding> key in
params. openResource has no editor to open. The report lists all of this
under notSimulated — read it before reporting a green verdict.
Shipping
nodetool apps export-bundle <id> -o my.app.jsonpackages the app plus the full graph of every workflow it binds.apps import-bundlerecreates both and rewrites the bundle-local workflow keys to real ids.- Publish takes a snapshot: it saves the current screen as a version and
locks in the current graph of every workflow the app runs, so a released app
keeps working while the drafts keep moving. A spending limit caps what it may
cost, and every run counts against it (
applications.publish,released,budget,usageon tRPC). - Shipped examples:
GET /api/applications/examples, installed withPOST /api/applications/examples/:slug/install. nodetool app build "<prompt>" -p <provider> -m <model>runs the whole spec → plan → author → check → run → judge loop and emits a verified bundle. It is a batch build for the CLI and the eval suite. There is nobuild_appagent tool: an agent builds an app the way a person does, withcreate_app,edit_appanddebug_app.
Reference
Mini app contract below carries the widgets, bindings, actions, conditions, format filters and document shape.
In a NodeTool checkout, these repository sources go further:
docs/mini-apps-guide.md— eleven worked recipes, from a one-shot form to a chat app.docs/mini-apps-reference.md— every widget and setting in full.docs/harnesses.md§ nodetool app debug — the harness, its bundle layout, and the build loop.
Mini app contract
The parts an app is assembled from. A checkout's
docs/mini-apps-reference.md carries every widget and setting in full.
Tools
Every tool takes application_id. A workflow id is never accepted: the
workflows an app runs are named by target_workflow_id on its operations.
| Area | Tools |
|---|---|
| Layout | ui_app_get_snapshot, ui_app_list_component_types, ui_app_add_component, ui_app_update_component, ui_app_remove_component, ui_app_select_component, ui_app_set_title |
| Operations | ui_app_list_operations, ui_app_add_operation, ui_app_update_operation, ui_app_remove_operation |
| Variables | ui_app_list_variables, ui_app_declare_variable, ui_app_update_variable, ui_app_remove_variable |
| Resources | ui_app_list_resources, ui_app_add_resource, ui_app_remove_resource |
| Bindings | ui_app_get_binding_targets |
Headless, each is a step in edit_app {application_id, steps: [{tool, input}]}.
The ui_app_ prefix is optional in a step. With the app open in a browser they
are callable directly.
Bindings
| Binding | Points at |
|---|---|
op:<opId>/in:<nodeId> |
An input of one of the app's workflows |
op:<opId>/out:<nodeId> |
An output of one of the app's workflows |
op:<opId>/prop:<nodeId>#<prop> |
A node setting, driven by a widget |
op:<opId>/exec#<field> |
Run status: running, progress, error, activity, transcript (agent text and tool calls, for an Agent Activity widget) |
var:<variableId> |
A value the app remembers |
view:<componentId>#<prop> |
State belonging to one widget, never saved |
Two legacy forms still resolve: node:<nodeId>#<prop> against the default
operation, and a bare name looked up in the live graph. A name matching nothing
is an error, not a silent no-op. Prefer the id forms for anything new.
Actions
A widget event runs one action. There is nowhere to write code.
| Action | Settings |
|---|---|
run |
operationId |
cancel |
operationId, optional invocationId |
setVariable |
variableId, and a value or the widget's own value |
toggleVariable |
variableId |
resourceCommand |
resourceBindingId, command: read, create, update, delete, upload |
openResource |
resourceBindingId |
Events fire on click (buttons) or change (everything the user edits). A
change event has a pace: live, release (only on controls that commit), or
debounce.
Conditions
visibleWhen and disabledWhen each hold a binding, an operator and a
comparison value typed as text and converted to match. Operators: notEmpty,
empty, eq, neq, gt, gte, lt, lte, contains. A condition whose
binding points at nothing is treated as no condition, so broken wiring never
silently hides a widget.
Format templates
format replaces {binding} tokens, optionally through one filter:
{op:main/out:n1|truncate:80}. Filters: number, date, upper, lower,
join, truncate. An unknown filter or a dead binding renders as nothing.
Widgets
The lists below are the full registry. ui_app_list_component_types returns
each widget's fields.
Show something: Heading, Text, Markdown (the right choice for streamed prose), Image, Audio, Video, Sketch, Timeline, Storyboard, Storyboard Preview, JSON, Table, Output, Progress, Agent Activity (an agent's text and tool calls, live), Alert, Code, List, Key/Value, Stat, Download, 3D Model, Chart, PDF, Gallery, Image Compare.
Sketch, Timeline, and the two storyboard widgets take a document reference,
such as {type: "sketch", id}, which is what the nodes producing them emit.
Storyboard shows the shot cards. Storyboard Preview plays the board as one cut,
with clips in shot order and stills for shots without a clip. Binding a
reference to Image or Video shows nothing: a reference is not a media URL.
Take input: Workflow Form, Workflow Input, Text Input, Number Input, Slider, Switch, Select, Radio Group, Checkbox Group, Date Input, Choice Cards, Guided Steps, Approval, Image Input, Sketch Pad, Audio Input, Audio Recorder, Video Input, Camera Capture, Document Input, Color Input, Data Table Input, File Path Input, Folder Path Input, 3D Model Input, Image Size Input, Media List Input, Resource Picker, Resource Gallery, Storyboard Scenes.
A Workflow Form renders every input of one operation in graph order, so an Input
node added later shows up with no app edit. Place inputs one by one when the
layout matters. Audio Recorder and Camera Capture write the same
{type, uri, asset_id} ref an upload writes. The Sketch Pad flattens each
stroke to a PNG travelling inline as a data URI, so keep it near its 512×384
default rather than the 2048px ceiling.
Chat: Chat Thread (binding is the conversation, streamBinding the reply
arriving from the current run), Chat Composer, Model Select. The thread folds a
settled reply into the conversation variable, which only happens when binding
is a variable and streamBinding is an output.
Buttons and layout: Button, Panel, Columns (left and right slots),
Tabs, Accordion, Spacer, Divider.
Panel, Columns and Accordion take visibleWhen, so one condition shows or
hides a whole group, such as one step of a Guided Steps flow. Panel's
variant is panel, card (a small raised card for one item) or plain (no
frame), and columns lays its children in a grid. Columns' layout: "main-aside" gives the left slot the free width and sizes the right slot to
its content. A Button with fullWidth: false fits its label, and align: "end" puts it at the right. Heading takes a subtitle, Text a tone
(muted or hint), Text Input a hint, and Image an aspectRatio, a
width and a caption.
Document shape
interface ApplicationDocument {
schemaVersion: number; // 4, or 5 when `recipe` is set
ui: PuckData; // { root, content, zones }
operations: OperationBinding[];
resources: ResourceBinding[];
variables: VariableDeclaration[];
theme?: { id: string };
recipe?: RecipeManifest; // only on a curated Recipe
}
A resource is a handle to a real document the app may read or edit:
{id, name, kind: "asset" | "timeline" | "storyboard" | "sketch", scope, operations}.
A bundle is the app plus the full graph of every workflow it runs, with each
operation's workflowId holding a bundle-local key that import swaps for a real
id.
Runtime state, keyed
| Group | Keyed by | Holds |
|---|---|---|
inputs |
opId:nodeId, or opId:nodeId#prop |
{value, dirty, revision} |
outputs |
opId:nodeId |
{value, invocationId, status, revision} |
variables |
variable id | The current value |
view |
componentId:prop |
One widget's own state |
invocations |
job id | {id, operationId, status, progress, error, startedAt} |
Output status is empty, pending, streaming or done. Streamed values
accumulate: text joins, structured items collect into a list. An output slot is
cleared at the start of every run.
04 同仓库更多 Skills
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.
NodeTool可视化AI工作流构建
nodetool
使用 NodeTool MCP 服务器构建、验证、运行和调试可视化 AI 工作流,并处理资产、集合和任务。当用户提及 NodeTool,或要求在其 NodeTool 服务器上创建工作流图、节点或运行媒体生成时使用。
Wan 2.6 视频提示词编写
wan-2-6-prompting
为阿里的 Wan 2.6 视频模型编写提示词——文生视频采用全局风格描述行加上按时间用括号标记的分镜,图生视频只描述随时间变化的内容。涵盖各服务商的镜头模式切换、提示词预算、负面提示词、运动强度措辞、音频输入和提示词扩展。当模型 ID 指定 Wan 2.6 视频路由(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)用于 generate_video、animate_image 或 TextToVideo 节点时使用。不适用于 Wan 2.5 或 2.7,也不适用于 Wan 2.6 图像路由。
可复用视频工作流搭建
video-workflow
构建可复用的 NodeTool 视频工作流,用于批量处理或重复输入。若只需制作单个成品,请使用 storyboard(分镜)技能。
参考视频镜头结构复刻
video-clone
分析参考视频,并在 NodeTool 中使用新产品或新演员重现其镜头结构。
多场景视频音频连续性处理
video-audio-continuity
让由生成视频剪辑而成的多场景作品中的声音保持连续——为什么每个场景各生成一段片段会在每处边界硬切音频、何时改为把所有场景写入同一次生成、能在服务商版权过滤下保留下来的声音设计词汇,以及如何检查返回内容的时长、宽高比和混音效果。当作品包含多个场景且视频模型会自行生成音频(Seedance 2、Veo 3、MiniMax H3、Kling 2.6 及更高版本),或剪辑的声音在镜头切换处中断时使用。