Cf Image logo

Cf Image

Community
hassancs91
cf-image

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.

Overview

Publisherhassancs91
Repositoryclaude-image-generation
Skill namecf-image
Stars
110
Forks
64
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hassancs91 on GitHub. Read the source before you install it.

Installation

Install the Cf Image AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/level-3-image-generator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git /tmp/claude-image-generation
mkdir -p .claude/skills
cp -r /tmp/claude-image-generation/.claude/skills/level-3-image-generator .claude/skills/cf-image
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cf Image in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cf Image on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cf Image is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cf Image AI skill do?

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 descri...

Why use Cf Image on TypingMind?

Because you install it once and use it with any model. Cf Image is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cf Image in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/level-3-image-generator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cf Image?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cf Image?

As many as you like. As long as a model supports skills, you can use Cf Image with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cf Image AI skill free?

Yes. It is published on GitHub by hassancs91 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