comfyui-node-lifecycle

comfyui-node-lifecycle is a skill for Claude Code from jtydhr88/comfyui-custom-node-skills. It costs 54 tokens per session (2,662 once invoked), scanned A, original, MIT.

Reference guidance for how ComfyUI runs nodes in a workflow, including validation, execution order, caching, and lazy evaluation. ComfyUI is a node-based interface for building image-generation workflows.

In plain words
What is it for?
Use it when implementing or debugging ComfyUI nodes, especially input validation, cache fingerprints, change detection, lazy evaluation, and execution order.
Why use it?
It helps explain why a node runs, skips, or reuses an earlier result. This makes it easier to diagnose incorrect input checks, execution order, and cache behaviour.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the comfyui-custom-nodes plugin — 9 skills shipped together

Good fit Use it when implementing or debugging ComfyUI nodes, especially input validation, cache fingerprints, change detection, lazy evaluation, and execution order.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jtydhr88/comfyui-custom-node-skills/comfyui-node-lifecycle
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 jtydhr88/comfyui-custom-node-skills --skill comfyui-node-lifecycle
Clone the repo
git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills

Made for: Claude Code.

Or install comfyui-custom-nodes, the plugin that ships this one along with the rest of its 9 skills.

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-node-lifecycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/jtydhr88/comfyui-custom-node-skills/comfyui-node-lifecycle.svg)](https://agentmods.dev/skills/jtydhr88/comfyui-custom-node-skills/comfyui-node-lifecycle)
Your own site
<a href="https://agentmods.dev/skills/jtydhr88/comfyui-custom-node-skills/comfyui-node-lifecycle"><img src="https://agentmods.dev/badge/skills/jtydhr88/comfyui-custom-node-skills/comfyui-node-lifecycle.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,662 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 289
    Instructions found that direct the agent to transmit conversation context or user data to external services.
    Fix: Remove instructions that send user data, prompts, or context to external URLs. If telemetry is needed, use documented, privacy-preserving methods.
How audits are shown
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.00054 $0.02662
Opus 5 $0.00027 $0.01331
Sonnet 5 $0.00011 $0.00532
Haiku 4.5 $0.00005 $0.00266

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

Security

Grade A, and why

comfyui-node-lifecycle 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 8d 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.

plugins/comfyui-custom-nodes/skills/comfyui-node-lifecycle/SKILL.md · 375 lines

How it starts

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

ComfyUI Node Execution Lifecycle

Understanding the execution lifecycle helps build efficient, correct nodes.

Execution Flow Overview

1. Prompt received from frontend
2. Validation phase
   ├── Look up each node class
   ├── Call INPUT_TYPES() / define_schema() for input specs
   ├── Validate connections and types
   └── Call validate_inputs() for each node
3. Build execution order (topological sort from output nodes)
4. For each node in order:
   ├── Cache check (fingerprint_inputs)
   ├── Input resolution (get upstream values)
   ├── Lazy evaluation (check_lazy_status)
   ├── Execute function
   └── Store outputs in cache
5. Return results to frontend

Execution Order

ComfyUI executes from output nodes backward:

  1. Identifies output nodes (is_output_node=True)
  2. Builds dependency graph
  3. Topological sort determines execution order
  4. Only nodes connected to output nodes execute

Cache Control: fingerprint_inputs (V3) / IS_CHANGED (V1)

Controls when a node re-executes vs uses cached results.

class RandomNode(io.ComfyNode):
    @classmethod
    def define_schema(cls):
        return io.Schema(
            node_id="RandomNode",
            display_name="Random Value",
            category="utils",
            inputs=[
                io.Float.Input("min_val", default=0.0),
                io.Float.Input("max_val", default=1.0),
            ],
            outputs=[io.Float.Output("FLOAT")],
        )

    @classmethod
    def fingerprint_inputs(cls, min_val, max_val):
        """Return value compared to last run. Different value = re-execute."""
        # Return unique value each time to always re-execute
        import time
        return time.time()

    @classmethod
    def execute(cls, min_val, max_val):
        import random
        return io.NodeOutput(random.uniform(min_val, max_val))

How caching works:

  • Before execution, fingerprint_inputs() is called with the same args as execute()
  • Return value is compared to the previous run's return value
  • If same → skip execution, use cached output
  • If different → re-execute the node
  • If fingerprint_inputs is not defined → cache based on input values

Read the full file on GitHub · 375 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. 8d ago First seen · 375 lines · 54 tokens per session scan A 34a113d69507

Subscribe to this mod's changes

comfyui-node-lifecycle is a skill published in the GitHub repository jtydhr88/comfyui-custom-node-skills (277 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 2,662 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

seedance-troubleshoot

This skill should be used when a Seedance 2.0 output is blurry, jittery, off-prompt, morphing, blocked, visually generic, unstable, desynced, inconsistent, or otherwise fails and needs root-cause diagnosis.

Emily2040/seedance-2.0 · 56 tokens

cli-demo-generator

Generates professional animated CLI demos as GIFs using VHS terminal recordings. Handles tape file creation, self-bootstrapping demos with hidden setup, output noise filtering, post-processing speed-up, and frame-level verification. Use when users want to create terminal demos, record CLI workflows as GIFs, generate…

daymade/claude-code-skills · 114 tokens

terminal-screenshot

Render a terminal CLI program's colored output to a PNG so Claude can actually SEE the real visual result — color contrast, alignment, background blocks, highlighting — instead of only reading plain text and raw ANSI escape codes. Use this whenever verifying or debugging how a CLI tool looks in the terminal: delta git…

daymade/claude-code-skills · 206 tokens

watch

Watch a rendered video (whole file or specific ranges) at a chosen fidelity and emit a timestamp-keyed observation report. Observation only — no edits, no verdicts.

gooseworks-ai/goose-skills · 36 tokens

ffmpeg-media-info

Analyze media file properties - duration, resolution, bitrate, codecs, and stream information.

benchflow-ai/skillsbench · 21 tokens

debug-render

Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node. Render one branch up to an output, preview-tap latents/masks/preprocessor maps, localize the first bad stage, then fix. Use when a final image/video completes but looks wrong, such as artifacts, wrong…

artokun/comfyui-mcp · 117 tokens