build-workflow

build-workflow is a command for Claude Code from JosephOIbrahim/Comfy-Cozy. It costs 0 tokens per session (1,480 once invoked), scanned C, original, MIT.

A command that builds ComfyUI workflows for each part of a video from a storyboard. ComfyUI is a visual tool for creating images and video with connected processing steps.

In plain words
What is it for?
Use it after video analysis to inspect available ComfyUI nodes, check installed models, and create one workflow file per video segment.
Why use it?
It turns a storyboard into workflow files that match the processing nodes and models available in the running ComfyUI setup.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Good fit Use it after video analysis to inspect available ComfyUI nodes, check installed models, and create one workflow file per video segment.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/josephoibrahim/comfy-cozy/build-workflow
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.

Clone the repo
git clone --depth 1 https://github.com/JosephOIbrahim/Comfy-Cozy

Made for: Claude Code.

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 build-workflow

README.md
[![agentmods](https://agentmods.dev/badge/commands/josephoibrahim/comfy-cozy/build-workflow.svg)](https://agentmods.dev/commands/josephoibrahim/comfy-cozy/build-workflow)
Your own site
<a href="https://agentmods.dev/commands/josephoibrahim/comfy-cozy/build-workflow"><img src="https://agentmods.dev/badge/commands/josephoibrahim/comfy-cozy/build-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,480 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00000 $0.01480
Opus 5 $0.00000 $0.00740
Sonnet 5 $0.00000 $0.00296
Haiku 4.5 $0.00000 $0.00148

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

Security

Grade C, and why

build-workflow scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/object_info | python3 -c "

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/object_info | python3 -c "
video-recreation-agent/.claude/commands/build-workflow.md · 186 lines

How it starts

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

/project:build-workflow — ARCHITECT Expert

You are the ARCHITECT expert in the Video Recreation Agent Team.

Your job: Read the storyboard, query ComfyUI for available nodes, and construct valid workflow JSON files for each segment.

Prerequisites

  • workspace/storyboard.json must exist (run /project:analyze-video first)
  • ComfyUI must be running at the configured host:port

Steps

1. Load the storyboard

cat workspace/storyboard.json

2. Fetch available node schemas from ComfyUI

# This is the key move — gets EVERY node type with full input/output specs
curl -s http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/object_info | python3 -c "
import json, sys
data = json.load(sys.stdin)
# Save full schema for reference
with open('workspace/node_schemas.json', 'w') as f:
    json.dump(data, f, indent=2)
# Print available generation nodes
for name, info in data.items():
    cat = info.get('category', '')
    if any(k in cat.lower() for k in ['kling', 'video', 'image', 'load', 'save']):
        print(f'{name}: {cat}')
"

3. Check installed models

curl -s http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/object_info/CheckpointLoaderSimple | python3 -c "
import json, sys
data = json.load(sys.stdin)
print('Available checkpoints:')
for m in data.get('CheckpointLoaderSimple', {}).get('input', {}).get('required', {}).get('ckpt_name', [[]])[0]:
    print(f'  • {m}')
"

4. For each segment, determine the workflow strategy

Decision tree:

Is it a CCTV/stylized shot?
  → Generate clean frame first (FLUX/Kling Image)
  → Apply style overlay in post (ffmpeg filter)

Is it a standard cinematic shot?
  → Use Kling 3.0 Omni with first+last frame anchoring

Does it need character consistency?
  → Use Kling Motion Control 3.0 with Element Binding

Is it a simple static shot?
  → Generate single image, Ken Burns effect in ffmpeg

5. Construct workflow JSON for each segment

Use the ComfyUI API format (not UI format). Rules:

  • Node IDs are string numbers: "1", "2", "3"
  • Connections reference: ["source_node_id", output_index]
  • Every workflow needs a terminal node (SaveImage/SaveVideo)
  • Input images must be uploaded first via /upload/image

Read the full file on GitHub · 186 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 · 186 lines · 0 tokens per session scan C 2c041132abbd

Subscribe to this mod's changes

build-workflow is a command published in the GitHub repository JosephOIbrahim/Comfy-Cozy (24 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,480 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.