Agent skill

ComfyUI Custom Node Builder

by ConstantineB6 in ConstantineB6/comfy-pilot

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

MITAuto-check passedAI & LLM Engineering

Install ComfyUI Custom Node Builder

skills CLI
$ npx skills add ConstantineB6/comfy-pilot --skill comfy-nodes -a claude-code

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

GitHub CLI
$ gh skill install ConstantineB6/comfy-pilot comfy-nodes --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/ConstantineB6/comfy-pilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/comfy-nodes .claude/skills/comfy-nodes && 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
comfy-nodes
GitHub stars
230
Token cost
~897 tokens
SKILL.md length
192 words
Files
4 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: Identify inputs and outputs → Map types → Handle batch dimension
  • Creating a ComfyUI custom node from scratch
  • SKILL.md covers Quick Template, Converting Python to Node, Common Input Types and Checklist, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill helps the agent write ComfyUI custom nodes in Python, either from scratch or by wrapping an existing function. It supplies a quick class template built around INPUT_TYPES, RETURN_TYPES and an execute method, plus a conversion routine with three steps: identify the inputs and outputs of the original function, map Python types to ComfyUI types, and handle the batch dimension so every item in a [B,H,W,C] batch is processed.

A type table maps PIL images, NumPy arrays and OpenCV BGR arrays to the IMAGE tensor, scaled to the 0-1 range. A second table lists common input types such as IMAGE, MASK, LATENT, INT, FLOAT, STRING, BOOLEAN and COMBO with their formats and widget options. A short checklist covers INPUT_TYPES as a classmethod, returning a tuple, registering in NODE_CLASS_MAPPINGS and using slashes for submenu categories. Three reference files hold a full template, official documentation links and example nodes, and the comfy_search and comfy_spec MCP tools can look up similar existing nodes.

When your agent uses it

  • Creating a ComfyUI custom node from scratch
  • Wrapping an existing Python function or script as a node
  • Fixing node class structure, INPUT_TYPES or RETURN_TYPES
  • Converting PIL, NumPy or OpenCV image data to the tensor format ComfyUI expects

Example prompts

  • “Turn my apply_blur function into a ComfyUI custom node.”
  • “Create a ComfyUI node that takes an IMAGE and a MASK and returns the masked image.”
  • “My node crashes on batches, so check how it handles the batch dimension.”
  • “Find an existing blur node and show how its inputs are defined.”

Requirements

  • A ComfyUI installation to load the node into
  • Python

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Identify inputs and outputs
  2. Map types
  3. Handle batch dimension

What it can do on your machine

Read from SKILL.md and the folder at commit 772f639. 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 Builder loads about 897 tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 192 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~897
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

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 ConstantineB6/comfy-pilot at commit 772f639, republished under its MIT licence (© ConstantineB6). 192 words, ~897 tokens.

Download SKILL.mdSave it as .claude/skills/comfy-nodes/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
comfy-nodes
description
Use when the user wants to create a ComfyUI custom node, convert Python code to a node, make a node from a script, or needs help with ComfyUI node development, INPUT_TYPES, RETURN_TYPES, or node class structure.
version
1.0.0

ComfyUI Custom Node Development

This skill helps you create custom ComfyUI nodes from Python code.

Quick Template

python
class MyNode:
    @classmethod
    def INPUT_TYPES(cls):
        return {
            "required": {
                "image": ("IMAGE",),
                "value": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0}),
            },
            "optional": {
                "mask": ("MASK",),
            }
        }

    RETURN_TYPES = ("IMAGE",)
    RETURN_NAMES = ("output",)
    FUNCTION = "execute"
    CATEGORY = "Custom/MyNodes"

    def execute(self, image, value, mask=None):
        result = image * value
        return (result,)

NODE_CLASS_MAPPINGS = {"MyNode": MyNode}
NODE_DISPLAY_NAME_MAPPINGS = {"MyNode": "My Node"}

Converting Python to Node

When you have Python code to wrap:

Step 1: Identify inputs and outputs
python
# Original function
def apply_blur(image, radius=5):
    from PIL import ImageFilter
    return image.filter(ImageFilter.GaussianBlur(radius))
Step 2: Map types
Python TypeComfyUI TypeConversion
PIL ImageIMAGEtorch.from_numpy(np.array(pil) / 255.0)
numpy arrayIMAGEtorch.from_numpy(arr.astype(np.float32))
cv2 BGRIMAGEtorch.from_numpy(cv2.cvtColor(img, cv2.COLOR_BGR2RGB) / 255.0)
float 0-255IMAGEDivide by 255.0
Single imageBatchtensor.unsqueeze(0)
Step 3: Handle batch dimension

ComfyUI images are [B,H,W,C] - always process all batch items:

python
def execute(self, image, radius):
    batch_results = []
    for i in range(image.shape[0]):
        # Convert to PIL
        img_np = (image[i].cpu().numpy() * 255).astype(np.uint8)
        pil_img = Image.fromarray(img_np)

        # Your processing
        result = pil_img.filter(ImageFilter.GaussianBlur(radius))

        # Convert back
        result_np = np.array(result).astype(np.float32) / 255.0
        batch_results.append(torch.from_numpy(result_np))

    return (torch.stack(batch_results),)

Common Input Types

TypeShape/FormatWidget Options
IMAGE[B,H,W,C] float 0-1-
MASK[H,W] or [B,H,W] float 0-1-
LATENT{"samples": [B,C,H,W]}-
MODELModelPatcher-
CLIPCLIP encoder-
VAEVAE model-
CONDITIONING[(cond, pooled), ...]-
INTintegerdefault, min, max, step
FLOATfloatdefault, min, max, step, display
STRINGstrdefault, multiline
BOOLEANbooldefault
COMBOstrList of options as type

