What problem does it solve?
ComfyUI's legacy v1 extension model relied on monkey-patching prototypes and global window.app access, which is fragile and hard to maintain. This Skill teaches the typed, import-based v2 extension API so you can write or migrate ComfyUI web-UI extensions correctly.
Core Features & Use Cases
- Typed Extension Authoring: Use
defineNode, defineExtension, and defineWidget to react to node lifecycle, app lifecycle, and render custom DOM widgets without prototype patching.
- Shell UI Registration: Add sidebar tabs, bottom-panel tabs, toolbar buttons, commands, hotkeys, settings, and about badges, each returning a disposable handle.
- Typed Event Namespaces: Subscribe to
execution, graph, server, and workbench events with unsubscribe functions and module augmentation for payload typing.
- Use Case: You want a chat panel in the ComfyUI sidebar that streams backend replies. Use
defineSidebarTab with a custom render function and subscribe to a custom server event to append messages.
Quick Start
Ask the AI to write a ComfyUI v2 extension that adds a sidebar tab and reacts to execution progress events using @comfyorg/extension-api.