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.5 $0.00028 $0.00707
Sonnet 5.5 $0.00014 $0.00353
Haiku 4.5 $0.00007 $0.00177

Measured 3mo ago against content hash b5b99e05f823, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (39 stars, last pushed 7mo ago), licensed MIT. It adds 69 tokens to every session and 1,767 once invoked, about $0.0003 per session on Opus 5.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

comfyui-operation-rules compared with skills from other repositories

comfyui-operation-rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
comfyui-operation-rulesIvanYangYangXi/artclaw_bridgeSkill397mo agoMITA69Claude Code, Codex
dcc-mcpdcc-mcp/dcc-mcp-coreSkill78todayMITA167Claude Code
dcc-mcp-skills-creatordcc-mcp/dcc-mcp-coreSkill78todayMITA74Claude Code
dcc-cuadcc-mcp/dcc-mcp-coreSkill78todayMITA131Claude Code, Codex
marketplace-publish-extensiondcc-mcp/dcc-mcp-coreSkill78todayMITA88Claude Code
mesh-opsdcc-mcp/dcc-mcp-coreSkill78todayMITA85Claude Code
clawhub-compatdcc-mcp/dcc-mcp-coreSkill78todayMITA59Claude Code