Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model).

MITAuto-check: notesMedia & Creative

Install Cf Image

skills CLI
$ npx skills add hassancs91/claude-image-generation --skill cf-image -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hassancs91/claude-image-generation cf-image --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/level-3-image-generator .claude/skills/cf-image && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cf-image
GitHub stars
101
Token cost
~867 tokens
SKILL.md length
385 words
Files
2
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model).

  • Works in 3 steps: Confirm the file was saved (the script… → Tell the user the filename and the exact… → If they want variations, re-run with a…
  • The user wants to create
  • SKILL.md covers When this skill applies, How to run it, The one job Claude must do:… and After generating, plus 1 more section
  • Runs Python scripts from its folder; calls python; needs CF_API_TOKEN

What it does

Cf Image is an agent skill from hassancs91/claude-image-generation. Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model). Use this skill whenever the user wants to create, generate, make, or draw an image / picture / logo / icon / thumbnail / wallpaper / banner from a text idea and mentions Cloudflare, or is working in this repo and asks for a quick generated image. Claude expands the user's request into a strong image prompt, runs the bundled generate.py, and saves a JPG to disk. Trigger on phrases like "generate an image of", "make me…

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `generate.py`).

It sits in Media & Creative, covering Image generation and Diffusion and image models. It works with Cloudflare and Workers AI. The repository describes itself as: Connect Claude to image generation with Agent Skills. Three levels: a zero-cost code-based design engine, a Three.js 3D renderer, and a real diffusion model on Cloudflare. Plus… The licence is MIT.

When your agent uses it

  • The user wants to create
  • Draw an image / picture / logo / icon / thumbnail / wallpaper / banner from a text idea and mentions Cloudflare
  • Is working in this repo and asks for a quick generated image
  • Phrases like generate an image of

Example prompts

  • “generate an image of”
  • “make me a picture of”
  • “create a thumbnail for”
  • “/cf-image”

Requirements

  • Python 3
  • A credential in CF_API_TOKEN

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the file was saved (the script prints the path).
  2. Tell the user the filename and the exact prompt you used, so they can tweak and re-run.
  3. If they want variations, re-run with a modified prompt and a new -o filename.

What it can do on your machine

Read from SKILL.md and the folder at commit f533831. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CF_API_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cf Image loads about 867 tokens when it runs. Until then it costs about 178 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~178
When it runs · the whole SKILL.md, loaded when a task matches
~867

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:3
    UNT_ID and CF_API_TOKEN in the project's .env.
  • NoteMentions a .env fileSKILL.md:54
    and `CF_API_TOKEN` set in the project's `.env` (see `.env.example`). The script loads them automatically.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hassancs91/claude-image-generation at commit f533831, republished under its MIT licence (© hassancs91). 385 words, ~867 tokens.

Download SKILL.mdSave it as .claude/skills/cf-image/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cf-image
description
Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model). Use this skill whenever the user wants to create, generate, make, or draw an image / picture / logo / icon / thumbnail / wallpaper / banner from a text idea and mentions Cloudflare, or is working in this repo and asks for a quick generated image. Claude expands the user's request into a strong image prompt, runs the bundled generate.py, and saves a JPG to disk. Trigger on phrases like "generate an image of", "make me a picture of", "create a thumbnail for", "cloudflare image", or a plain description paired with a request for an image. Requires CF_ACCOUNT_ID and CF_API_TOKEN in the project's .env.

cf-image

Turn a natural-language request into a generated image using Cloudflare Workers AI (@cf/black-forest-labs/flux-1-schnell). This skill is the "connect Claude to image generation" loop: the user describes what they want, Claude does the prompt engineering, the bundled script calls the Cloudflare API, and the image is saved locally.

When this skill applies

The user wants an image generated from a description — e.g. "generate a logo idea for a coffee shop", "make a thumbnail for my AI video", "picture of a cyberpunk cat". Claude is responsible for turning a vague ask into a good prompt before generating.

