comfyui-prompt
Describe an image; get a valid ComfyUI graph, submitted and polled to completion.
What it does
- Builds a minimal ComfyUI API graph from a description, or patches an existing workflow template.
- Submits the prompt to a running ComfyUI server and polls the queue/history until the job finishes.
- Remembers the last seed and lets you reuse, change, or randomise it.
- Ships a
z-image-turboworkflow as a working starting point.
Requirements
- Claude Code launched from this project directory.
- A ComfyUI server at
http://localhost:8188, or a different host configured withCOMFYUI_BASE_URLin.env.local. - The model files for the bundled template (below).
Model files for z-image-turbo
| File | What it is | Where to put it |
|---|---|---|
z_image_turbo_bf16.safetensors |
AuraFlow / Lumina2-style turbo diffusion model | models/diffusion_models/ |
ae.safetensors |
Autoencoder used by the turbo model | models/vae/ |
qwen_3_4b.safetensors |
Qwen CLIP text encoder | models/clip/ |
Paths are relative to the ComfyUI root. If your filenames differ, edit
workflows/z-image-turbo.json or tell the skill which model
names to use.
Install
curl -fsSL https://raw.githubusercontent.com/yakovkhalinsky/ai-things/main/install.sh | sh -s -- comfyui-prompt
Installs the skill and both commands into ~/.claude. For a
project-local install instead, run ./scripts/install.sh in
a checkout.
- Install ComfyUI from comfy.org/download or the GitHub repo.
- Put the three model files in the folders shown above.
- If ComfyUI is not on localhost, create
.env.localat the project root with the server URL. - Restart Claude Code so the skill and commands are registered.
# .env.local at the project root (optional, for a remote ComfyUI)
COMFYUI_BASE_URL=http://your-comfyui-host:8188
Do not commit .env.local.
Usage
/comfyui-prompt a polar bear in a 1950s diner eating a burger and fries
Or ask in plain language:
Generate a polar bear in a 1950s diner using the z-image-turbo template.
The companion /comfyui-serve-output command starts an opt-in
local file server for browsing generated outputs.
Good to know
- The bundled template expects the three files above; swap in your own names if your install differs.
- The skill builds the graph and talks HTTP directly โ no ComfyUI Python environment is imported.
- Outputs land in
examples/, which is ignored by git.
Source
- README image-generation/comfyui-prompt/README.md
- SKILL.md the skill definition
- comfyui-prompt.md the /comfyui-prompt slash command
- command-serve-output.md the /comfyui-serve-output slash command
- z-image-turbo.json the bundled workflow template