generate-shots

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

A command that executes prepared ComfyUI workflows to generate the video shots they describe. ComfyUI is a node-based image and video generation tool.

In plain words
What is it for?
Use it after workflow files have been built to generate each video segment and monitor the resulting outputs.
Why use it?
It handles uploading source images, queueing the workflows, and collecting the generated results while accounting for local or cloud processing.

Command for Claude Code

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

Good fit Use it after workflow files have been built to generate each video segment and monitor the resulting outputs.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/josephoibrahim/comfy-cozy/generate-shots/github.svg)](https://agentmods.dev/commands/josephoibrahim/comfy-cozy/generate-shots)
Your own site
<a href="https://agentmods.dev/commands/josephoibrahim/comfy-cozy/generate-shots"><img src="https://agentmods.dev/badge/commands/josephoibrahim/comfy-cozy/generate-shots/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 generate-shots

Your own site · 80×15
<a href="https://agentmods.dev/commands/josephoibrahim/comfy-cozy/generate-shots"><img src="https://agentmods.dev/badge/commands/josephoibrahim/comfy-cozy/generate-shots.svg" alt="Reviewed on agentmods" width="80" 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,134 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.01134
Opus 5 $0.00000 $0.00567
Sonnet 5 $0.00000 $0.00227
Haiku 4.5 $0.00000 $0.00113

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

Security

Grade C, and why

generate-shots 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 9d 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}/history/${PROMPT_ID}" | python3 -c "

Makes network callslowCapability

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

curl -s -X POST "http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/upload/image" \
video-recreation-agent/.claude/commands/generate-shots.md · 120 lines

How it starts

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

/project:generate-shots — GENERATOR Expert

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

Your job: Execute the built workflows against ComfyUI, monitor progress, collect outputs.

Prerequisites

  • Workflow JSONs in workspace/workflows/
  • ComfyUI running and accessible
  • Any required input images uploaded

Steps

1. Upload input images to ComfyUI

# For each keyframe that workflows reference
for img in workspace/keyframes/seg_*_first.png workspace/keyframes/seg_*_last.png; do
  filename=$(basename "$img")
  curl -s -X POST "http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/upload/image" \
    -F "image=@${img}" \
    -F "subfolder=agent_inputs" \
    -F "type=input"
  echo "Uploaded: $filename"
done

2. Queue workflows to ComfyUI

For API-based models (Kling, LTX — cloud GPU): Queue ALL segments in parallel. They don't compete for local VRAM.

For local models (FLUX, Wan — local GPU): Queue one at a time to avoid OOM.

# Queue a single workflow
python3 -c "
import json, urllib.request

workflow = json.load(open('workspace/workflows/seg_01_workflow.json'))
payload = json.dumps({
    'prompt': workflow,
    'client_id': 'video-recreation-agent'
}).encode()

req = urllib.request.Request(
    'http://${COMFYUI_HOST:-127.0.0.1}:${COMFYUI_PORT:-8188}/prompt',
    data=payload,
    headers={'Content-Type': 'application/json'}
)
resp = urllib.request.urlopen(req)
result = json.loads(resp.read())
print(f'Queued: prompt_id={result[\"prompt_id\"]}')
"

3. Monitor progress via WebSocket

# monitor_progress.py — run as background task
import websocket, json

ws = websocket.WebSocket()
ws.connect(f"ws://{COMFYUI_HOST}:{COMFYUI_PORT}/ws?clientId=video-recreation-agent")

while True:
    msg = json.loads(ws.recv())
    if msg['type'] == 'progress':
        d = msg['data']
        pct = int(d['value'] / d['max'] * 100)
        print(f"Step {d['value']}/{d['max']} ({pct}%)")
    elif msg['type'] == 'executed':
        print(f"Node complete: {msg['data']['node']}")
    elif msg['type'] == 'execution_complete':
        print("DONE")
        break

Read the full file on GitHub · 120 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. 9d ago First seen · 120 lines · 0 tokens per session scan C f0e8a3d1f1cf

Subscribe to this mod's changes

generate-shots 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,134 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.