comfyui-node-authoring
БесплатноБез исполняемых скриптовНе проверенComfyUI frontend/backend authoring facts: hiding/serializing widgets, DOM event isolation, endpoints, tooltip lookup, canvas hit-testing, sourcemap…
от laurigates★ 61 звезда на GitHubОб этом скилле
comfyui-node-authoring
Facts about how ComfyUI's frontend and backend actually behave, gathered from
reverse-engineering the (minified) frontend bundle and from real bugs that
shipped despite green tests. These apply to any custom-node pack regardless
of build system — hand-authored web/js/*.js, or a TypeScript+bun-build pack
(the layout comfyui-node-scaffold generates).
When to Use This Skill
| Use this skill when... | Use instead when... |
|---|---|
| Writing or patching a custom node's frontend or backend code | Setting up the pack's release/publish pipeline -> comfy-registry-lifecycle |
| Verifying an undocumented LiteGraph/Vue API shape | Smoke-testing the finished pack live -> comfyui-pack-live-smoke |
Pack layout
<pack>/
__init__.py # NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS, WEB_DIRECTORY
<name>.py # backend node(s) + any /<your>/<endpoint> routes
web/
js/<name>.js # vanilla-JS frontend extension (hand-authored layout)
css/<name>.css # NOT auto-loaded — inject a <link> from the JS
# — or, for a TS+bun-build pack (comfyui-node-scaffold) —
src/index.ts # TypeScript source; WEB_DIRECTORY = "./web/dist"
web/dist/ # built output, committed
The pack directory name becomes the served URL segment
(/extensions/<pack-dir>/...). Keep it lowercase-kebab so the path is
predictable.
web/dist ships only in the registry tarball, never a bare git clone, for
TS-built packs — it's git-ignored. git clone/nightly installs land main
without it (the extension is dead until bun run build runs locally); only a
correctly-configured registry publish ships a prebuilt frontend. See
comfy-registry-lifecycle for the publish-pipeline traps that can silently
break this.
Frontend import paths
From a vanilla web/js/<file>.js, reach the comfy frontend exports with
3 ups:
import { app } from "../../../scripts/app.js";
Two ups (the rgthree convention) only works for files at web/<file>.js.
Hiding a widget while keeping it serializable
To take over a node's input UI with a DOM widget while leaving the underlying widget's value reachable by the backend, set BOTH:
widget.hidden = true;
widget.options = widget.options || {};
widget.options.hidden = true;
widget.computeSize = () => [0, -4];
// Belt-and-braces for frontends that position DOM elements regardless of `hidden`:
for (const key of ["element", "inputEl"]) {
const el = widget[key];
if (el?.style) el.style.display = "none";
}
The hidden / options.hidden pair is what the frontend reads internally.
Setting only widget.type = "hidden_something" (the old pattern) is
insufficient — STRING widgets create a DOM input element positioned by
canvas coords that ignores the type change.
A non-serializable widget must set widget.serialize = false AND be appended last
When a pack adds a helper widget to a node — a "button" opener, a label,
any control the user shouldn't have persisted — it MUST both (1) set
widget.serialize = false on the widget object itself and (2) be
appended to the end of node.widgets. Getting either wrong silently
corrupts the widgets_values of every opened workflow, and the frontend
then autosaves the corrupted graph back to disk.
The frontend's save/restore loops key on widget.serialize, not
widget.options.serialize:
// save (serialize): index-based, non-compacting
for (const [n, r] of widgets.entries()) { if (r.serialize === false) continue; wv[n] = r.value }
// restore (configure): compacting counter
if (wv) { let t = 0; for (const w of widgets) if (w.serialize !== false) { if (t >= wv.length) break; w.value = wv[t++] } }
Two traps:
addWidget(type, name, value, cb, { serialize: false })is INEFFECTIVE.addWidgetstores the option inwidget.options.serializeand never setswidget.serialize— so the loops above still treat the widget as serializable. You must assignwidget.serialize = falsedirectly (the frontend's own non-serialized widgets do exactly this).- Position matters even with
serialize = false. Save is index-based (wv[rawIndex]) but restore is compacting (wv[t++]). A skipped widget placed before real widgets leaves a hole → a leadingnullon save → every value shifts by one on the next open. A serializable widget at index 0 (e.g.unshifted innodeCreated, which runs beforeconfigure()restores values) consumeswv[0]outright.
const btn = node.addWidget?.("button", "…", null, cb, { serialize: false });
if (btn) btn.serialize = false; // the flag the frontend actually checks
// do NOT unshift/splice it to the front — addWidget appends to the end; leave it there
Add a serialize?: boolean field to the pack's local widget interface so
this type-checks. To verify live in a devtools console:
const n = app.graph._nodes.find(n
Установить comfyui-node-authoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(grep *)Bash(head *)ReadGrepGlobВложенные файлы
FAQ
Что делает скилл comfyui-node-authoring?
ComfyUI frontend/backend authoring facts: hiding/serializing widgets, DOM event isolation, endpoints, tooltip lookup, canvas hit-testing, sourcemap verification. Use when writing or patching a custom node's code.
Как установить скилл comfyui-node-authoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл comfyui-node-authoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic