- name
SKILL.md
स्किल फ़ाइल पब्लिशर की रिपॉज़िटरी में ही रहती है।
कॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add artokun/comfyui-mcp --skill comfyui-node-registry -a cursor -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add artokun/comfyui-mcp --skill comfyui-node-registry -a claude-code -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add artokun/comfyui-mcp --skill comfyui-node-registry -a codex -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add artokun/comfyui-mcp --skill comfyui-node-registry -a grok -yकॉपी किया गया संदेश Grok Bot चैट में भेजें। Bot यह SKILL.md GitHub से लाता है और उसे उन स्किल में जोड़ देता है जो आपके सभी Bot साझा करते हैं।
Install this skill: https://github.com/artokun/comfyui-mcp/tree/HEAD/plugin/skills/comfyui-node-registryपब्लिशर से
This skill covers writing a ComfyUI custom node pack and publishing it to the Comfy Registry (registry.comfy.org), the public catalog that powers ComfyUI-Manager. For using existing nodes in workflows, see the comfyui-core skill instead.
A node pack is a Python package placed under ComfyUI/custom_nodes/<name>/. The package __init__.py must export NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS; WEB_DIRECTORY is optional (only if the pack ships frontend JS).
ComfyUI/custom_nodes/my-node-pack/
├── __init__.py # exports the mappings ComfyUI scans for
├── nodes.py # node class definitions
├── pyproject.toml # registry metadata (required to publish)
├── requirements.txt # optional Python deps
├── .comfyignore # optional — exclude files from the published archive
├── LICENSE
├── README.md
└── web/js/ # optional frontend extension (see WEB_DIRECTORY)
__init__.pyfrom .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
# Optional: serve frontend JS/CSS from this folder (path relative to __init__.py)
WEB_DIRECTORY = "./web/js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
nodes.py)class ImageSelector:
CATEGORY = "example" # menu path where the node appears
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"images": ("IMAGE",),
"mode": (["brightest", "reddest", "greenest", "bluest"],),
},
"optional": {
"threshold": ("FLOAT", {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01}),
"count": ("INT", {"default": 1, "min": 1, "max": 64}),
"label": ("STRING", {"default": "", "multiline": False}),
},
}
RETURN_TYPES = ("IMAGE",) # tuple of output data types
RETURN_NAMES = ("image",) # optional friendly output names
FUNCTION = "choose_image" # name of the method ComfyUI calls
OUTPUT_NODE = False # True for terminal nodes (e.g. SaveImage)
def choose_image(self, images, mode, threshold=0.5, count=1, label=""):
import torch
brightness = [torch.mean(img.flatten()).item() for img in images]
best = brightness.index(max(brightness))
return (images[best].unsqueeze(0),) # MUST return a tuple
NODE_CLASS_MAPPINGS = {
"ImageSelector": ImageSelector, # globally unique class_type key
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ImageSelector": "Image Selector", # label shown in the UI
}
The options dict drives the UI widget for each input type:
("INT", {"default": 0, "min": 0, "max": 100, "step": 1})("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.1})("STRING", {"default": "", "multiline": True})(["a", "b", "c"],), a literal list, becomes a dropdown("IMAGE",), ("LATENT",), ("MODEL",) etc. are typed connections (no widget)The executing method must return a tuple matching RETURN_TYPES, even for a single output (return (result,)).
pyproject.toml — Registry MetadataRequired to publish. comfy node init scaffolds this file. See references/pyproject.toml for a fully-commented example.
[project]
name = "my-node-pack" # unique & IMMUTABLE; lowercase, <100 chars, no "ComfyUI" prefix
description = "What this node pack does"
version = "1.0.0" # semantic version X.Y.Z — bump to publish a new version
license = { file = "LICENSE" } # or { text = "MIT License" }
requires-python = ">=3.10"
dependencies = [
"comfyui-frontend-package<=1.21.6", # optional — pin frontend if you ship UI
]
classifiers = [
"Operating System :: OS Independent",
]
[project.urls]
Repository = "https://github.com/you/my-node-pack" # REQUIRED — must be a valid repo URL
Documentation = "https://github.com/you/my-node-pack/wiki"
"Bug Tracker" = "https://github.com/you/my-node-pack/issues"
[tool.comfy]
PublisherId = "your-publisher-id" # the id after @ on your registry profile
DisplayName = "My Node Pack" # human-friendly name in the registry
Icon = "https://raw.githubusercontent.com/you/my-node-pack/main/icon.png" # square, max 400x400px
requires-comfyui = ">=1.0.0" # optional ComfyUI version constraint
.comfyignore uses .gitignore syntax; files listed are excluded from the published archive. Use it to drop tests, examples, large assets, and dev files.[tool.comfy].includes is the inverse: it force-includes folders that would otherwise be skipped (e.g. a bundled web/dist).@ on your profile page. It is globally unique and cannot be changed. Use it for PublisherId in pyproject.toml.Install comfy-cli (requires Python 3.10+; a virtualenv is recommended):
pip install comfy-cli
Versions are immutable. Once a version is published it cannot be modified or overwritten. To ship changes, bump version and publish again. To pull a bad version, deprecate it on the website (More Actions > Deprecate), which prompts users to upgrade rather than deleting it.
Automate publishing on every version bump. Add the API key as a repo secret named REGISTRY_ACCESS_TOKEN (Settings > Secrets and variables > Actions), then create .github/workflows/publish_action.yml:
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
main but only when pyproject.toml changes (i.e. when you bump version). workflow_dispatch allows manual runs.main, update the branches: list.pyproject.toml and publishes it, so the typical flow is bump version, commit, push to main, done.If your pack adds custom UI (widgets, sidebar tabs, menu items), set WEB_DIRECTORY in __init__.py and ship JS there. New frontend extensions should target the modern @comfyorg/extension-api rather than poking at legacy globals; pull in @comfyorg/comfyui-frontend-types for TypeScript types (npm install -D @comfyorg/comfyui-frontend-types). For the full frontend authoring workflow (defineExtension/defineNode/defineWidget and the defineSidebarTab/defineCommand/defineSetting shell APIs), see the sibling comfyui-frontend-extensions skill.
FUNCTION method must return (value,), not return value, even for one output.RETURN_TYPES without a comma. ("IMAGE") is a string, not a tuple. Write ("IMAGE",).INPUT_TYPES not a @classmethod. ComfyUI calls it on the class; missing the decorator breaks node loading.version instead; deprecate bad ones on the website.name after publishing. It's immutable and globally unique. Pick a good name (no "ComfyUI" prefix) up front.[project.urls].Repository. It's required; publishing fails without a valid repo URL.PublisherId. Use the id after the @ on your profile, not your display name.NODE_CLASS_MAPPINGS. The key is the class_type stored in workflow JSON. Changing it breaks every saved workflow that used the node.REGISTRY_ACCESS_TOKEN secret; never in pyproject.toml or the repo.comfy node publish.Authoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI
---name: comfyui-node-registrydescription: Authoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml…---# plugin/skills/comfyui-node-registry/SKILL.mdFAQ
पब्लिशर से plugin/skills/comfyui-node-registry/SKILL.md डाउनलोड करें, या पाथ कॉपी करके रिपॉज़िटरी खोलें। PlugMCP स्किल को सूचीबद्ध करता है, फ़ाइल होस्ट नहीं करता।
पब्लिशर इसे https://github.com/artokun/comfyui-mcp पर रखता है।
Claude, Cursor, Codex और Grok Build वह SKILL.md पढ़ सकते हैं जिसे आप पब्लिशर की रिपॉज़िटरी से जोड़ते हैं। जब आप चैट में स्किल के GitHub फ़ोल्डर का लिंक भेजते हैं, तो Grok Bot उसे इंस्टॉल कर देता है।
includes | [tool.comfy] | Array forcing extra folders into the published archive. |