ComfyUI extension API
Writes ComfyUI frontend extensions on the v2 API, so your custom nodes get sidebars, widgets and hotkeys.
Claude's review
7/10 Detailed v2 ComfyUI extension API mapping with working examples, narrow and partly reference dependent.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
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).
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: comfyui-frontend-extensions
description: 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).
---
# ComfyUI v2 Frontend Extension API
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.md`](references/migrate-v1-to-v2.md) for a
> pattern-by-pattern mapping.
## Mental model
| 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, don't reach for globals.** `import { defineNode } from '@comfyorg/extension-api'`. No `window.app` dependency at module evaluation time.
- **Read via getters, write via command-dispatch setters.** `getValue()` reads; `setValue()` dispatches an undo-able, serializable command. Read-only invariants (set at construction) are `readonly` accessors (`node.type`, `widget.name`).
- **Observe via typed `on(...)` subscriptions.** Each returns an `Unsubscribe` cleanup function. No Vue refs/signals are ever exposed; Vue reactivity is the internal engine only.
- **Everything is disposable.** Every `defineX` returns a `DisposableHandle` with an idempotent, synchronous `dispose()`.
## Registration entry points
All imported from `@comfyorg/extension-api`:
| Function | Purpose | Returns |
|----------|---------|---------|
| `defineNode(opts)` | **Primary entry** — react to node lifecycle (replaces prototype patching) | `NodeExtensionOptions` |
...From artokun's repository, MIT licence.
Related skills
-
Checked
TinyBase app builder
Scaffolds and extends local first JavaScript apps with TinyBase, including schemas, persistence and sync.
7/101 credit -
Checked
ComfyUI custom node UI
Adds widgets, sidebar tabs, commands and dialogs to ComfyUI custom nodes, so your node feels built in.
8/101 credit -
Checked
Scrolling menu upgrade
Finds outdated react-horizontal-scrolling-menu code and rewrites it for version 8 so the menu works again.
7/101 credit -
Checked
Scroll Menu Testing and SSR
Gets react-horizontal-scrolling-menu working in Next.js and tested in Jest and Playwright without flicker.
7/101 credit -
Checked
Screenshot to React code
Rebuilds a screenshot or mockup as React, TypeScript and Tailwind code that closely matches the design.
7/101 credit -
Checked
Map location picker
Adds a map pin picker to a web form, so users can choose and submit one exact spot like a delivery address.
7/101 credit