It does not apply to: editing an existing image, vector/SVG art, or video.

How to run it

From the repo root:

bash
python .claude/skills/level-3-image-generator/generate.py "<optimized prompt>" -o <filename>.jpg
  • "<optimized prompt>" — the prompt you write (see below), not the user's raw words.
  • -o / --output — where to save (default out.jpg). Pick a short descriptive name, e.g. coffee-logo.jpg.
  • --steps — diffusion steps (default 4). flux-schnell is tuned for few steps; 4–8 is plenty. Higher is slower, not always better.

The script prints Saved <file> ... on success, or a Cloudflare API error message on failure.

Show full SKILL.md (206 more words)Show less

The one job Claude must do: write a strong prompt

The raw script would need a hand-written prompt. The value of this skill is that Claude expands the user's intent into a vivid, specific prompt before calling the script. A good Flux prompt names:

  • Subject — what's in the frame, concretely.
  • Style/medium — photo, 3D render, flat vector, watercolor, isometric, etc.
  • Composition & framing — close-up, wide shot, centered, rule-of-thirds.
  • Lighting & mood — golden hour, neon, soft studio light, dramatic shadows.
  • Color/detail cues — palette, background, level of detail.

Example transformation:

  • User: "a logo for a coffee shop"
  • Prompt you pass: "minimalist logo of a steaming coffee cup, flat vector illustration, warm brown and cream palette, centered on a clean off-white background, simple bold shapes, modern branding"

Keep prompts to one or two sentences. Don't include text/words to render — Flux is unreliable at rendering legible text.

After generating

  1. Confirm the file was saved (the script prints the path).
  2. Tell the user the filename and the exact prompt you used, so they can tweak and re-run.
  3. If they want variations, re-run with a modified prompt and a new -o filename.

Requirements

  • CF_ACCOUNT_ID and CF_API_TOKEN set in the project's .env (see .env.example). The script loads them automatically.
  • Python deps: requests, python-dotenv.

© hassancs91, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/level-3-image-generator of hassancs91/claude-image-generation.

  • SKILL.md
  • generate.py

Open the folder on GitHubat commit f533831

Compare with similar skills

Cf Image next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cf Image compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cf Image this skillhassancs91/claude-image-generation101—~867Automated safety check: NotesMIT
Iibzanllp/infinite-image-browsing1.4k—~3.3kAutomated safety check: PassMIT
AI Image Creatorcentminmod/my-claude-code-setup2.7k—~8.1kAutomated safety check: NotesMIT
Character Refseternityspring/shuohao-skills4.3k—~1.7kAutomated safety check: WarnApache-2.0
ImageNexus-JPF/note-companion8703 repos~3.9kAutomated safety check: PassMIT
Stable Diffusion with DiffusersOrchestra-Research/AI-Research-SKILLs13k5 repos~3.2kAutomated safety check: PassMIT

Similar skills

  • Iib

    zanllp/infinite-image-browsing

    Interact with IIB (Infinite Image Browsing) service for searching, browsing, tagging, and organizing AI-generated images.

    1.4k GitHub stars~3.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • AI Image Creator

    centminmod/my-claude-code-setup

    Generate, edit-from-reference, or analyze images with AI via OpenRouter (Gemini, GPT Image, Seedream, Qwen, MAI, Grok, FLUX.2, Recraft, Muse, Riverflow; Cloudflare AI Gateway BYOK).

    2.7k GitHub stars~8.1k tokensUpdated yesterday
    Media & CreativeAuto-check: notes
  • Character Refs

    eternityspring/shuohao-skills

    给任何故事里的角色真出参考图(小说改编、自己原创的故事、单独设计一个角色都行,不需要小说原文): 一段话描述角色,拆成分层字段、补全后确认, 先出一张正面全身锚点,其余视图(大头照、90° 侧面、背面、细节、45° 大头照)都只参考这张锚点, 按需分档出图。每张图带标识、可单独重出,重出后自动标出哪些图过期。

    4.3k GitHub stars~1.7k tokensUpdated yesterday
    Media & CreativeAuto-check: warnings
  • Image

    Nexus-JPF/note-companion

    When the user wants to create, generate, edit, or optimize images for marketing — blog heroes, social graphics, product mockups, profile banners, listing visuals, or brand assets.

    870 GitHub starsUsed in 3 repos~3.9k tokens
    Media & CreativeAuto-check passed
  • Stable Diffusion with Diffusers

    Orchestra-Research/AI-Research-SKILLs

    Generates and edits images with Stable Diffusion through Hugging Face Diffusers, covering text-to-image, image-to-image, inpainting, SDXL and custom pipelines.

    13k GitHub starsUsed in 5 repos~3.2k tokens
    Media & CreativeAuto-check passed
  • Anima Base

    artokun/comfyui-mcp

    Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).

    800 GitHub stars~4k tokensUpdated 4 days ago
    Media & CreativeAuto-check passed