Checklist

  • INPUT_TYPES is a @classmethod
  • Return value is a tuple: return (result,)
  • Handle batch dimension [B,H,W,C]
  • Add to NODE_CLASS_MAPPINGS
  • Category uses / for submenus

References

Finding Similar Nodes

Use the MCP tools to find existing nodes for reference:

comfy_search("blur")        → Find blur implementations
comfy_spec("GaussianBlur")  → See how inputs are defined

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

Files

SKILL.md and 3 other files (references) in .claude/skills/comfy-nodes of ConstantineB6/comfy-pilot.

  • SKILL.md
  • references/NODE_TEMPLATE.md
  • references/OFFICIAL_DOCS.md
  • references/PURZ_EXAMPLES.md

Open the folder on GitHubat commit 772f639

Compare with similar skills

ComfyUI Custom Node Builder 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 Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ComfyUI Custom Node Builder this skillConstantineB6/comfy-pilot230—~897Automated safety check: PassMIT
Setupguaardvark/guaardvark2511 repos~1.2kAutomated safety check: PassMIT
Env Setupwwwzhouhui/skills_collection282—~3.5kAutomated safety check: NotesNone
Comfyui Skill OpenclawHuangYuChuh/ComfyUI_Skills_OpenClaw411—~2.7kAutomated safety check: PassApache-2.0
Vibecomfypeteromallet/VibeComfy150—~3.5kAutomated safety check: PassMIT
ComfyComfy-Org/comfy-skills219—~1.4kAutomated safety check: PassMIT

Similar skills

  • 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
  • Env Setup

    wwwzhouhui/skills_collection

    Checking and provisioning the machine's environment for the video-agent-kit plugin — probing for ffmpeg/ffprobe that actually carry the encoders and filters we render with (libx264/aac/libmp3lame…

    282 GitHub stars~3.5k tokensUpdated yesterday
    Media & CreativeAuto-check: notes
  • 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.

    411 GitHub stars~2.7k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Vibecomfy

    peteromallet/VibeComfy

    Drive the VibeComfy package to discover ComfyUI workflows, load ready Python templates, edit and compose them in a VibeWorkflow IR, validate, and execute either embedded locally, against an existing…

    150 GitHub stars~3.5k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Comfy

    Comfy-Org/comfy-skills

    Generate images, video, audio, and 3D with Comfy Cloud — search hundreds of models and workflow templates, run custom ComfyUI workflows, and manage generation jobs through the hosted Comfy Cloud MCP…

    219 GitHub stars~1.4k tokensUpdated today
    Agent WorkflowsAuto-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

Questions about ComfyUI Custom Node Builder

What does ComfyUI Custom Node Builder do?

Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches. This skill helps the agent write ComfyUI custom nodes in Python, either from scratch or by wrapping an existing function. It supplies a quick class template built around INPUT_TYPES, RETURN_TYPES and an execute method, plus a conversion routine with three steps: identify the inputs and outputs of the original function, map Python types to ComfyUI types, and handle the batch dimension so every item in a [B,H,W,C] batch is processed.

When should I use ComfyUI Custom Node Builder?

ComfyUI Custom Node Builder fits situations like: creating a ComfyUI custom node from scratch; wrapping an existing Python function or script as a node; fixing node class structure, INPUT_TYPES or RETURN_TYPES; converting PIL, NumPy or OpenCV image data to the tensor format ComfyUI expects.

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

Run `npx skills add ConstantineB6/comfy-pilot --skill comfy-nodes -a claude-code`. Or copy the skill folder (.claude/skills/comfy-nodes in ConstantineB6/comfy-pilot) into .claude/skills/comfy-nodes in your project. Claude Code loads it when a task matches its description.

How do I install ComfyUI Custom Node Builder in Codex?

Run `npx skills add ConstantineB6/comfy-pilot --skill comfy-nodes -a codex`. Or copy the skill folder (.claude/skills/comfy-nodes in ConstantineB6/comfy-pilot) into .agents/skills/comfy-nodes in your project. Codex loads it when a task matches its description.

Can I use ComfyUI Custom Node Builder 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 ConstantineB6/comfy-pilot --skill comfy-nodes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/comfy-nodes, .gemini/skills/comfy-nodes, .github/skills/comfy-nodes and .opencode/skills/comfy-nodes in your project.

What does ComfyUI Custom Node Builder need to run?

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

Does ComfyUI Custom Node Builder 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 Builder 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 Builder use?

ComfyUI Custom Node Builder 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 Builder use?

About 897 tokens (SKILL.md is roughly 3.6k 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 4.4k tokens, read only when the agent opens those files.

What are the alternatives to ComfyUI Custom Node Builder?

Skills that share tags, products or a category with ComfyUI Custom Node Builder: Setup (guaardvark/guaardvark, 251 stars), Env Setup (wwwzhouhui/skills_collection, 282 stars), Comfyui Skill Openclaw (HuangYuChuh/ComfyUI_Skills_OpenClaw, 411 stars) and Vibecomfy (peteromallet/VibeComfy, 150 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 Builder?

ConstantineB6 (a GitHub user) maintains it in ConstantineB6/comfy-pilot, which has 230 GitHub stars. The repository was last updated on February 16, 2026.

Source: ConstantineB6/comfy-pilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.