cloudflare-images:generate-variant

cloudflare-images:generate-variant is a command for coding agents from secondsky/claude-skills. It costs 48 tokens per session (3,734 once invoked), scanned A, original, MIT.

An interactive command for creating named Cloudflare Images variants, which are saved image versions with chosen dimensions, cropping rules, and quality.

In plain words
What is it for?
Use it to choose a variant name, dimensions, fit mode, and quality, generate the API call, optionally run it, and add the variant to wrangler.jsonc.
Why use it?
It turns the variant setup into a guided process and checks the name and image options before creating it.

Command

Part of the cloudflare-images plugin — 1 skill, 3 commands, 3 agents shipped together

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.

agentmods
npx agentmods add commands/secondsky/claude-skills/generate-variant
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Or install cloudflare-images, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 3 agents.

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 cloudflare-images:generate-variant

README.md
[![agentmods](https://agentmods.dev/badge/commands/secondsky/claude-skills/generate-variant.svg)](https://agentmods.dev/commands/secondsky/claude-skills/generate-variant)
Your own site
<a href="https://agentmods.dev/commands/secondsky/claude-skills/generate-variant"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/generate-variant.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00048 $0.03734
Opus 5 $0.00024 $0.01867
Sonnet 5 $0.00010 $0.00747
Haiku 4.5 $0.00005 $0.00373

Measured yesterday against content hash 57c51ccdeb16, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-images:generate-variant 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 yesterday.

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.

RESPONSE=$(curl -s -X POST \
plugins/cloudflare-images/commands/generate-variant.md · 547 lines

How it starts

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

Generate Cloudflare Images Variant

Interactive tool for creating named variants for Cloudflare Images. Walks through variant configuration and generates the API call to create it.

What This Command Does

When you run /generate-variant, Claude will:

  1. Prompt for variant configuration (name, dimensions, fit, quality)
  2. Validate variant name and options
  3. Generate API call to create variant
  4. Execute API call (if confirmed)
  5. Output variant configuration
  6. Optionally add variant to wrangler.jsonc

Usage

/generate-variant

Claude will ask interactive questions to gather variant configuration.

Variant Configuration Options

Variant Name

  • Format: Alphanumeric + hyphens only
  • Max length: 32 characters
  • Examples: thumbnail, avatar-lg, product-preview
  • Reserved: Cannot use public (default variant)

Dimensions

  • Width: 1-9999 pixels (optional)
  • Height: 1-9999 pixels (optional)
  • Note: At least one dimension required

Fit Modes

  • scale-down (default): Never enlarge, preserve aspect ratio
  • contain: Resize to fit within box, preserve aspect ratio
  • cover: Resize to cover entire box, crop if needed
  • crop: Crop to exact dimensions
  • pad: Resize to fit, pad with background color

Quality

  • Range: 1-100
  • Default: 85
  • Recommendations:
    • Thumbnails: 80
    • Product photos: 85
    • Hero images: 90

Optional Parameters

  • Background: Color for padding (hex format: #FFFFFF)
  • Metadata: keep | copyright | none (default: none)
  • Blur: 1-250 pixels (for blur effect)

Implementation

Step 1: Interactive Configuration

Ask user for each parameter:

Variant Name (e.g., thumbnail, avatar-lg):
> thumbnail

Width (pixels, leave empty for auto):
> 300

Height (pixels, leave empty for auto):
> 300

Fit mode:
1. scale-down (never enlarge, default)
2. contain (fit within box)
3. cover (cover entire box, crop if needed)
4. crop (crop to exact dimensions)
5. pad (fit and pad with background)
> 3

Quality (1-100, default 85):
> 85

Background color for padding (optional, e.g., #FFFFFF):
> (skip)

Metadata (keep/copyright/none, default none):
> none

Blur radius (optional, 1-250):
> (skip)

Read the full file on GitHub · 547 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. yesterday First seen · 547 lines · 48 tokens per session scan A 57c51ccdeb16

Subscribe to this mod's changes

cloudflare-images:generate-variant is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 3,734 once invoked, about $0.0002 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-09-03.