$npx -y skills add QwenCloud/qwencloud-ai --skill qwencloud-image-generation[QwenCloud] Generate and edit images using Wan and Qwen Image models. Supports text-to-image, image editing (style transfer, subject consistency, text rendering), and interleaved text-image output. TRIGGER when: user wants to create illustrations, product images, artistic designs
| 1 | > **Agent setup**: If your agent doesn't auto-load skills (e.g. Claude Code), |
| 2 | > see [agent-compatibility.md](references/agent-compatibility.md) once per session. |
| 3 | |
| 4 | # Qwen Image Generation |
| 5 | |
| 6 | Generate and edit images using Wan and Qwen Image models. Supports text-to-image, reference-image editing (style |
| 7 | transfer, subject consistency, multi-image composition, text rendering), and interleaved text-image output. |
| 8 | This skill is part of **qwencloud/qwencloud-ai**. |
| 9 | |
| 10 | ## Skill directory |
| 11 | |
| 12 | Use this skill's internal files to execute and learn. Load reference files on demand when the default path fails or you need details. |
| 13 | |
| 14 | | Location | Purpose | |
| 15 | |----------|---------| |
| 16 | | `scripts/image.py` | Default execution — sync/async, upload, download | |
| 17 | | `references/execution-guide.md` | Fallback: curl (sync/async), code generation | |
| 18 | | `references/prompt-guide.md` | Prompt formulas, style keywords, negative_prompt, prompt_extend decision | |
| 19 | | `references/api-guide.md` | API supplement | |
| 20 | | `references/sources.md` | Official documentation URLs | |
| 21 | | `references/agent-compatibility.md` | Agent self-check: register skills in project config for agents that don't auto-load | |
| 22 | |
| 23 | ## Security |
| 24 | |
| 25 | **NEVER output any API key or credential in plaintext.** Always use variable references (`$DASHSCOPE_API_KEY` in shell, `os.environ["DASHSCOPE_API_KEY"]` in Python). Any check or detection of credentials must be **non-plaintext**: report only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of `.env` or config files that may contain secrets. |
| 26 | |
| 27 | **When the API key is not configured, NEVER ask the user to provide it directly.** Instead, help create a `.env` file with a placeholder (`DASHSCOPE_API_KEY=sk-your-key-here`) and instruct the user to replace it with their actual key from the [QwenCloud Console](https://home.qwencloud.com/api-keys). Only write the actual key value if the user explicitly requests it. |
| 28 | |
| 29 | ## Key Compatibility |
| 30 | |
| 31 | Scripts require a **standard QwenCloud API key** (`sk-...`). Coding Plan keys (`sk-sp-...`) cannot be used — image generation models are not available on Coding Plan, and Coding Plan does not support the native QwenCloud API. The script detects `sk-sp-` keys at startup and prints a warning. If qwencloud-ops-auth is installed, see its `references/codingplan.md` for full details. |
| 32 | |
| 33 | ## Mode Selection Guide |
| 34 | |
| 35 | | User Want | Mode | Model | |
| 36 | |-----------|------|-------| |
| 37 | | Generate image from text only | **t2i** | `wan2.6-t2i` (default), or `wan2.7-image` / `wan2.7-image-pro` | |
| 38 | | Edit image / apply style transfer based on 1–4 reference images | **image-edit** | `wan2.7-image-pro` / `wan2.7-image` / `wan2.6-image` | |
| 39 | | Subject consistency: generate new images maintaining subject from references | **image-edit** | `wan2.7-image-pro` / `wan2.7-image` / `wan2.6-image` | |
| 40 | | Multi-image composition: combine style from one image, background from another | **image-edit** | `wan2.7-image-pro` / `wan2.7-image` / `wan2.6-image` | |
| 41 | | Single-image editing preserving subject consistency | **i2i** | `wan2.5-i2i-preview` | |
| 42 | | Multi-image fusion: place object from one image into another scene | **i2i** | `wan2.5-i2i-preview` | |
| 43 | | Interleaved text-image output (e.g., tutorials, step-by-step guides) | **interleave** | `wan2.6-image` | |
| 44 | | Fast text-to-image drafts | **t2i** | `wan2.2-t2i-flash` | |
| 45 | | Edit text within images, precise element manipulation | **image-edit** | `qwen-image-2.0-pro` | |
| 46 | | Multi-image fusion with realistic textures | **image-edit** | `qwen-image-2.0-pro` | |
| 47 | | Posters / complex Chinese+English text rendering | **t2i** | `qwen-image-2.0-pro` | |
| 48 | | Text-to-image with fixed aspect ratios (batch) | **t2i** | `qwen-image-plus` / `qwen-image-max` | |
| 49 | |
| 50 | ## Model Selection |
| 51 | |
| 52 | ### Wan Series (default) |
| 53 | |
| 54 | | Model | Use Case | |
| 55 | |-------|----------| |
| 56 | | **wan2.6-t2i** | **Recommended for text-to-image** — sync + async, best quality | |
| 57 | | **wan2.7-image-pro** | **Multi-function** (4K support) — text-to-image, image editing (0–9 images), sequential multi-image, interactive editing (bbox), thinking mode, color palette. Max 4K fo |