generating-images

Compiles a Visual Intent Object into a ComfyUI txt2img prompt JSON using SDXL or FLUX templates.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ShinyGua/ComfyUI-Agent --skill generating-images-shinygua
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: generating-images
Source: https://github.com/ShinyGua/ComfyUI-Agent/tree/main/.claude/skills/generating-images
Command: npx skills add https://github.com/ShinyGua/ComfyUI-Agent --skill generating-images-shinygua

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Turning a natural-language image request into a valid ComfyUI workflow graph normally requires hand-editing node JSON. This Skill deterministically compiles a Visual Intent Object (VIO) into a ready-to-submit ComfyUI prompt JSON by patching a bundled template, with no LLM involved in graph generation. ## Core Features & Use Cases - Template-based compilation: Ships SDXL and FLUX.1 txt2img templates; the correct one is auto-selected from the model checkpoint hint. - Flat override mapping: Maps VIO fields (prompt, negative prompt, width, height, steps, cfg, sampler, scheduler, seed, checkpoint) onto the correct node inputs. - Defensive validation: Refuses to run with a missing or empty prompt instead of silently falling back to the template's placeholder text; emits structured error JSON with exit code 2. - Use Case: A planner emits a step with goal=generate and a prompt like "a blue cat" with steps=30 and seed=42; pipe the VIO into compile.py and feed the resulting prompt JSON directly to a ComfyUI submission script. ## Quick Start Pipe a Visual Intent Object JSON containing your prompt and parameters into scripts/compile.py and send the stdout prompt JSON to the ComfyUI submission script.

Frequently Asked Questions about generating-images

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

FAQPage Schema
How do I generate a ComfyUI prompt JSON from a text prompt?▼

Pipe a Visual Intent Object JSON containing your prompt and optional params into scripts/compile.py via stdin. The script patches a bundled SDXL or FLUX template and writes the complete ComfyUI prompt JSON to stdout, ready for submission.

How do I choose between SDXL and FLUX templates in ComfyUI?▼

Template selection is automatic: if the VIO model.checkpoint hint contains "flux", the FLUX.1 template is used; otherwise the SDXL base template is selected. Both share the same node ID contract, so overrides apply identically.

Does compile.py require any Python packages to run?▼

No, compile.py uses only the Python standard library (json, sys, time, pathlib, copy). It runs deterministically with no external dependencies and outputs either the prompt JSON or a structured error object.

Why does compile.py fail with a missing_prompt error?▼

The script refuses to run when vio.prompt is missing or empty, because the template's default "a photo" text is a placeholder, not a fallback. Provide a non-empty prompt string in the VIO to resolve the error.

How do I get a random seed for each ComfyUI generation?▼

Set params.seed to -1 in the Visual Intent Object. The compiler replaces negative seeds with a time-based random value; any non-negative seed is passed through unchanged for reproducible outputs.