Agent skill

ComfyUI Custom Node Basics

by jtydhr88 in jtydhr88/comfyui-custom-node-skills

Explains the V3 API for ComfyUI custom nodes: node classes, schema, inputs and outputs, registration and how it differs from the legacy V1 style.

MITAuto-check passedAI & LLM Engineering

Install ComfyUI Custom Node Basics

skills CLI
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-basics .claude/skills/comfyui-node-basics && rm -rf skills-src

Use ~/.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/

Facts

Skill name
comfyui-node-basics
GitHub stars
294
Token cost
~1.6k tokens
SKILL.md length
232 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Explains the V3 API for ComfyUI custom nodes: node classes, schema, inputs and outputs, registration and how it differs from the legacy V1 style.

  • Works in 3 steps: Inherit from io.ComfyNode → define_schema(cls) - classmethod… → execute(cls, ...) - classmethod…
  • Creating a new ComfyUI custom node with the V3 API
  • SKILL.md covers Quick Start, V3 Node Class Structure, io.Schema Fields and V3 Node Registration, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

ComfyUI nodes are Python classes, and the V3 API is the recommended way to write them. A node inherits from io.ComfyNode, defines a schema in a define_schema classmethod that returns io.Schema, and performs its work in an execute classmethod that returns io.NodeOutput. Because every method is a classmethod, a V3 node holds no instance state.

Registration happens through a ComfyExtension and a comfy_entrypoint function that must sit at module level in the file ComfyUI imports directly. The schema takes a required unique node_id and an optional display name, plus inputs and outputs, and the execute parameters must match the input IDs exactly.

A V1 section keeps the legacy form for reference, with a plain class, INPUT_TYPES, RETURN_TYPES, a FUNCTION attribute and a NODE_CLASS_MAPPINGS dictionary, and a comparison table sets the two styles side by side. Categories use a slash for hierarchy, and a leading underscore hides a node from menus.

When your agent uses it

  • Creating a new ComfyUI custom node with the V3 API
  • Setting up the structure and registration of a custom node project
  • Converting a V1 node to the V3 style

Example prompts

  • “Write a ComfyUI V3 node that takes an image and a float and returns a brightened image.”
  • “Register my two custom nodes with ComfyExtension and comfy_entrypoint.”
  • “Convert this V1 node with INPUT_TYPES and NODE_CLASS_MAPPINGS to the V3 API.”

Requirements

  • A ComfyUI installation to load custom nodes into
  • Python

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Inherit from io.ComfyNode
  2. define_schema(cls) - classmethod returning io.Schema
  3. execute(cls, ...) - classmethod performing the computation

What it can do on your machine

Read from SKILL.md and the folder at commit 63a78dc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

ComfyUI Custom Node Basics loads about 1.6k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 232 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from jtydhr88/comfyui-custom-node-skills at commit 63a78dc, republished under its MIT licence (© jtydhr88). 232 words, ~1,648 tokens.