More from hassancs91/claude-image-generation

  • 3D Image Renderer

    hassancs91/claude-image-generation

    Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved.

    101 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Story HTML Publisher

    hassancs91/claude-image-generation

    Final step of the AI Storybook pipeline. An agent skill from hassancs91/claude-image-generation.

    101 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Prompt To Design

    hassancs91/claude-image-generation

    Generate a polished PNG graphic from a text prompt and an aspect ratio.

    101 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Scene Splitter

    hassancs91/claude-image-generation

    Splits a plain English story into a numbered list of SCENES — each scene being one moment that gets exactly one illustration AND one narration clip downstream.

    101 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Story Narrator

    hassancs91/claude-image-generation

    Generates one expressive narration MP3 per scene for an English storybook, using the ElevenLabs MCP (texttospeech).

    101 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Cf Image

What does Cf Image do?

Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model). Cf Image is an agent skill from hassancs91/claude-image-generation. Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model).

When should I use Cf Image?

Cf Image fits situations like: the user wants to create; draw an image / picture / logo / icon / thumbnail / wallpaper / banner from a text idea and mentions Cloudflare; is working in this repo and asks for a quick generated image; phrases like generate an image of.

How do I install Cf Image in Claude Code?

Run `npx skills add hassancs91/claude-image-generation --skill cf-image -a claude-code`. Or copy the skill folder (.claude/skills/level-3-image-generator in hassancs91/claude-image-generation) into .claude/skills/cf-image in your project. Claude Code loads it when a task matches its description.

How do I install Cf Image in Codex?

Run `npx skills add hassancs91/claude-image-generation --skill cf-image -a codex`. Or copy the skill folder (.claude/skills/level-3-image-generator in hassancs91/claude-image-generation) into .agents/skills/cf-image in your project. Codex loads it when a task matches its description.

Can I use Cf Image in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hassancs91/claude-image-generation --skill cf-image -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cf-image, .gemini/skills/cf-image, .github/skills/cf-image and .opencode/skills/cf-image in your project.

What does Cf Image need to run?

Going by SKILL.md and its folder, Cf Image needs Python for the scripts in its folder, the command-line tools its instructions call (python) and credentials named CF_API_TOKEN. Our summary lists: Python 3; A credential in CF_API_TOKEN.

Does Cf Image access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cf Image safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cf Image use?

Cf Image is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cf Image use?

About 867 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cf Image?

Skills that share tags, products or a category with Cf Image: Iib (zanllp/infinite-image-browsing, 1.4k stars), AI Image Creator (centminmod/my-claude-code-setup, 2.7k stars), Character Refs (eternityspring/shuohao-skills, 4.3k stars) and Image (Nexus-JPF/note-companion, 870 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cf Image?

hassancs91 (a GitHub user) maintains it in hassancs91/claude-image-generation, which has 101 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 18, 2026.

Source: hassancs91/claude-image-generation on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.