comfyui-operation-rules

comfyui-operation-rules is a skill for Claude Code, Codex from IvanYangYangXi/artclaw_bridge. It costs 69 tokens per session (1,767 once invoked), scanned A, original, MIT.

A set of operating rules for making changes in ComfyUI, a visual tool for building image-generation workflows from connected nodes.

In plain words
What is it for?
Use it before any ComfyUI operation to inspect available models and nodes, build and submit workflows, and preview their outputs.
Why use it?
It provides a fixed process for checking the environment, planning nodes, running the workflow, and visually verifying the result in a system without undo.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before any ComfyUI operation to inspect available models and nodes, build and submit workflows, and preview their outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add IvanYangYangXi/artclaw_bridge --skill comfyui-operation-rules
Clone the repo
git clone --depth 1 https://github.com/IvanYangYangXi/artclaw_bridge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for comfyui-operation-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules/github.svg)](https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules)
Your own site
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for comfyui-operation-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/comfyui-operation-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,767 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01767
Opus 5 $0.00034 $0.00883
Sonnet 5 $0.00014 $0.00353
Haiku 4.5 $0.00007 $0.00177

Measured 11d ago against content hash b5b99e05f823, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

comfyui-operation-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/official/comfyui/comfyui-operation-rules/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ComfyUI 操作规则

所有 ComfyUI 操作前必读。ComfyUI 无 Undo,操作不可逆。


🔴 执行流程(5 阶段)

阶段 内容 说明
1. 环境查询 查模型、节点类型、系统状态 不要猜!
2. 规划 确定节点链路、参数 先查 INPUT_TYPES()
3. 构建 Workflow 用 Python dict 逐步构建 增量构建,非一次性大 dict
4. 提交执行 submit_workflow(wf) 同步等待,返回结果
5. 视觉验证 save_preview 展示输出 必须让用户看到结果

🔴 预注入变量

run_python 已注入以下变量,直接使用,无需 import

变量 类型 说明
S [] 无选中概念(始终空)
W None 无当前文件概念
L ComfyUI Lib L.nodes, L.folder_paths, L.execution, L.server, L.model_management
nodes module 节点注册表,nodes.NODE_CLASS_MAPPINGS
folder_paths module 模型/输出路径管理
client ComfyUIClient HTTP API 客户端
submit_workflow func 提交 workflow 并等待完成,返回 {prompt_id, outputs, images}
save_preview func 保存图片并输出 [IMAGE:] 标记

🔴 Workflow JSON 格式

workflow = {
    "1": {                                    # 节点 ID(字符串)
        "class_type": "CheckpointLoaderSimple",
        "inputs": {
            "ckpt_name": "sd_xl_base_1.0.safetensors"
        }
    },
    "2": {
        "class_type": "CLIPTextEncode",
        "inputs": {
            "text": "a cat",
            "clip": ["1", 1]                  # 连接语法: ["源节点ID", 输出索引]
        }
    }
}

连接语法: ["source_node_id", output_index] — 引用另一个节点的第 N 个输出(0-indexed)。


🔴 绝对禁止(Critical Rules)

规则 说明
⛔ NEVER 猜 class_type 先查 nodes.NODE_CLASS_MAPPINGS.keys()client.get_object_info()
⛔ NEVER 猜参数名 先查 nodes.NODE_CLASS_MAPPINGS["KSampler"].INPUT_TYPES()
⛔ NEVER 猜模型名 先查 folder_paths.get_filename_list("checkpoints")
⛔ NEVER 硬编码 seed import random; random.randint(0, 2**63) 除非用户指定
⛔ NEVER 忘记展示结果 生成后必须 save_preview 让用户看到

🔴 代码拆分规则

增量构建 workflow dict,不要一次性写一个巨大字面量。

# ✅ 推荐:逐步构建
wf = {}
wf["1"] = {"class_type": "CheckpointLoaderSimple", "inputs": {"ckpt_name": ckpt}}
wf["2"] = {"class_type": "CLIPTextEncode", "inputs": {"text": prompt, "clip": ["1", 1]}}
# ... 逐个添加

# ⛔ 避免:一次性巨大 dict(错误难定位)

Read the full file on GitHub · 192 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 192 lines · 69 tokens per session scan A b5b99e05f823

Subscribe to this mod's changes

comfyui-operation-rules is a skill published in the GitHub repository IvanYangYangXi/artclaw_bridge (35 stars, last pushed 4mo ago), licensed MIT. It adds 69 tokens to every session and 1,767 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dcc-mcp-core

Foundation library for the DCC Model Context Protocol (MCP) ecosystem. Provides Rust-powered action management, skills system, IPC transport, MCP Streamable HTTP server (2025-03-26 spec, with 2025-06-18 and 2025-11-25 awareness), sandbox security, shared memory, screen capture, USD scene support, and telemetry for…

dcc-mcp/dcc-mcp-core · 109 tokens

maya-pipeline

Domain skill — Maya asset pipeline orchestration: set up project directory structures, export scenes to USD, and coordinate multi-step DCC workflows. Use when initialising a Maya project or exporting assets for a downstream pipeline. Not for raw geometry editing — use maya-geometry for that. Not for low-level USD file…

dcc-mcp/dcc-mcp-core · 74 tokens

imagemagick-tools

Infrastructure skill — image processing and manipulation via ImageMagick: resize, composite, convert formats, add watermarks. Use when batch-processing textures, thumbnails, or rendered images at the file level. Not for in-DCC texture or material editing — use a domain skill bound to the specific DCC for that.

dcc-mcp/dcc-mcp-core · 67 tokens

asset-source

Gateway skill for cross-DCC asset import — search and resolve assets into a validated AssetDescriptor (local path + attribution). Demo source returns static catalog entries; production sources can add download or remote resolution without changing the contract.

dcc-mcp/dcc-mcp-core · 47 tokens

ffmpeg-media

Infrastructure skill — media conversion and processing via FFmpeg: convert video/audio formats, extract frames, resize, and transcode. Use when manipulating raw media files (mp4, mov, wav, image sequences) regardless of DCC context. Not for DCC-specific render output handling — use a domain pipeline skill for…

dcc-mcp/dcc-mcp-core · 77 tokens

maya-geometry

Domain skill — Maya geometry primitives: create spheres, cubes, cylinders; bevel, extrude, and merge polygon components. Use for individual geometry creation or editing operations inside Maya. Not for full asset export pipelines — use maya-pipeline for that. Not for USD scene inspection — use usd-tools for that.

dcc-mcp/dcc-mcp-core · 65 tokens