Download SKILL.mdSave it as .claude/skills/comfyui-node-basics/SKILL.md (or your agent's skills folder).
name
comfyui-node-basics
description
ComfyUI custom node fundamentals - V3 node structure, Schema, inputs/outputs, registration. Use when creating new ComfyUI custom nodes, defining node classes, or setting up a custom node project.

ComfyUI Custom Node Basics (V3 API)

ComfyUI uses Python classes to define nodes. The V3 API is the current recommended approach. Nodes inherit from io.ComfyNode and define a schema + execute method.

Quick Start

python
from comfy_api.latest import ComfyExtension, io

class MyNode(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="MyNode",
            display_name="My Custom Node",
            category="my_category",
            inputs=[
                io.Image.Input("image"),
                io.Float.Input("strength", default=1.0, min=0.0, max=1.0, step=0.01),
            ],
            outputs=[
                io.Image.Output("IMAGE"),
            ],
        )

    @classmethod
    def execute(cls, image, strength):
        result = image * strength
        return io.NodeOutput(result)

V3 Node Class Structure

Every V3 node requires:

  1. Inherit from io.ComfyNode
  2. define_schema(cls) - classmethod returning io.Schema
  3. execute(cls, ...) - classmethod performing the computation
python
from typing_extensions import override
from comfy_api.latest import ComfyExtension, io

class ImageBrighten(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="ImageBrighten",          # unique identifier
            display_name="Brighten Image",     # shown in UI
            category="image/adjust",           # menu path
            description="Adjusts image brightness",
            inputs=[
                io.Image.Input("image"),
                io.Float.Input("factor", default=1.2, min=0.0, max=3.0, step=0.1),
            ],
            outputs=[
                io.Image.Output("IMAGE"),
            ],
        )

    @classmethod
    def execute(cls, image, factor):
        result = torch.clamp(image * factor, 0.0, 1.0)
        return io.NodeOutput(result)

io.Schema Fields

python
io.Schema(
    node_id="UniqueNodeID",            # required: unique string ID
    display_name="Display Name",        # optional: shown in UI menus
    category="category/subcategory",    # menu hierarchy (default "sd")
    description="Node description",     # optional: tooltip text
    inputs=[...],                       # list of Input objects
    outputs=[...],                      # list of Output objects
    hidden=[...],                       # list of Hidden enum values
    is_output_node=False,               # True for nodes with side effects (save, preview)
    is_experimental=False,              # marks as experimental
    is_deprecated=False,                # marks as deprecated
    is_dev_only=False,                  # hidden unless dev mode enabled
    is_api_node=False,                  # marks as API-only node
    is_input_list=False,                # receive full lists instead of individual items
    not_idempotent=False,               # prevents caching
    accept_all_inputs=False,            # accept arbitrary inputs via **kwargs
    enable_expand=False,                # allow node expansion (subgraphs)
    search_aliases=["alias1", "alias2"],# alternative search terms
    essentials_category="Basic",        # optional: Essentials tab category
    price_badge=None,                   # optional: PriceBadge for API nodes
    has_intermediate_output=False,      # True for nodes with interactive UI that produce intermediate outputs
)

V3 Node Registration

V3 nodes are registered via ComfyExtension and comfy_entrypoint():

python
from typing_extensions import override
from comfy_api.latest import ComfyExtension, io

class MyNode(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="MyNode",
            display_name="My Node",
            category="my_nodes",
            inputs=[io.String.Input("text", multiline=True)],
            outputs=[io.String.Output()],
        )

    @classmethod
    def execute(cls, text):
        return io.NodeOutput(text.upper())


class MyExtension(ComfyExtension):
    @override
    async def get_node_list(self) -> list[type[io.ComfyNode]]:
        return [MyNode]


async def comfy_entrypoint() -> MyExtension:
    return MyExtension()

The comfy_entrypoint() function must be defined at the module level (in the file directly imported by ComfyUI).

V1 Node Structure (Legacy Reference)

V1 nodes use class attributes and NODE_CLASS_MAPPINGS:

python
class MyNodeV1:
    CATEGORY = "my_category"
    FUNCTION = "execute"
    RETURN_TYPES = ("IMAGE",)
    RETURN_NAMES = ("image",)

    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {
                "image": ("IMAGE",),
                "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0}),
            }
        }

    def execute(self, image, strength):
        return (image * strength,)

NODE_CLASS_MAPPINGS = {"MyNodeV1": MyNodeV1}
NODE_DISPLAY_NAME_MAPPINGS = {"MyNodeV1": "My Node V1"}

Key Differences: V3 vs V1

AspectV3V1
Base classio.ComfyNodePlain class
Execute methodexecute classmethod (fixed name)Instance method (custom name via FUNCTION)
Inputsio.Schema(inputs=[...])INPUT_TYPES() dict
Outputsio.Schema(outputs=[...])RETURN_TYPES tuple
Return valueio.NodeOutput(...)Plain tuple
RegistrationComfyExtension + comfy_entrypoint()NODE_CLASS_MAPPINGS dict
StateNo instance state (classmethods)Instance state allowed
Hidden inputscls.hidden.prompt, etc.kwargs from "hidden" dict

Important Rules

  • node_id must be globally unique across all nodes
  • execute() parameters must match input IDs exactly
  • All methods are @classmethod in V3 (no instance state)
  • Return io.NodeOutput(val1, val2, ...) matching output count
  • Category uses / separator for hierarchy: "image/transform"
  • Prefix category with _ to hide from menus: "_for_testing"

See Also

  • comfyui-node-datatypes - Data types (IMAGE, LATENT, MASK, etc.)
  • comfyui-node-inputs - Input configuration details
  • comfyui-node-outputs - Output types and UI outputs
  • comfyui-node-packaging - Project structure and packaging
  • comfyui-node-lifecycle - Execution lifecycle and caching

© jtydhr88, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/comfyui-custom-nodes/skills/comfyui-node-basics of jtydhr88/comfyui-custom-node-skills.

Open the folder on GitHubat commit 63a78dc

Compare with similar skills

ComfyUI Custom Node Basics 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.

ComfyUI Custom Node Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ComfyUI Custom Node Basics this skilljtydhr88/comfyui-custom-node-skills294—~1.6kAutomated safety check: PassMIT
ComfyUI Custom Node BuilderConstantineB6/comfy-pilot230—~897Automated safety check: PassMIT
Setupguaardvark/guaardvark2511 repos~1.2kAutomated safety check: PassMIT
AI Toolkit Trainerartokun/comfyui-mcp793—~2.7kAutomated safety check: PassMIT
Add Comfyui NodeMooshieblob1/MooshieUI207—~936Automated safety check: PassAGPL-3.0
Edit Comfy Workflowpeteromallet/VibeComfy150—~2.2kAutomated safety check: PassMIT

