Qwen-Image 2.1 Prompter skill
qwen-image-2.1-skill
A skill that rewrites prompts for Qwen-Image-2.1 by Alibaba's official rules: text-to-image and multi-image editing
- 209 ★ on the repository
- Last commit
- Apache-2.0
Minimal access
Why this level
- The skill gives text instructions and an offline prompt check with `validate_prompt.py`, and needs no network or keys
- Reads uploaded images to describe their attributes
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/qwen-image-2-1-skillDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill gives text instructions and an offline prompt check with `validate_prompt.py`, and needs no network or keys
- Reads uploaded images to describe their attributes
This is third-party code. Review the repository files before installing.
What it does
The `qwen-image-2-1-prompter` skill turns a short request such as "draw a street stall in the rain" into a prompt for the Qwen-Image-2.1 model. For text-to-image it builds one coherent English paragraph of 400 to 500 words in an observer voice: 8 to 14 spatial placement phrases, a dedicated lighting sentence and an exact aspect ratio, `wh_ratio`. Empty buzzwords such as "8K" and "masterpiece" are dropped. For image editing the skill keeps untouched attributes intact so a change does not leak into other content, and runs a dual-language protocol: a description in Chinese or English plus the literal text to render in the picture. Several source images are tagged `<image1>`, `<image2>` and the canvas size is tracked (`ratio_follow` or `wh_ratio`). There are rules for outpainting, panoramas and three-view grids. By default the reply comes with an optimization breakdown and a copy-ready block, and on direct request it outputs a single JSON line for scripts and ComfyUI.
Who it is for. Designers and content creators who generate images in Qwen-Image and want the agent to format prompts by the vendor's own rules.
Good fit when
- You have a frame idea in two words and Qwen-Image needs a full English prompt with composition and lighting
- A photo has to change in one spot without touching the rest: a new background, clothing or lettering
- Several source pictures have to merge into one scene with clear numbering in the request
- A ComfyUI pipeline expects exactly one JSON line with `rewritten_prompt` and `wh_ratio`
Not a fit when
- You want the picture generated right in chat: the skill only writes the prompt, and you run the model separately
- You work with a different image model: the rewrite rules come from the Qwen-Image-2.1 system prompts
- You need an official Alibaba tool: the project is unofficial and follows the vendor's public specifications
- The agent has no file access and cannot see the source image: attributes then have to be described in words
Example request
Use the qwen-image-2-1-prompter skill: write a Qwen-Image-2.1 prompt for a rainy night noodle stall with neon reflections, a 16:9 cinematic frameLimitations
- The project is unofficial: it only routes to the right scenario and follows Alibaba's published system prompts for generation and editing.
- The skill generates nothing and calls no Qwen API. You take the result to Qwen-Image-2.1 yourself.
- The agent reads source images only with vision support (Claude Code, GPT-4o, Gemini). In a text-only environment attributes are inferred from descriptions and may be inexact.
- The JSON mode turns on only on direct request, otherwise the reply is a breakdown plus a copy-ready block.
How to disable. Delete the `qwen-image-2-1-prompter` folder from the agent's skills directory, for example `.claude/skills/` or `.agents/skills/`. In projects where the skill was installed through the skills CLI, `skills-lock.json` updates on the next run.
FAQ
How do I install the Qwen-Image 2.1 skill in Claude Code?
With `npx skills add iamyoki/qwen-image-2.1-skill`. You can copy the `skills/qwen-image-2-1-prompter` folder into `.claude/skills/` or `~/.claude/skills/`. A third way is to ask the agent to install the skill from the repository link.
Does the skill generate images?
No. It writes and optimizes prompts for text-to-image and image editing. The Qwen-Image-2.1 model itself does the generation outside the skill.
How do I get a JSON reply?
Ask explicitly, for example "output in API format" or "JSON". The skill replies with a single line `{"rewritten_prompt": "...", "wh_ratio": "..."}` and no commentary.
Which rules does the skill follow?
The Qwen-Image-2.1 system prompts for generation and editing from the QwenLM repository. The rules sit in `references/t2i_rules.md` and `references/edit_rules.md`, and a vocabulary of styles, materials and ratios in `cheat_sheet.md`.
Which agents does the skill suit?
Any agent that reads the skills format: Claude Code, Cursor, Windsurf, Roo Code, Cline, Codex, Gemini CLI. The README gives a table of install paths for each.
Discussion
No questions or reviews yet.
Related
SkillsFive image-generation skills: Qwen-Image prompts, logos with shared geometry, diary comics, transparent PNGs and process dioramas
image-prompt-reverse analyzes an uploaded picture and writes a generator prompt together with a negative-term list.
Nuyoah Xiezhen Prompt
南鸢写真提示词
Portrait photography in Chinese: prompts, series, gacha keywords and reshoots with a new subject from the same plan.
A skill that turns a picture into a generator prompt: frame breakdown, an enhanced version, three variants and platform editions.
A Claude Code skill that compiles a vague request into a finished gpt-image-2 prompt and checks it with a validator script
A skill that searches a library of 10,000+ image prompts, shows sample images and tailors the chosen prompt to your article or script
README in short
The README is bilingual, with English and Chinese versions. After a note about being unofficial come links to Alibaba's system prompts, three install paths and a table of agent paths. The capabilities section covers rules for generation and editing and the output modes, and the end shows the repository structure and a Chinese example request with a ready prompt.
README badge
Original SKILL.md
---
name: qwen-image-2-1-prompter
description: Optimize, rewrite, and craft image generation and editing prompts tailored specifically for Alibaba's Qwen-Image-2.1 diffusion model. Use this skill whenever the user wants to generate images with Qwen 2.1, rewrite or enhance prompts for Qwen-Image, edit or composite existing images with Qwen, perform outpainting/inpainting/face-swapping, or asks for prompts matching Tongyi/Wanx/Qwen image generation standards—even if they casually say "帮我优化通义生图提示词", "用千问2.1出图", or "Qwen改图".
---
# Qwen-Image-2.1 Prompt Optimizer
You are an expert prompt engineer dedicated to Alibaba's **Qwen-Image-2.1** diffusion model. You turn vague, brief, or incomplete user requests into high-fidelity, structured prompts that maximize Qwen-Image-2.1's text rendering, spatial layout, lighting coherence, and multi-image editing capabilities.
---
## Workflow & Intent Routing
When invoked, immediately determine the task type and load the corresponding reference rules:
```mermaid
flowchart TD
Start["User Prompt / Request"] --> CheckImage{"Is an input image present\nor referenced?"}
CheckImage -- "No (Text-to-Image)" --> T2I["Mode: Text-to-Image (T2I)"]
CheckImage -- "Yes (Image Editing / Compositing)" --> Edit["Mode: Image Edit (Edit)"]
T2I --> LoadT2I["Consult references/t2i_rules.md"]
Edit --> LoadEdit["Consult references/edit_rules.md"]
LoadT2I --> FormatOutput["Determine Output Format (Adaptive)"]
LoadEdit --> FormatOutput
```
### Mode 1: Text-to-Image (T2I)
- **Trigger**: The user wants to generate a new image from scratch without reference images.
- **Reference**: Read `references/t2i_rules.md` for the official 8-step framework and `references/cheat_sheet.md` for vocabulary.
- **Golden Rules**:
1. **Language**: The descriptive prose is **always in English**, regardless of user input language. Any text rendered inside the image remains in its original script inside double quotes `""`.
2. **Role**: You are an **observer** describing the finished scene, never talking to the user or giving commands to the AI.
3. **No Quality Boosters**: Never include empty hype words like "8K", "photorealistic masterpiece", "award-winning", or "highly detailed".
4. **Structure**: Exactly one long paragraph (~20 sentences, ~400–500 words), opening with a 20-word anchor sentence, walking the frame with 8–14 positional phrases, dedicating a sentence to lighting, and ending with an overall composition summary.
5. **Aspect Ratio**: Stored in `wh_ratio` (`3:2`, `2:3`, `1:1`, `16:9`, `9:16`, etc.). Never write the ratio or pixel numbers into the prompt text itself.
### Mode 2: Image Edit & Multi-Image Compositing (Edit)
- **Trigger**: The user provides one or more images (`<image1>`, `<image2>`, ...) and asks to modify, restyle, replace, add, outpaint, or combine them.
- **Reference**: Read `references/edit_rules.md` for language decisions, attribute disentanglement, and canvas selection.
- **Dual-Track Vision Guideline**:
- *If your agent environment supports image viewing/vision tools*: **Inspect the input image(s)** first! Extract legible text, subject pose, clothing, and background layout before rewriting.
- *If text-only*: Anchor on user-supplied details and ask for clarification only if crucial invariants (e.g. canvas identity) cannot be reasonably inferred.
- **Golden Rules**:
1. **Two Language Decisions**:
- *Prose language (outside quotes)*: Chinese if user instructed in Chinese; English if user instructed in English or any other language.