comfy-fragments

Compose reusable ComfyUI workflow fragments from large JSON graphs.

931|144|Updated Apr 14, 2024
One-click install
npx skills add https://github.com/Comfy-Org/comfy-cli --skill comfy-fragments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comfy-fragments
Source: https://github.com/Comfy-Org/comfy-cli/tree/main/comfy_cli/skills/comfy-fragments
Command: npx skills add https://github.com/Comfy-Org/comfy-cli --skill comfy-fragments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns large, fragile ComfyUI workflow JSON files into reusable, typed fragments that are easier to edit, validate, and extend.

Core Features & Use Cases

  • Fragment composition: Assemble bigger workflows from smaller JSON building blocks with explicit inputs, outputs, and parameters.
  • Workflow refactoring: Decompose existing workflows into reusable fragments instead of hand-editing node IDs or widget values.
  • Blueprint-driven pipelines: Reuse the same fragment library across multiple blueprint files for image, video, audio, and editing workflows.
  • Validation and provenance: Catch bad bindings, missing aliases, and malformed metadata before running a job, while preserving source traceability.
  • Use Case: A production workflow that has grown beyond a few hundred lines can be split into named fragments, recomposed from a blueprint, and safely iterated without duplicating node chains.

Quick Start

Use the comfy-fragments skill to decompose a working ComfyUI workflow into a reusable fragment, then compose it from a blueprint and validate the result before running it.

Frequently Asked Questions about comfy-fragments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I break down a large ComfyUI workflow JSON into smaller reusable parts?

Decompose large ComfyUI workflow JSON graphs into smaller, typed fragments using blueprint references and provenance tracking. This refactoring process extracts repeated node patterns into modular, composable units that are easier to edit and extend.

How do I assemble a full ComfyUI pipeline from modular workflow fragments?

Compose full ComfyUI pipelines from smaller JSON building blocks by defining explicit inputs, outputs, and parameters within a blueprint file. The composition process reinjects loaders and validates bindings to assemble the final workflow.

Can ComfyUI workflow fragments be validated before running a job?

Validate ComfyUI workflow fragments before running by checking for bad bindings, missing aliases, and malformed metadata. This validation ensures compose and decompose operations are safe and errors are caught early.

What is the best way to manage repeated node patterns across multiple ComfyUI blueprints?

Manage repeated node patterns by building a reusable fragment library applied across multiple blueprint files. This blueprint-driven approach standardizes image, video, audio, and editing workflows without duplicating node chains.

Does refactoring ComfyUI workflows into fragments preserve source traceability?

Refactoring ComfyUI workflows into typed fragments preserves source traceability through provenance tracking. This maintains a clear link back to the original large JSON graph while allowing safe iteration on the modular units.

When should I decompose a ComfyUI workflow instead of hand-editing node IDs?

Decompose a ComfyUI workflow when a production JSON file grows beyond a few hundred lines or becomes fragile. Splitting it into named fragments prevents manual hand-editing errors and allows safe recomposition from a blueprint.