Agent skill

Comfyui Node Packaging

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

ComfyUI custom node project structure - directory layout, init.py, registration, requirements.txt, publishing, WEBDIRECTORY.

MITAuto-check passedAI & LLM Engineering

Install Comfyui Node Packaging

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

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

GitHub CLI
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-packaging --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-packaging .claude/skills/comfyui-node-packaging && 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-packaging
GitHub stars
294
Token cost
~2.3k tokens
SKILL.md length
195 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

ComfyUI custom node project structure - directory layout, init.py, registration, requirements.txt, publishing, WEBDIRECTORY.

  • Works in 2 steps: Create pyproject.toml → Publish
  • Setting up a new custom node project
  • SKILL.md covers Project Structure, Entry Point: init.py, Node Definitions File and Dependencies: requirements.txt, plus 12 more sections
  • Calls pip; reaches github.com; needs COMFY_API_KEY

What it does

Comfyui Node Packaging is an agent skill from jtydhr88/comfyui-custom-node-skills. ComfyUI custom node project structure - directory layout, init.py, registration, requirements.txt, publishing, WEBDIRECTORY. Use when setting up a new custom node project, packaging nodes, or publishing to the registry.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Diffusion and image models. It works with ComfyUI. The repository describes itself as: A curated collection of [Claude Code skills](https://docs.anthropic.com/en/docs/claude-code/skills) for developing ComfyUI custom nodes. These skills give Claude comprehensive… The licence is MIT.

When your agent uses it

  • Setting up a new custom node project
  • Packaging nodes
  • Publishing to the registry

Example prompts

  • “/comfyui-node-packaging”

Requirements

  • Python 3
  • A credential in COMFY_API_KEY

Workflow steps

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

  1. Create pyproject.toml
  2. Publish

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

    Shell commands in SKILL.md call:

    • pip

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • COMFY_API_KEY

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

Context cost

Comfyui Node Packaging loads about 2.3k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 195 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 jtydhr88/comfyui-custom-node-skills at commit 63a78dc, republished under its MIT licence (© jtydhr88). 195 words, ~2,278 tokens.

Download SKILL.mdSave it as .claude/skills/comfyui-node-packaging/SKILL.md (or your agent's skills folder).
name
comfyui-node-packaging
description
ComfyUI custom node project structure - directory layout, __init__.py, registration, requirements.txt, publishing, WEB_DIRECTORY. Use when setting up a new custom node project, packaging nodes, or publishing to the registry.

ComfyUI Custom Node Packaging

How to structure, register, and publish a custom node package.

Project Structure

ComfyUI/custom_nodes/
  my_custom_nodes/
    __init__.py            # Entry point (required)
    nodes.py               # Node class definitions
    requirements.txt       # Python dependencies
    pyproject.toml         # Package metadata
    README.md              # Documentation
    js/                    # Frontend extensions (optional)
    │   └── my_extension.js
    docs/                  # Help pages (optional)
    │   └── MyNode.md
    locales/               # i18n translations (optional)
        └── zh/
            └── main.json

Entry Point: init.py

python
# __init__.py
from typing_extensions import override
from comfy_api.latest import ComfyExtension, io

from .nodes import MyNode1, MyNode2, MyNode3

WEB_DIRECTORY = "./js"  # optional: frontend JS extensions

class MyNodesExtension(ComfyExtension):
    @override
    async def get_node_list(self) -> list[type[io.ComfyNode]]:
        return [MyNode1, MyNode2, MyNode3]

    @override
    async def on_load(self):
        # Optional: run initialization logic when extension loads
        pass

async def comfy_entrypoint() -> MyNodesExtension:
    return MyNodesExtension()
V1 Registration (Legacy)
python
# __init__.py
from .nodes import MyNode1, MyNode2

NODE_CLASS_MAPPINGS = {
    "MyNode1": MyNode1,
    "MyNode2": MyNode2,
}

NODE_DISPLAY_NAME_MAPPINGS = {
    "MyNode1": "My Node 1",
    "MyNode2": "My Node 2",
}

WEB_DIRECTORY = "./js"

__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]

Node Definitions File

python
# nodes.py
import torch
from comfy_api.latest import io

class MyNode1(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="MyNode1_UniqueID",   # globally unique
            display_name="My Node 1",
            category="my_nodes",
            description="Does something useful",
            inputs=[
                io.Image.Input("image"),
                io.Float.Input("value", default=1.0, min=0.0, max=10.0),
            ],
            outputs=[io.Image.Output("IMAGE")],
        )

    @classmethod
    def execute(cls, image, value):
        return io.NodeOutput(image * value)

Dependencies: requirements.txt

# requirements.txt
opencv-python>=4.8.0
requests>=2.28.0

Important: Only list dependencies not already included with ComfyUI. ComfyUI ships with: torch, torchvision, torchaudio, numpy, PIL/Pillow, scipy, safetensors, transformers, accelerate.

pyproject.toml

toml
[project]
name = "comfyui-my-nodes"
version = "1.0.0"
description = "My custom nodes for ComfyUI"
license = "MIT"
requires-python = ">=3.10"

[project.urls]
Repository = "https://github.com/username/comfyui-my-nodes"

Frontend Extensions (JavaScript)

Place .js files in the WEB_DIRECTORY:

my_custom_nodes/
  js/
    my_widgets.js      # Custom widget implementations
    my_extension.js    # Extension hooks
python
# __init__.py
WEB_DIRECTORY = "./js"

All .js files in this directory are loaded by the frontend automatically. CSS and other resources can be accessed at extensions/my_custom_nodes/filename.css.

Help Pages

Create markdown documentation per node:

my_custom_nodes/
  docs/
    MyNode1.md         # filename matches node_id
markdown
<!-- docs/MyNode1.md -->
# My Node 1

Processes images with adjustable value.

## Inputs
- **image**: The input image
- **value**: Processing strength (0.0 - 10.0)

## Outputs
- **IMAGE**: The processed image

Internationalization (i18n)

my_custom_nodes/
  locales/
    zh/
      main.json
      nodeDefs.json    # node definition translations
json
// locales/zh/nodeDefs.json
{
    "MyNode1_UniqueID": {
        "display_name": "我的节点1",
        "description": "处理图像",
        "inputs": {
            "image": { "display_name": "图像" },
            "value": { "display_name": "数值", "tooltip": "处理强度" }
        }
    }
}

Single-File Node

For very simple nodes, everything can be in one file:

python
# ComfyUI/custom_nodes/my_simple_node.py
import torch
from comfy_api.latest import ComfyExtension, io
from typing_extensions import override

class InvertImage(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="SimpleInvert",
            display_name="Simple Invert",
            category="image",
            inputs=[io.Image.Input("image")],
            outputs=[io.Image.Output("IMAGE")],
        )

    @classmethod
    def execute(cls, image):
        return io.NodeOutput(1.0 - image)


class SimpleExtension(ComfyExtension):
    @override
    async def get_node_list(self):
        return [InvertImage]

async def comfy_entrypoint():
    return SimpleExtension()

Key Imports

python
# V3 API core
from comfy_api.latest import ComfyExtension, io, ui
from comfy_api.latest import ComfyAPI          # async runtime API (use with await)
from comfy_api.latest import ComfyAPISync      # sync runtime API (use in sync execute)
from comfy_api.latest import Input             # Input.Image, Input.Audio, Input.Mask, Input.Latent, Input.Video
from comfy_api.latest import InputImpl         # InputImpl.VideoFromFile, InputImpl.VideoFromComponents
from comfy_api.latest import Types             # Types.MESH, Types.VOXEL, Types.File3D, Types.VideoCodec
from typing_extensions import override

# Common utilities
import folder_paths                            # directory management
from server import PromptServer                # server-to-client messaging
from comfy_execution.graph_utils import GraphBuilder  # node expansion

Using folder_paths

ComfyUI provides folder_paths for accessing standard directories:

python
import folder_paths

# Standard directories
input_dir = folder_paths.get_input_directory()
output_dir = folder_paths.get_output_directory()
temp_dir = folder_paths.get_temp_directory()

# Model directories
checkpoint_paths = folder_paths.get_folder_paths("checkpoints")
lora_paths = folder_paths.get_folder_paths("loras")

# Register custom model folder
folder_paths.add_model_folder_path("my_models", "/path/to/models")

# Get model file list
models = folder_paths.get_filename_list("checkpoints")

Publishing to ComfyUI Registry

1. Create pyproject.toml
toml
[project]
name = "comfyui-my-nodes"
version = "1.0.0"
description = "My custom nodes"
license = "MIT"

[tool.comfy]
PublisherId = "your-publisher-id"
2. Publish
bash
comfy node publish
CI/CD with GitHub Actions
yaml
# .github/workflows/publish.yml
name: Publish to ComfyUI Registry
on:
  push:
    tags:
      - 'v*'
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - run: pip install comfy-cli
      - run: comfy node publish
        env:
          COMFY_API_KEY: ${{ secrets.COMFY_API_KEY }}

Scaffolding with comfy-cli

bash
# Install comfy-cli
pip install comfy-cli

# Create new custom node project
cd ComfyUI/custom_nodes
comfy node scaffold

This generates the boilerplate structure with all necessary files.

Node ID Best Practices

  • Use a globally unique prefix: "MyProject_NodeName" or "username.NodeName"
  • Never change node_id after release (breaks saved workflows)
  • Use display_name for user-facing name changes
  • Use search_aliases for discoverability: search_aliases=["alias1", "alias2"]

Common Patterns

Organizing Multiple Node Files
python
# __init__.py
from typing_extensions import override
from comfy_api.latest import ComfyExtension, io

from .image_nodes import BlurNode, SharpenNode, ResizeNode
from .text_nodes import ConcatNode, FormatNode
from .util_nodes import SwitchNode, DebugNode

class MyExtension(ComfyExtension):
    @override
    async def get_node_list(self):
        return [
            BlurNode, SharpenNode, ResizeNode,
            ConcatNode, FormatNode,
            SwitchNode, DebugNode,
        ]

async def comfy_entrypoint():
    return MyExtension()
Conditional Node Loading
python
class MyExtension(ComfyExtension):
    @override
    async def get_node_list(self):
        nodes = [BasicNode]
        try:
            import cv2
            from .opencv_nodes import OpenCVNode
            nodes.append(OpenCVNode)
        except ImportError:
            pass
        return nodes

See Also

  • comfyui-node-basics - Node class structure
  • comfyui-node-frontend - JavaScript extension details
  • comfyui-node-migration - V1 to V3 migration

© 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-packaging of jtydhr88/comfyui-custom-node-skills.

Open the folder on GitHubat commit 63a78dc

Compare with similar skills

Comfyui Node Packaging 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 Node Packaging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Comfyui Node Packaging this skilljtydhr88/comfyui-custom-node-skills294—~2.3kAutomated safety check: PassMIT
Comfyui AnimatoolShiroEirin/comfyui-good-anima476—~4.6kAutomated safety check: PassGPL-3.0
Comfyui Agent Skill MieMieMieeeee/comfyui-agent-skill116—~3.9kAutomated safety check: PassApache-2.0
Importing SubgraphsComfy-Org/workflow_templates1.3k—~1.5kAutomated safety check: PassMIT
Comfyui Node Addernixified-ai/flake841—~806Automated safety check: PassAGPL-3.0
Managing BundlesComfy-Org/workflow_templates1.3k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Comfyui Animatool

    ShiroEirin/comfyui-good-anima

    Route ALL Anima image generation: validate Danbooru hard anchors, form visual brief, assemble English prompts and args, then load comfyui-manager for workflow execution.

    476 GitHub stars~4.6k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Comfyui Agent Skill Mie

    MieMieeeee/comfyui-agent-skill

    Agent skill for running registered ComfyUI workflows through a stable CLI, and for importing a user's own ComfyUI workflow into their private registry after review.

    116 GitHub stars~3.9k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Importing Subgraphs

    Comfy-Org/workflow_templates

    Imports and registers subgraph blueprints into the ComfyUI workflowtemplates repository.

    1.3k GitHub stars~1.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Comfyui Node Adder

    nixified-ai/flake

    Adds new custom nodes to the ComfyUI Nix project, including npins fetching, dependency resolution in package.nix, disabling impure pip installs, and verifying the Nix build.

    841 GitHub stars~806 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Managing Bundles

    Comfy-Org/workflow_templates

    Manages template bundles, categories, and ordering in the ComfyUI template repository.

    1.3k GitHub stars~1.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Headroom

    momori777/Artemis

    SmartCrusher + CCR context compression — crunch large JSON arrays, tool outputs, and search results to save tokens.

    377 GitHub stars~562 tokensUpdated 7 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 Custom Node Basics

    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.

    294 GitHub stars~1.6k 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

Works with

Questions about Comfyui Node Packaging

What does Comfyui Node Packaging do?

ComfyUI custom node project structure - directory layout, init.py, registration, requirements.txt, publishing, WEBDIRECTORY. Comfyui Node Packaging is an agent skill from jtydhr88/comfyui-custom-node-skills.txt, publishing, WEBDIRECTORY.

When should I use Comfyui Node Packaging?

Comfyui Node Packaging fits situations like: setting up a new custom node project; packaging nodes; publishing to the registry.

How do I install Comfyui Node Packaging in Claude Code?

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

How do I install Comfyui Node Packaging in Codex?

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

Can I use Comfyui Node Packaging 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-packaging -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-packaging, .gemini/skills/comfyui-node-packaging, .github/skills/comfyui-node-packaging and .opencode/skills/comfyui-node-packaging in your project.

What does Comfyui Node Packaging need to run?

Going by SKILL.md and its folder, Comfyui Node Packaging needs the command-line tools its instructions call (pip) and credentials named COMFY_API_KEY. Our summary lists: Python 3; A credential in COMFY_API_KEY.

Does Comfyui Node Packaging access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Comfyui Node Packaging 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 Node Packaging use?

Comfyui Node Packaging 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 Node Packaging use?

About 2.3k tokens (SKILL.md is roughly 9.1k 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 Node Packaging?

Skills that share tags, products or a category with Comfyui Node Packaging: Comfyui Animatool (ShiroEirin/comfyui-good-anima, 476 stars), Comfyui Agent Skill Mie (MieMieeeee/comfyui-agent-skill, 116 stars), Importing Subgraphs (Comfy-Org/workflow_templates, 1.3k stars) and Comfyui Node Adder (nixified-ai/flake, 841 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Comfyui Node Packaging?

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.