zhayujie/cowagent/image-generation
Claude Code and agent skill by zhayujie/cowagent
- community
Checking that the SKILL.md file is still in the repository.
Generate or edit images from text prompts. Use when the user asks to create, draw, design, or edit an image, illustration, photo, icon, poster, or any visual content.
Install
npx vskill@latest install zhayujie/cowagent/image-generationSKILL.md
The same SKILL.md was published earlier as zhayujie/cowagent/image-generation.
Image Generation
Generate and edit images using AI models. The script automatically picks a backend based on which API keys are configured — you don't need to specify a model unless the user explicitly names one. Never guess or invent a model: when the user doesn't name one, omit model entirely so the configured default/provider is used.
Supported models (passed via model only when the user asks for a specific one):
- OpenAI —
gpt-image-2.5-flare(recommended default: best quality/latency trade-off),gpt-image-2.5-sunburst(highest editing precision),gpt-image-2.6-flare,gpt-image-2.6-sunburst,gpt-image-2,gpt-image-1 - Gemini Nano Banana —
nano-banana-2,nano-banana-pro,nano-banana - Seedream (Volcengine Ark) —
seedream-5.0-lite,seedream-4.5 - Qwen (DashScope) —
qwen-image-2.0,qwen-image-2.0-pro - MiniMax —
image-01 - CowAgent —
gpt-image-2.5-flare,gpt-image-2.5-sunburst,gpt-image-2.6-flare,gpt-image-2.6-sunburst,gemini-nano-banana-2.1,gemini-3.1-flash-image,gemini-3-pro-image,seedream-5.0-pro,seedream-5.0-lite
Usage
Run scripts/generate.py with a JSON argument. Use the absolute <base_dir> path — do NOT `cd` into the skill directory, since it is a builtin skill and gets reset on restart (anything written there is lost).
Images are saved to the workspace (or the open project dir) under images/, so they persist and stay reachable to the client.
Set bash timeout to at least 600 seconds, as image generation can take 30–200s per provider, and the script may try multiple providers sequentially. Call it synchronously (do not run it in the background) and wait for its output in the same turn.
Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
prompt | string | yes | — | Image description | |
image_url | string / list | no | null | Input image(s) for editing: local file path or URL. Multi-image fusion is supported (pass a list) | |
quality | string | no | auto (high for gpt-image-2.6-*) | low / medium / high (only some backends honour this) | |
size | string | no | auto | 512 / 1K / 2K / 3K / 4K, or pixel value (1024x1024) | |
aspect_ratio | string | no | null | 1:1 / 3:2 / 2:3 / 16:9 / 9:16 / 21:9 (some backends also support extreme ratios like 1:4 / 8:1) |
Higher `quality` and larger `size` cost more and run slower. Omit quality unless the user explicitly asks for a level; the script then applies the model's default. Pass low / medium only when the user asks for a faster or cheaper result.
Example — generate
With aspect ratio:
Important: Editing vs Generating
When the user asks to edit, modify, or improve an existing image, pass the original image via image_url. Prefer local file paths directly — the script handles file reading internally. Without image_url, the script generates a brand-new image instead of editing.
Example — edit (image-to-image)
Multi-image fusion — pass a list:
Output
Prints JSON to stdout:
After success, display the image to the user. You can either embed it in markdown () or use the send tool.
On error:
Setup
The script needs at least one of these API keys (set via env_config or config.json):
OPENAI_API_KEY / GEMINI_API_KEY / ARK_API_KEY / DASHSCOPE_API_KEY / MINIMAX_API_KEY / COWAGENT_API_KEY / LINKAI_API_KEY
Each also has an optional *_API_BASE for custom endpoints. The script automatically picks the first configured backend and falls back to the next if it fails — no need to specify a model.
Error Handling
If the script returns an error after trying all configured backends, do NOT retry with the same parameters — the failure is almost always a configuration issue (wrong API key, unsupported API base). Tell the user to fix it via env_config, then retry.
Notes
- HTTP timeout is 300s — high-resolution generation can take over 200s.
- Omit
quality/sizeto use the defaults (gpt-image-2.6-*useshighquality, other models pick automatically). - Input images for editing are auto-compressed to ≤ 4MB / longest edge ≤ 4096px.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/image-generation/SKILL.md
Popularity
- Repository stars
- 47,117
- Repository forks
- 10,374
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zhayujie/cowagent/image-generation)