Comfyui Skill Openclaw
HuangYuChuh/ComfyUI_Skills_OpenClaw
Run registered ComfyUI workflows through the fast comfyui-skill CLI, and use the official local Comfy MCP for live template, node, model, validation, and orchestration capabilities.
Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles.
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensions --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .claude/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .claude/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensionsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensions --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .agents/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .agents/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensions --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .cursor/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .cursor/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/artokun/comfyui-mcp.git --path plugin/skills/comfyui-frontend-extensions--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensions --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .gemini/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .gemini/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensionsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .github/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .github/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install artokun/comfyui-mcp comfyui-frontend-extensions --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugin/skills/comfyui-frontend-extensions .opencode/skills/comfyui-frontend-extensions && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "comfyui-frontend-extensions" agent skill from https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-frontend-extensions into .opencode/skills/comfyui-frontend-extensions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-frontend-extensions", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
comfyui-frontend-extensionsAuthoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles.
Comfyui Frontend Extensions is an agent skill from artokun/comfyui-mcp. Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles. Use when writing or editing ComfyUI web-UI extension code (custom node JS, sidebar panels, widgets).
Its SKILL.md is about 5.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/migrate-v1-to-v2.md`).
It sits in AI & LLM Engineering, covering Diffusion and image models. It works with ComfyUI and Node.js. The repository describes itself as: Local-first, agent-native control plane for ComfyUI — MCP server + sidebar agent that generates images, video & audio, authors and runs workflows, and edits your live graph in… The licence is MIT.
11 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6ad6fc0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comAlso links to:
npmjs.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Comfyui Frontend Extensions loads about 5.4k tokens when it runs, and up to ~8.3k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 1,441 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from artokun/comfyui-mcp at commit 6ad6fc0, republished under its MIT licence (© artokun). 1,441 words, ~5,353 tokens.
.claude/skills/comfyui-frontend-extensions/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.The v2 extension API is the published npm package @comfyorg/extension-api. It
replaces the legacy app.registerExtension() / nodeType.prototype monkey-patching
model with a typed, tree-shakeable, import-based API.
If you are converting an existing v1 extension, read
references/migrate-v1-to-v2.mdfor a pattern-by-pattern mapping.
| v1 (legacy) | v2 (@comfyorg/extension-api) |
|---|---|
One giant app.registerExtension({...}) call | One defineX per concern, each independently disposable |
window.app / app.* globals | Direct import from the package; no window.app at module-eval time |
nodeType.prototype.onExecuted = ... patching | node.on('executed', fn) on a NodeHandle |
Mutate widget.value, assign widget.callback | widget.setValue(v) / widget.on('valueChange', fn) |
api.addEventListener('execution_start', fn) | execution.on('start', fn) (typed namespaces) |
Manual removeEventListener bookkeeping | Every subscription returns Unsubscribe; every defineX returns DisposableHandle |
Core principles baked into the API:
import { defineNode } from '@comfyorg/extension-api'. No window.app dependency at module evaluation time.getValue() reads; setValue() dispatches an undo-able, serializable command. Read-only invariants (set at construction) are readonly accessors (node.type, widget.name).on(...) subscriptions. Each returns an Unsubscribe cleanup function. No Vue refs/signals are ever exposed; Vue reactivity is the internal engine only.defineX returns a DisposableHandle with an idempotent, synchronous dispose().All imported from @comfyorg/extension-api:
| Function | Purpose | Returns |
|---|---|---|
defineNode(opts) | Primary entry — react to node lifecycle (replaces prototype patching) | NodeExtensionOptions |
defineExtension(opts) | App-scoped lifecycle (init/setup) + shell UI host | ExtensionOptions |
defineWidget(opts) | Register a custom widget type (DOM via mount) | WidgetExtensionOptions |
defineSidebarTab(opts) | Add a left-sidebar tab (Vue or custom) | DisposableHandle |
defineBottomPanelTab(opts) | Add a bottom-panel tab | DisposableHandle |
defineToolbarButton(opts) | Add an action-bar button | DisposableHandle |
defineCommand(opts) | Register an invokable command | DisposableHandle |
defineHotkey(opts) | Bind a key combo to a command id | DisposableHandle |
defineSetting(opts) | Add a settings-menu entry | DisposableHandle |
defineAboutBadge(opts) | Add a badge to the About page | DisposableHandle |
Imperative carve-outs (fire-and-forget, not defineX, no handle): toast, notify.
A single extension file typically exports a default defineExtension/defineNode
result and calls the shell-UI defineX functions inside setup() or at module scope.
They queue safely before the app boots.
defineNode — the primary entry pointReacts to node lifecycle. nodeCreated fires once per node instance (typed in, pasted,
duplicated, or loaded without an existing workflow). loadedGraphNode fires once when a
node is restored from a saved workflow (widget values already populated). Exactly one of
them fires per node entity, never both.
import { defineNode, onNodeMounted, onNodeRemoved } from '@comfyorg/extension-api'
export default defineNode({
name: 'my-org.executed-logger',
// Filter to specific comfyClass names. Omit to receive every node type.
nodeTypes: ['KSampler', 'KSamplerAdvanced'],
// MUST be synchronous. Runs inside a Vue EffectScope; everything registered
// here (subscriptions, onNodeMounted) auto-disposes when the node is removed.
nodeCreated(node) {
// Read-only invariants
console.log(node.type, node.comfyClass, node.id)
// Subscribe to backend execution completion (replaces onExecuted patching)
node.on('executed', (e) => {
console.log('output:', e.output) // Record<string, unknown>
})
// Lifecycle hooks — call SYNCHRONOUSLY (never after an await)
onNodeMounted(() => {
// Node fully mounted; DOM/canvas ready.
})
onNodeRemoved(() => {
// Cleanup: abort fetches, close sockets. Does NOT fire on subgraph promotion.
})
},
loadedGraphNode(node) {
// Node restored from a saved workflow; widget values are already set.
}
})NodeHandle surface (Phase A)| Member | Kind | Notes |
|---|---|---|
id: string | readonly | Opaque token. Compare with node.equals(other), never by slicing. |
equals(other) | method | Canonical identity comparison. |
type: string | readonly | LiteGraph node type. |
comfyClass: string | readonly | Backend class name. |
getProperty<T>(key) / getProperties() / setProperty(key, v) | methods | Per-instance props (migration shim — prefer widget values). |
getInputs() / getOutputs() | methods | ReadonlyArray<Readonly<SlotInfo>> — frozen views. |
on('executed', fn) | method | Execution complete → NodeExecutedEvent { output }. |
on('removed', fn) | method | Node deleted (not subgraph promotion). |
on('configured', fn) | method | Loaded from saved workflow (after widget values restored). |
on('beforeSerialize', fn) | method | Deprecated — use widget-level beforeSerialize (ADR-0010). |
Position/size/title/mode getters and slot/connection events are deferred in Phase A. Do not rely on
getPosition,setSize,getMode,on('connected').Nodes cannot enumerate or reference their widgets (
node.getWidget(name)was removed). UsedefineWidgetand themountcontext'sctx.widgethandle.
defineExtension — app lifecycle + shell UIUse for app-wide setup and to host shell-UI registrations. setup() runs at the
early registration point; use the imported onMounted hook for work that needs the
app fully initialized.
import {
defineExtension,
onMounted,
onUnmounted,
execution,
toast
} from '@comfyorg/extension-api'
export default defineExtension({
name: 'my-org.my-extension',
setup() {
// Register late-lifecycle work via onMounted (called synchronously here).
onMounted(() => {
const off = execution.on('start', () => {
toast.show({ severity: 'info', summary: 'Run started' })
})
onUnmounted(off) // tidy teardown
})
}
})A note on the
setup()signature. The source-of-truth API uses implicit-context hooks: importonMounted/onNodeMounted/etc. and call them synchronously insidesetup()(mirrors Vue's Composition API). An early package draft showed asetup(ctx) { ctx.onNodeMounted(...) }context-argument style; prefer the imported-hook form above, which is what the current API exports.
Context-scoped lifecycle hooks are imported and called synchronously inside
defineExtension's setup(): onBeforeMount, onMounted, onUnmounted,
onActivated, onDeactivated. defineSidebarTab/defineBottomPanelTab take no
setup field; adding one is a type error. onActivated/onDeactivated fire
when the surrounding tab or panel is shown or hidden.
defineWidget — custom widget types with DOMWidgets are declared in the Python node's INPUT_TYPES, never created at runtime
(node.addWidget is forbidden). defineWidget registers a type and the DOM mount
hook the runtime invokes against a host <div> it owns. mount is optional; omit it
for value-only widgets that render through the native renderer.
import { defineWidget, type WidgetCleanup } from '@comfyorg/extension-api'
export default defineWidget({
name: 'my-org.color-picker',
type: 'COLOR_PICKER', // referenced from Python INPUT_TYPES
// The SOLE DOM seam. Capture host + constructed DOM via closure — there is
// no widget.element accessor.
mount(host, ctx): WidgetCleanup {
const input = document.createElement('input')
input.type = 'color'
input.value = String(ctx.widget.getValue() ?? '#000000')
input.addEventListener('input', () => ctx.widget.setValue(input.value))
host.appendChild(input)
// ctx.widget / ctx.node are the only legal handles here.
ctx.widget.on('valueChange', (e) => {
input.value = String(e.newValue ?? '#000000')
})
// Optional cleanup — fires once on widget destruction (NOT on host remount).
return () => input.remove()
}
})WidgetMountContext also exposes onUnmount(fn), onBeforeRemount(fn), and
onAfterRemount(fn => ...) for host-move scenarios (graph↔app mode, subgraph
promotion). The mount body is not re-invoked across a remount; only the
remount hooks fire.
WidgetHandle surface| Member | Kind | Notes |
|---|---|---|
id / equals(other) | readonly / method | Opaque identity. |
name / widgetType / label | readonly | Set from INPUT_TYPES schema. |
getValue<T>() / setValue(v) | methods | setValue dispatches an undo-able command. |
options | readonly | Readonly<WidgetOptions> snapshot. Writes raise TS errors. |
getOption<K>(key) / setOption(key, v) | methods | Per-instance overrides (e.g. min/max/step). |
setHeight(px) | method | Resize the reserved host height (DOM widgets). |
on('valueChange', fn) | method | WidgetValueChangeEvent { oldValue, newValue }. |
on('optionChange', fn) | method | WidgetOptionChangeEvent { key, oldValue, newValue }. |
on('beforeSerialize', fn) | method | Only async-allowed event. e.value + e.setSerializedValue(v). |
on('beforeQueue', fn) | method | Pre-queue validation. Call e.reject(msg) to cancel. |
// Serialization override (the SOLE serialization interface in v2):
widget.on('beforeSerialize', (e) => {
e.setSerializedValue(processDynamicPrompt(widget.getValue()))
})
// Async serialization (e.g. capture a webcam frame before queueing):
widget.on('beforeSerialize', async (e) => {
e.setSerializedValue(await captureFrame())
})
// Pre-queue validation (replaces app.queuePrompt monkey-patching):
widget.on('beforeQueue', (e) => {
if (!widget.getValue()) e.reject('Prompt text is required before queueing.')
})Four module-level singletons replace api.addEventListener('...'). Each on()
returns an Unsubscribe. Subscriptions made inside a setup() body auto-dispose
on unmount; subscriptions made elsewhere are the caller's responsibility.
| Namespace | Events (canonical) | Wire mapping |
|---|---|---|
execution | start, end, error, interrupted, cached, executing, progress, preview | execution_<evt> |
graph | changed, … | graph:<evt> |
server | status, logs, reconnected, feature_flags, assets, + custom-node events | raw event name |
workbench | notification, … | workbench:<evt> |
import { execution, server } from '@comfyorg/extension-api'
const off = execution.on('progress', (e) => console.log('progress', e))
// Custom-node events ride the `server` namespace with arbitrary names:
server.on('my-org.my-node.update', (e) => console.log(e))
// later:
off()Payloads default to unknown today. Narrow them with TS module augmentation:
declare module '@comfyorg/extension-api' {
interface ExecutionEventPayloads {
start: { promptId: string }
progress: { value: number; max: number }
}
interface ServerEventPayloads {
'my-org.my-node.update': { nodeId: string; text: string }
}
}The augmentable interfaces are GraphEventPayloads, ExecutionEventPayloads,
ServerEventPayloads, and WorkbenchEventPayloads.
Each returns a DisposableHandle. Safe to call at module scope (they queue until the
app boots) or inside setup().
import {
defineCommand,
defineHotkey,
defineToolbarButton,
defineSetting,
defineAboutBadge
} from '@comfyorg/extension-api'
// Command — id, function, optional label/icon/tooltip.
const cmd = defineCommand({
id: 'my-org.do-the-thing',
label: 'Do The Thing',
function: () => { /* ... */ }
})
// Hotkey — binds a key combo to an already-registered command id.
// `mod` = cmd on macOS, ctrl elsewhere.
defineHotkey({ keys: 'mod+shift+k', commandId: 'my-org.do-the-thing' })
// Action-bar button — id (for dispose), icon, onClick.
defineToolbarButton({
id: 'my-org.help',
icon: 'pi-question-circle',
tooltip: 'Get help',
onClick: () => openHelp()
})
// Setting — widen the id when not augmenting the Settings keymap.
defineSetting({
id: 'my-org.enabled' as never,
name: 'Enable my extension',
type: 'boolean',
defaultValue: false
})
// About-page badge.
defineAboutBadge({
label: 'GitHub',
url: 'https://github.com/me/my-ext',
icon: 'pi-github'
})
// Tear down any registration:
cmd.dispose() // idempotent + synchronousCommandDefinition fields: id (required), function: (metadata?) => void | Promise<void> (required), optional label / icon / tooltip (each string | (() => string)), menubarLabel, versionAdded.
defineSidebarTab — embedded panels (e.g. a chat panel)A sidebar tab hosts a rich embedded UI such as a chat panel. It comes in two flavors:
type: 'vue' (mount a Vue component) or type: 'custom' (imperative render(container) /
destroy()). Both share the base fields id, title, optional icon, iconBadge,
tooltip, label.
import { defineSidebarTab } from '@comfyorg/extension-api'
import ChatPanel from './ChatPanel.vue'
const chatTab = defineSidebarTab({
id: 'my-org.chat',
title: 'Chat',
type: 'vue',
icon: 'pi-comments',
component: ChatPanel
})
// chatTab.dispose() removes the tab.When you don't want a Vue dependency, use type: 'custom' and build the DOM yourself.
render receives the container; destroy is your teardown.
import {
defineExtension,
defineSidebarTab,
execution,
server,
type Unsubscribe
} from '@comfyorg/extension-api'
export default defineExtension({
name: 'my-org.chat-panel',
setup() {
const subscriptions: Unsubscribe[] = []
defineSidebarTab({
id: 'my-org.chat',
title: 'Chat',
type: 'custom',
icon: 'pi-comments',
render(container: HTMLElement) {
const log = document.createElement('div')
log.className = 'chat-log'
const form = document.createElement('form')
const input = document.createElement('input')
input.placeholder = 'Ask something…'
const send = document.createElement('button')
send.type = 'submit'
send.textContent = 'Send'
form.append(input, send)
const append = (who: string, text: string) => {
const line = document.createElement('p')
line.textContent = `${who}: ${text}`
log.appendChild(line)
log.scrollTop = log.scrollHeight
}
form.addEventListener('submit', (ev) => {
ev.preventDefault()
const text = input.value.trim()
if (!text) return
append('You', text)
input.value = ''
// Forward to a backend node/server event, stream the reply, etc.
})
container.append(log, form)
// Stream backend replies via the server namespace (custom-node event).
subscriptions.push(
server.on('my-org.chat.reply', (e) => append('Assistant', String(e)))
)
// React to runs to show status in the panel.
subscriptions.push(
execution.on('start', () => append('System', 'Run started…'))
)
},
destroy() {
for (const off of subscriptions) off()
subscriptions.length = 0
}
})
}
})defineBottomPanelTab has the same vue / custom shapes (base fields id, optional
title/titleKey, optional targetPanel: 'terminal' | 'shortcuts').
toast and notify are inline imperative (no defineX, no handle). Call from any
setup() body or hook closure.
import { toast } from '@comfyorg/extension-api'
toast.show({ severity: 'error', summary: 'Workflow failed', detail: err.message, life: 4000 })
toast.removeAll()notify({ kind, message, detail, life }) is a deprecated 1:1 wrapper over toast.show.
Prefer toast.show directly.
For referencing nodes across subgraph boundaries or execution runs, use the branded identity types rather than raw integer node IDs:
import {
createNodeLocatorId, parseNodeLocatorId, isNodeLocatorId,
createNodeExecutionId, parseNodeExecutionId, isNodeExecutionId,
type NodeLocatorId, type NodeExecutionId
} from '@comfyorg/extension-api'
const locator: NodeLocatorId = createNodeLocatorId(subgraphUuid, localNodeId)
// NodeExecutionId encodes a node's path through nested subgraphs as an array of node ids
// (joined with ':'). Pass the array, not positional args:
const execId: NodeExecutionId = createNodeExecutionId([localNodeId])
if (isNodeLocatorId(maybe)) {
// parseNodeLocatorId returns { subgraphUuid: string | null; localNodeId: NodeId }
const { subgraphUuid, localNodeId } = parseNodeLocatorId(maybe)
}NodeLocatorId arrives from workflow JSON; NodeExecutionId arrives from websocket
frames. You receive these from event payloads, which is why they're public (unlike the
internal *EntityId brands, which are not exported).
Every defineX returns DisposableHandle { dispose(): void }:
dispose() again is a safe no-op.dispose().const handles = [
defineCommand({ id: 'my.cmd', function: () => {} }),
defineHotkey({ keys: 'mod+k', commandId: 'my.cmd' }),
defineSidebarTab({ id: 'my.tab', title: 'Tab', type: 'vue', component: MyTab })
]
// Full teardown:
for (const h of handles.reverse()) h.dispose()await. onNodeMounted / onMounted / onUnmounted rely on implicit scope context and must be called synchronously inside the setup()/nodeCreated body. After an await the scope is gone: it throws in dev and is a silent no-op in prod. Kick off async work in the body, but register hooks first.window.app or app.*. v2 has no window.app dependency at module-eval time. Import everything from @comfyorg/extension-api.nodeType.prototype. Replaced by defineNode + node.on(...). Prototype patching does not interoperate with the v2 handle model.node.getInputs(), widget.options, and Point/Size tuples are frozen/Readonly; assignment raises TS errors. Use the setter methods (widget.setOption, widget.setValue).widget.value / widget.callback / widget.serializeValue. Use setValue(), on('valueChange'), and on('beforeSerialize'). serializeValue is read-only in v2.serialize: false and no skip() in v2. If a widget should not contribute to the payload, it should not be a widget. The only serialization interface is widget.on('beforeSerialize', fn) + e.setSerializedValue(v).node.addWidget(...) / node.addDOMWidget(...) are removed. Declare widgets in the Python INPUT_TYPES; render custom DOM via defineWidget({ mount }).node.getWidget(name) / node.getWidgets() were removed (nodes cannot reference widgets). Use a defineWidget mount context's ctx.widget, or share state via the server event bus.beforeSerialize. Deprecated (ADR-0010). Store extension state in a widget and use widget-level beforeSerialize.setup() context, and every defineX handle, leak unless you call the returned Unsubscribe / dispose(). Inside setup() they auto-dispose on unmount.@comfyorg/extension-api at https://www.npmjs.com/package/@comfyorg/extension-api© artokun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugin/skills/comfyui-frontend-extensions of artokun/comfyui-mcp.
Open the folder on GitHubat commit 6ad6fc0
Comfyui Frontend Extensions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Comfyui Frontend Extensions this skillartokun/comfyui-mcp | 803 | — | ~5.4k | Automated safety check: Pass | MIT | |
| Comfyui Skill OpenclawHuangYuChuh/ComfyUI_Skills_OpenClaw | 413 | — | ~2.7k | Automated safety check: Pass | Apache-2.0 | |
| ComfyUI Custom Node BuilderConstantineB6/comfy-pilot | 230 | — | ~897 | Automated safety check: Pass | MIT | |
| Continuity Renderroadmaus/ComfyUI-Continuity | 133 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Add Comfyui NodeMooshieblob1/MooshieUI | 207 | — | ~936 | Automated safety check: Pass | AGPL-3.0 | |
| Edit Comfy Workflowpeteromallet/VibeComfy | 150 | — | ~2.2k | Automated safety check: Pass | MIT |
HuangYuChuh/ComfyUI_Skills_OpenClaw
Run registered ComfyUI workflows through the fast comfyui-skill CLI, and use the official local Comfy MCP for live template, node, model, validation, and orchestration capabilities.
ConstantineB6/comfy-pilot
Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches.
roadmaus/ComfyUI-Continuity
Render videos and pictures on a ComfyUI server that has the Continuity node pack (MiniMax H3, LTX 2.5, Krea 2, Ideogram 4, Qwen Image, Flux 2 Klein) with one command, the render.py bundled in this…
Mooshieblob1/MooshieUI
Adds a custom ComfyUI Python node to MooshieUI — Python class in mooshienodes.py, Rust required-class registration, and optional workflow template chain hookup.
peteromallet/VibeComfy
Edit an existing VibeComfy or ComfyUI workflow, ready template, recipe, scratchpad, or target graph.
dagthomas/comfyui_dagthomas
Core craft for writing MiniMax H3 video prompts as the engine behind the APNext H3 nodes in ComfyUI - how to obey the node's directives (task type, duration, shot plan, camera, dialogue, wildness)…
artokun/comfyui-mcp
Train custom LoRAs with ostris AI-Toolkit. An agent skill from artokun/comfyui-mcp.
artokun/comfyui-mcp
Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).
artokun/comfyui-mcp
Discover Civitai models with the BUILT-IN downloadmodel action:"searchcivitai" and install/generate them locally.
artokun/comfyui-mcp
Diagnose and fix video/image color OBJECTIVELY with the getimage (action:"analyzecolor") tool (scopes/stats such as black/white points, contrast, saturation, clipping, cast) instead of eyeballing a…
artokun/comfyui-mcp
Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed.
artokun/comfyui-mcp
A skill your agent uses when installing a model family from an installer pack, or when building/deriving a new pack from an upstream installer or a workflow JSON.
Categories
Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles. Comfyui Frontend Extensions is an agent skill from artokun/comfyui-mcp. Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles.
Comfyui Frontend Extensions fits situations like: editing ComfyUI web-UI extension code (custom node JS; tasks that involve Diffusion and image models.
Run `npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a claude-code`. Or copy the skill folder (plugin/skills/comfyui-frontend-extensions in artokun/comfyui-mcp) into .claude/skills/comfyui-frontend-extensions in your project. Claude Code loads it when a task matches its description.
Run `npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a codex`. Or copy the skill folder (plugin/skills/comfyui-frontend-extensions in artokun/comfyui-mcp) into .agents/skills/comfyui-frontend-extensions in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add artokun/comfyui-mcp --skill comfyui-frontend-extensions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/comfyui-frontend-extensions, .gemini/skills/comfyui-frontend-extensions, .github/skills/comfyui-frontend-extensions and .opencode/skills/comfyui-frontend-extensions in your project.
SKILL.md names no scripts, command-line tools or credentials: Comfyui Frontend Extensions is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: npmjs.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Comfyui Frontend Extensions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.4k tokens (SKILL.md is roughly 21k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Comfyui Frontend Extensions: Comfyui Skill Openclaw (HuangYuChuh/ComfyUI_Skills_OpenClaw, 413 stars), ComfyUI Custom Node Builder (ConstantineB6/comfy-pilot, 230 stars), Continuity Render (roadmaus/ComfyUI-Continuity, 133 stars) and Add Comfyui Node (Mooshieblob1/MooshieUI, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
artokun (a GitHub user) maintains it in artokun/comfyui-mcp, which has 803 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on October 5, 2026.
Source: artokun/comfyui-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.