ImageFlare Skill
Generate and edit images from your terminal using Cloudflare Workers AI models (Flux, Stable Diffusion, etc.).
When to Use
✅ USE this skill when:
- - User asks to generate an image from a text description
- User wants to edit or transform an existing image with AI
- User wants to apply a style from a reference image to another image
- User asks to configure Cloudflare AI credentials or switch models
- User says "create an image", "generate a picture", "edit this photo with AI"
When NOT to Use
❌ DON'T use this skill when:
- - Local image manipulation without AI (crop, resize, rotate) → use
convert/ffmpeg/Pillow - Video generation → not supported
- Non-Cloudflare AI image generation → use other tools
- Viewing or inspecting image metadata → use
identify, INLINECODE3 - The user has not configured Cloudflare credentials yet and doesn't want to → prompt them to run
imageflare config first
Setup
Requires a Cloudflare account with Workers AI access (free tier available).
CODEBLOCK0
Getting credentials:
My Profile → API Tokens → Create Token — select the
Workers AI template or grant
Workers AI: Read permission |
Verify setup:
CODEBLOCK1
Commands
Generate an Image
CODEBLOCK2
Edit an Existing Image
CODEBLOCK3
Configuration
CODEBLOCK4
Common Options
| Flag | Description |
|---|
| INLINECODE6 | Text prompt describing what to generate or how to edit (required) |
| INLINECODE7 |
Cloudflare Workers AI model ID (overrides configured default) |
|
--width | Output width in pixels (default: 1024) |
|
--height | Output height in pixels (default: 1024) |
|
--seed | Random seed for reproducible results |
|
-o, --output | Output file path (default:
imageflare_<timestamp>.png) |
|
--open | Open the saved image automatically after generation |
|
-r, --ref | (edit only) Additional reference image, repeatable up to 3 times |
Output
- - Images are saved as PNG files
- Default filename:
imageflare_<timestamp>.png in the current directory - Use
--output to specify a custom path - Use
--open to auto-open the result in the system image viewer
Notes
- - Default model: INLINECODE18
- Input images for editing are automatically resized to ≤512×512 (Cloudflare requirement)
- Reference images in edit mode: refer to them in your prompt as
image 0, image 1, etc. - Config is stored at
~/.config/imageflare/config (Linux/macOS) or %APPDATA%\imageflare\config (Windows) - No intermediate servers — requests go directly to the Cloudflare Workers AI API
- Free tier available on Cloudflare Workers AI
ImageFlare 技能
通过终端使用 Cloudflare Workers AI 模型(Flux、Stable Diffusion 等)生成和编辑图像。
使用时机
✅ 使用此技能的场景:
- - 用户要求根据文本描述生成图像
- 用户希望使用 AI 编辑或转换现有图像
- 用户希望将参考图像的风格应用到另一张图像上
- 用户要求配置 Cloudflare AI 凭据或切换模型
- 用户说创建图像、生成图片、用 AI 编辑这张照片
不使用时机
❌ 不要使用此技能的场景:
- - 无需 AI 的本地图像处理(裁剪、调整大小、旋转)→ 使用 convert/ffmpeg/Pillow
- 视频生成 → 不支持
- 非 Cloudflare AI 图像生成 → 使用其他工具
- 查看或检查图像元数据 → 使用 identify、exiftool
- 用户尚未配置 Cloudflare 凭据且不希望配置 → 提示他们先运行 imageflare config
设置
需要拥有 Cloudflare 账户 并开通 Workers AI 访问权限(提供免费套餐)。
bash
首次交互式设置(账户 ID + API 令牌 + 模型选择)
imageflare config
获取凭据:
我的个人资料 → API 令牌 → 创建令牌 — 选择
Workers AI 模板或授予 Workers AI: Read 权限 |
验证设置:
bash
imageflare config show
命令
生成图像
bash
基本生成
imageflare generate --prompt 一只红狐坐在积雪覆盖的木头上
自定义尺寸和种子以实现可重复性
imageflare generate --prompt 山上的日落 --width 512 --height 512 --seed 42
保存到指定路径并自动打开
imageflare generate --prompt 赛博朋克城市景观 --output cityscape.png --open
使用特定模型
imageflare generate --prompt 一只猫 --model @cf/black-forest-labs/flux-1-schnell
编辑现有图像
bash
基本编辑
imageflare edit photo.png --prompt 将背景改为海滩
使用风格参考图像进行编辑(最多 3 张参考图)
imageflare edit photo.png --ref style.png --prompt 将图像 0 的风格改为图像 1 的风格
多张参考图像
imageflare edit photo.png --ref ref1.png --ref ref2.png --prompt 结合风格
保存到指定路径
imageflare edit photo.png --prompt 将其变成水彩画 --output watercolor.png --open
配置
bash
交互式设置向导
imageflare config
查看当前设置
imageflare config show
列出账户上可用的 AI 模型
imageflare config models
非交互式设置值
imageflare config set --account-id YOUR
ID --api-token YOURTOKEN
imageflare config set --model @cf/black-forest-labs/flux-1-schnell
常用选项
| 标志 | 描述 |
|---|
| -p, --prompt | 描述生成内容或编辑方式的文本提示(必填) |
| -m, --model |
Cloudflare Workers AI 模型 ID(覆盖配置的默认值) |
| --width | 输出宽度(像素,默认:1024) |
| --height | 输出高度(像素,默认:1024) |
| --seed | 用于可重复结果的随机种子 |
| -o, --output | 输出文件路径(默认:imageflare_<时间戳>.png) |
| --open | 生成后自动打开保存的图像 |
| -r, --ref | (仅编辑模式)附加参考图像,最多可重复 3 次 |
输出
- - 图像保存为 PNG 格式
- 默认文件名:当前目录下的 imageflare_<时间戳>.png
- 使用 --output 指定自定义路径
- 使用 --open 在系统图像查看器中自动打开结果
注意事项
- - 默认模型: @cf/black-forest-labs/flux-2-klein-4b
- 用于编辑的输入图像会自动调整为 ≤512×512(Cloudflare 要求)
- 编辑模式下的参考图像:在提示中引用为 image 0、image 1 等
- 配置文件存储位置:~/.config/imageflare/config(Linux/macOS)或 %APPDATA%\imageflare\config(Windows)
- 无中间服务器 — 请求直接发送到 Cloudflare Workers AI API
- Cloudflare Workers AI 提供免费套餐