Agent skill

Qwen Image 2 1 Prompter

by iamyoki in iamyoki/qwen-image-2.1-skill

Optimize, rewrite, and craft image generation and editing prompts tailored specifically for Alibaba's Qwen-Image-2.1 diffusion model.

Apache-2.0Auto-check passedMedia & Creative

Install Qwen Image 2 1 Prompter

skills CLI
$ npx skills add iamyoki/qwen-image-2.1-skill --skill qwen-image-2-1-prompter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install iamyoki/qwen-image-2.1-skill qwen-image-2-1-prompter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/iamyoki/qwen-image-2.1-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/qwen-image-2-1-prompter .claude/skills/qwen-image-2-1-prompter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
qwen-image-2-1-prompter
GitHub stars
157
Token cost
~1.6k tokens
SKILL.md length
672 words
Files
5 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Optimize, rewrite, and craft image generation and editing prompts tailored specifically for Alibaba's Qwen-Image-2.1 diffusion model.

  • Works in 2 steps: Default Mode (Interactive & User-Friendly) → API / Pipeline Mode (Strict JSON Only)
  • The user wants to generate images with Qwen 2.1
  • SKILL.md covers Workflow & Intent Routing, Output Formats (Adaptive Mode) and Tool & Script Execution Policy
  • Runs Python scripts from its folder

What it does

Qwen Image 2 1 Prompter is an agent skill from iamyoki/qwen-image-2.1-skill. 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改图".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/cheat_sheet.md`, `references/edit_rules.md` and `references/t2i_rules.md`).

It sits in Media & Creative, covering Image generation and Diffusion and image models. It works with Qwen. The repository describes itself as: 🎨 Agentic skill for Qwen-Image-2.1: Rewrites and optimizes text-to-image and multi-image editing prompts using official Alibaba specifications. Compatible with skills.sh and all… The licence is Apache-2.0.

When your agent uses it

  • The user wants to generate images with Qwen 2.1
  • Enhance prompts for Qwen-Image
  • Composite existing images with Qwen
  • Perform outpainting/inpainting/face-swapping

Example prompts

  • “帮我优化通义生图提示词”
  • “用千问2.1出图”
  • “Qwen改图”
  • “/qwen-image-2-1-prompter”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Default Mode (Interactive & User-Friendly)
  2. API / Pipeline Mode (Strict JSON Only)

What it can do on your machine

Read from SKILL.md and the folder at commit 32b8100. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Qwen Image 2 1 Prompter loads about 1.6k tokens when it runs, and up to ~8.3k if it reads all its reference files. Until then it costs about 126 tokens; SKILL.md has 672 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~126
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from iamyoki/qwen-image-2.1-skill at commit 32b8100, republished under its Apache-2.0 licence (© iamyoki). 672 words, ~1,584 tokens.

Download SKILL.mdSave it as .claude/skills/qwen-image-2-1-prompter/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
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.
      • Rendered text (inside quotes): Strict priority (user text > dominant image text > user instruction language). Monolingual only.
    2. Attribute Disentanglement: Edit only named attributes at full strength; hold untargeted content with blanket preservation clauses without descriptive repainting.
    3. Tagging (N >= 2): Mandatory <image1>, <image2> tags. For N = 1, refer to "图像" or "the image" without tags.
    4. Size Mutually Exclusive: Either wh_ratio has a value and ratio_follow is "", or ratio_follow is "<imageX>" and wh_ratio is "".

Show full SKILL.md (272 more words)Show less

Output Formats (Adaptive Mode)

Adapt your output presentation to the user's explicit needs:

1. Default Mode (Interactive & User-Friendly)

Used for all standard interactive chat requests. Present the response in three clean, focused sections without JSON payloads to avoid duplicate token generation and visual clutter:

  1. Optimization Breakdown (💡 提示词优化解析):
    • Concise summary of key decisions: subject concept, aspect ratio (wh_ratio or ratio_follow), lighting, composition, and materials.
  2. Ready-to-Use Prompt (📋 提示词 - 可直接复制):
    • Section title: #### 📋 提示词(可直接复制).
    • Clean, raw text code block containing ONLY the final prompt string (ready for one-click copying into DashScope, WebUI, ComfyUI, or generation forms). Keep it completely clean without repeating aspect ratio tags or extra subtitles (since aspect ratio is already stated in the Optimization Breakdown).
    • Do NOT output JSON in default mode.
  3. Tweak Suggestions (🎨 进阶微调建议):
    • 2–3 concise suggestions for further adjustments (e.g., style variations, custom rendered text, or alternative aspect ratios).
2. API / Pipeline Mode (Strict JSON Only)

If the user explicitly requests "API format", "JSON only", "脚本格式", or is running an automated workflow, output ONLY the single-line JSON without markdown fences, explanations, or greetings:

json
{"rewritten_prompt": "...", "wh_ratio": "3:2"}

(or for edit tasks: {"rewritten_prompt": "...", "wh_ratio": "", "ratio_follow": "<image1>"})


Tool & Script Execution Policy

  • Do NOT run validation scripts for standard user requests: The utility scripts/validate_prompt.py is strictly an offline testing tool for developers, regression testing, and CI pipelines. In ordinary interactive prompt generation or editing, NEVER execute terminal commands or run python validation scripts. Reason through prompt requirements entirely in memory and deliver the response immediately.
  • Only run validate_prompt.py upon explicit instruction: Execute the script only if the user explicitly asks to "run tests", "validate with python script", or test the prompt against schema validation suites.

