generate-image

generate-image is a command for Claude Code from Comfy-Org/comfy-skills. It costs 12 tokens per session (948 once invoked), scanned A, original, MIT.

A command for generating, editing, or modifying images through Comfy Cloud, an online service for running ComfyUI workflows.

In plain words
What is it for?
Use it for creating images from descriptions, editing existing images, changing their style, and related image-to-image tasks supported by Comfy Cloud.
Why use it?
It helps route an image request to an available model or ready-made workflow instead of requiring the user to build the image process manually.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Part of the comfy-cloud plugin — 12 commands shipped together

Good fit Use it for creating images from descriptions, editing existing images, changing their style, and related image-to-image tasks supported by Comfy Cloud.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/comfy-org/comfy-skills/generate-image
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/Comfy-Org/comfy-skills

Made for: Claude Code.

Or install comfy-cloud, the plugin that ships this one along with the rest of its 12 commands.

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-image

README.md
[![agentmods](https://agentmods.dev/badge/commands/comfy-org/comfy-skills/generate-image.svg)](https://agentmods.dev/commands/comfy-org/comfy-skills/generate-image)
Your own site
<a href="https://agentmods.dev/commands/comfy-org/comfy-skills/generate-image"><img src="https://agentmods.dev/badge/commands/comfy-org/comfy-skills/generate-image.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 948 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00012 $0.00948
Opus 5 $0.00006 $0.00474
Sonnet 5 $0.00002 $0.00190
Haiku 4.5 $0.00001 $0.00095

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

Security

Grade A, and why

generate-image scanned grade A with 1 finding 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.

Makes network callslowCapability

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

- In **CLI/terminal environments** (Claude Code, Cursor): the response contains a temporary signed GCS download URL, a suggested save path, and a ready-to-run `curl` command on its own line. **Execute that `curl` command
claude-code/commands/generate-image.md · 36 lines

What it actually says

Generate, edit, or modify an image using Comfy Cloud based on the user's description: $ARGUMENTS

Follow these steps exactly:

Step 0 — Route partner-API requests directly. If the user named a provider, model, or capability (e.g. "Flux Pro Ultra", "Nano Banana", "Kling", "DALL-E"), do one search_nodes lookup with the named term. If the matching node's category starts with api node/, try partner_generate first — see its tool description for the currently-wired model ids. Pass type: "image" plus the partner's model slug, prompt, and any optional fields (aspect_ratio/seed/medias[]). On success, return the artifact URL(s) and stop — do NOT continue with the workflow steps below. If partner_generate returns "unknown model" or "not yet implemented", or the matching node has no api node/ prefix (OSS model), continue to Step 1.

  1. Use search_templates to find a pre-built workflow template that matches the request (e.g. "text to image", "image to video", "style transfer", "inpainting"). If a good template exists, use it as the base workflow instead of building from scratch.

  2. If no suitable template was found, use search_models to find an appropriate checkpoint model for the request. Pick the best match based on the user's description (e.g. realistic photo -> realistic checkpoint, anime -> anime checkpoint, SDXL for high quality).

  3. If the user provides an input image (for img2img, style transfer, upscaling, etc.), use upload_file to upload it to Comfy Cloud first. Use the returned filename in a LoadImage node.

  4. Build a ComfyUI API-format workflow JSON with the appropriate nodes (or use the template workflow). A standard text-to-image workflow uses: CheckpointLoaderSimple, CLIPTextEncode (positive and negative prompts), EmptyLatentImage, KSampler, VAEDecode, SaveImage. For img2img, replace EmptyLatentImage with LoadImage + VAEEncode.

  5. Validate the workflow has inputs and outputs before submitting. Confirm the JSON contains:

    • At least one input node carrying the user's intent (CLIPTextEncode for prompts, LoadImage for img2img/style transfer, etc.).
    • At least one output/save node wired to the final image tensor (SaveImage, PreviewImage, or the partner node's own save output).

    API-backed partner nodes (Nano Banana, Gemini, Flux Kontext, etc.) often produce an image tensor but do not include a save node by default — you must add one and wire it to their output. Without it the job runs successfully but produces nothing retrievable, wasting compute. Do not skip this check.

  6. Call submit_workflow with the workflow JSON.

  7. Poll get_job_status every 3 seconds until the job is completed. Show the user a brief status update while waiting. If the user asks to cancel, use cancel_job with the prompt_id.

  8. Call get_output to retrieve the generated image. Pass a short description parameter (e.g. "cat astronaut in space") so the output gets a descriptive name.

  9. Display the image to the user:

    • In GUI environments (Claude Desktop): the response includes an ARTIFACT_HTML: block — create an HTML artifact using that exact HTML so the image appears in the side panel. The file is also saved to disk.
    • In CLI/terminal environments (Claude Code, Cursor): the response contains a temporary signed GCS download URL, a suggested save path, and a ready-to-run curl command on its own line. Execute that curl command verbatim via your shell/Bash tool — do not reconstruct it from the raw URL, and do not re-quote, re-encode, or strip any query parameters. The signature lives in the query string (X-Goog-Signature= and related params), and any modification will invalidate the link and the download will fail. After the file is saved, open it with open (macOS), xdg-open (Linux), or start (Windows).

If any step fails, show the error clearly and suggest what might have gone wrong (wrong model, invalid node configuration, etc.).

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 · 36 lines · 12 tokens per session scan A 8de640fbe7c0

Subscribe to this mod's changes

generate-image is a command published in the GitHub repository Comfy-Org/comfy-skills (190 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 948 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.