Similar skills

  • ComfyUI Custom Node Builder

    ConstantineB6/comfy-pilot

    Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches.

    230 GitHub stars~897 tokensUpdated 7 mo ago
    AI & LLM EngineeringAuto-check passed
  • Setup

    guaardvark/guaardvark

    Connect this agent to a running Guaardvark (self-hosted AI studio) and check what it can do right now.

    251 GitHub starsUsed in 1 repo~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • AI Toolkit Trainer

    artokun/comfyui-mcp

    Train custom LoRAs with ostris AI-Toolkit. An agent skill from artokun/comfyui-mcp.

    793 GitHub stars~2.7k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Add Comfyui Node

    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.

    207 GitHub stars~936 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Edit Comfy Workflow

    peteromallet/VibeComfy

    Edit an existing VibeComfy or ComfyUI workflow, ready template, recipe, scratchpad, or target graph.

    150 GitHub stars~2.2k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Comfyui Launch Flags

    artokun/comfyui-mcp

    Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed.

    793 GitHub stars~3.1k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from jtydhr88/comfyui-custom-node-skills

All 9 skills in this repo
  • ComfyUI Advanced Node Patterns

    jtydhr88/comfyui-custom-node-skills

    Reference for ComfyUI V3 node patterns such as MatchType, MultiType, Autogrow and DynamicCombo, used to build nodes with dynamic inputs and type matching.

    294 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • ComfyUI Node Datatypes

    jtydhr88/comfyui-custom-node-skills

    Lists ComfyUI node data types, from IMAGE, MASK and LATENT tensors to model types, with their V3 classes and formats.

    294 GitHub stars~4.3k tokensUpdated 2 mo ago
    Auto-check passed
  • ComfyUI Frontend Extensions

    jtydhr88/comfyui-custom-node-skills

    Guide to writing JavaScript extensions for the ComfyUI frontend from custom nodes, covering lifecycle hooks, widgets, sidebar tabs, commands, settings, toasts and dialogs.

    294 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Comfyui Node Inputs

    jtydhr88/comfyui-custom-node-skills

    ComfyUI node input types - INT, FLOAT, STRING, BOOLEAN, COMBO widgets, hidden inputs, optional inputs, lazy inputs, forceinput.

    294 GitHub stars~3k tokensUpdated 2 mo ago
    Auto-check passed
  • Comfyui Node Lifecycle

    jtydhr88/comfyui-custom-node-skills

    ComfyUI node execution lifecycle - caching, fingerprintinputs/ISCHANGED, validateinputs/VALIDATEINPUTS, checklazystatus, execution order.

    294 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Comfyui Node Migration

    jtydhr88/comfyui-custom-node-skills

    ComfyUI V1 to V3 node migration - converting legacy nodes to the V3 API.

    294 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about ComfyUI Custom Node Basics

What does ComfyUI Custom Node Basics do?

Explains the V3 API for ComfyUI custom nodes: node classes, schema, inputs and outputs, registration and how it differs from the legacy V1 style. ComfyUI nodes are Python classes, and the V3 API is the recommended way to write them.NodeOutput.

When should I use ComfyUI Custom Node Basics?

ComfyUI Custom Node Basics fits situations like: creating a new ComfyUI custom node with the V3 API; setting up the structure and registration of a custom node project; converting a V1 node to the V3 style.

How do I install ComfyUI Custom Node Basics in Claude Code?

Run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-basics -a claude-code`. Or copy the skill folder (plugins/comfyui-custom-nodes/skills/comfyui-node-basics in jtydhr88/comfyui-custom-node-skills) into .claude/skills/comfyui-node-basics in your project. Claude Code loads it when a task matches its description.

How do I install ComfyUI Custom Node Basics in Codex?

Run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-basics -a codex`. Or copy the skill folder (plugins/comfyui-custom-nodes/skills/comfyui-node-basics in jtydhr88/comfyui-custom-node-skills) into .agents/skills/comfyui-node-basics in your project. Codex loads it when a task matches its description.

Can I use ComfyUI Custom Node Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-basics -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-node-basics, .gemini/skills/comfyui-node-basics, .github/skills/comfyui-node-basics and .opencode/skills/comfyui-node-basics in your project.

What does ComfyUI Custom Node Basics need to run?

SKILL.md names no scripts, command-line tools or credentials: ComfyUI Custom Node Basics is instructions for the agent only. Our summary lists: A ComfyUI installation to load custom nodes into; Python.

Does ComfyUI Custom Node Basics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is ComfyUI Custom Node Basics safe to install?

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.

What licence does ComfyUI Custom Node Basics use?

ComfyUI Custom Node Basics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does ComfyUI Custom Node Basics use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to ComfyUI Custom Node Basics?

Skills that share tags, products or a category with ComfyUI Custom Node Basics: ComfyUI Custom Node Builder (ConstantineB6/comfy-pilot, 230 stars), Setup (guaardvark/guaardvark, 251 stars), AI Toolkit Trainer (artokun/comfyui-mcp, 793 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.

Who maintains ComfyUI Custom Node Basics?

jtydhr88 (a GitHub user) maintains it in jtydhr88/comfyui-custom-node-skills, which has 294 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on July 27, 2026.

Source: jtydhr88/comfyui-custom-node-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.