© iamyoki, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/qwen-image-2-1-prompter of iamyoki/qwen-image-2.1-skill.

  • SKILL.md
  • references/cheat_sheet.md
  • references/edit_rules.md
  • references/t2i_rules.md
  • scripts/validate_prompt.py

Open the folder on GitHubat commit 32b8100

Compare with similar skills

Qwen Image 2 1 Prompter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Qwen Image 2 1 Prompter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Qwen Image 2 1 Prompter this skilliamyoki/qwen-image-2.1-skill157—~1.6kAutomated safety check: PassApache-2.0
Ernie Imageartokun/comfyui-mcp803—~4.5kAutomated safety check: PassMIT
Flux2 Klein PromptingAnastasiyaW/codex-claude-code-config154—~2.8kAutomated safety check: PassMIT
Character Refseternityspring/shuohao-skills4.3k—~1.7kAutomated safety check: WarnApache-2.0
Anima Baseartokun/comfyui-mcp803—~4kAutomated safety check: PassMIT
Image Genopen-octo/octo-agent125—~3.1kAutomated safety check: NotesMIT

Similar skills

  • Ernie Image

    artokun/comfyui-mcp

    Build Baidu ERNIE-Image / ERNIE-Image-Turbo workflows, primarily TEXT-TO-IMAGE.

    803 GitHub stars~4.5k tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Flux2 Klein Prompting

    AnastasiyaW/codex-claude-code-config

    Expert prompt engineering for FLUX.2 [klein] image generation and editing model.

    154 GitHub stars~2.8k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Character Refs

    eternityspring/shuohao-skills

    给任何故事里的角色真出参考图(小说改编、自己原创的故事、单独设计一个角色都行,不需要小说原文): 一段话描述角色,拆成分层字段、补全后确认, 先出一张正面全身锚点,其余视图(大头照、90° 侧面、背面、细节、45° 大头照)都只参考这张锚点, 按需分档出图。每张图带标识、可单独重出,重出后自动标出哪些图过期。

    4.3k GitHub stars~1.7k tokensUpdated 2 days ago
    Media & CreativeAuto-check: warnings
  • Anima Base

    artokun/comfyui-mcp

    Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).

    803 GitHub stars~4k tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Image Gen

    open-octo/octo-agent

    Acquire images as files — generate them with an AI image model (14 providers: OpenAI/gpt-image, Gemini, Qwen, Zhipu, Volcengine, Stability, FLUX, Ideogram, MiniMax, and more), search openly-licensed…

    125 GitHub stars~3.1k tokensUpdated yesterday
    Media & CreativeAuto-check: notes
  • LoRA Space Builder

    huggingface/skills

    Official

    Builds and publishes a Gradio demo on Hugging Face Spaces for a LoRA, with the pipeline, UI and settings chosen to match that LoRA's task and model card.

    11k GitHub starsUsed in 2 repos~8.4k tokens
    AI & LLM EngineeringAuto-check passed

Works with

Questions about Qwen Image 2 1 Prompter

What does Qwen Image 2 1 Prompter do?

Optimize, rewrite, and craft image generation and editing prompts tailored specifically for Alibaba's Qwen-Image-2.1 diffusion model. 1-skill.1 diffusion model.

When should I use Qwen Image 2 1 Prompter?

Qwen Image 2 1 Prompter fits situations like: the user wants to generate images with Qwen 2.1; enhance prompts for Qwen-Image; composite existing images with Qwen; perform outpainting/inpainting/face-swapping.

How do I install Qwen Image 2 1 Prompter in Claude Code?

Run `npx skills add iamyoki/qwen-image-2.1-skill --skill qwen-image-2-1-prompter -a claude-code`. Or copy the skill folder (skills/qwen-image-2-1-prompter in iamyoki/qwen-image-2.1-skill) into .claude/skills/qwen-image-2-1-prompter in your project. Claude Code loads it when a task matches its description.

How do I install Qwen Image 2 1 Prompter in Codex?

Run `npx skills add iamyoki/qwen-image-2.1-skill --skill qwen-image-2-1-prompter -a codex`. Or copy the skill folder (skills/qwen-image-2-1-prompter in iamyoki/qwen-image-2.1-skill) into .agents/skills/qwen-image-2-1-prompter in your project. Codex loads it when a task matches its description.

Can I use Qwen Image 2 1 Prompter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add iamyoki/qwen-image-2.1-skill --skill qwen-image-2-1-prompter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/qwen-image-2-1-prompter, .gemini/skills/qwen-image-2-1-prompter, .github/skills/qwen-image-2-1-prompter and .opencode/skills/qwen-image-2-1-prompter in your project.

What does Qwen Image 2 1 Prompter need to run?

Going by SKILL.md and its folder, Qwen Image 2 1 Prompter needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Qwen Image 2 1 Prompter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Qwen Image 2 1 Prompter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Qwen Image 2 1 Prompter use?

Qwen Image 2 1 Prompter is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Qwen Image 2 1 Prompter use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.7k tokens, read only when the agent opens those files.

What are the alternatives to Qwen Image 2 1 Prompter?

Skills that share tags, products or a category with Qwen Image 2 1 Prompter: Ernie Image (artokun/comfyui-mcp, 803 stars), Flux2 Klein Prompting (AnastasiyaW/codex-claude-code-config, 154 stars), Character Refs (eternityspring/shuohao-skills, 4.3k stars) and Anima Base (artokun/comfyui-mcp, 803 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Qwen Image 2 1 Prompter?

iamyoki (a GitHub user) maintains it in iamyoki/qwen-image-2.1-skill, which has 157 GitHub stars. The repository was last updated on September 22, 2026.

Source: iamyoki/qwen-image-2.1-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.