Agent skill

Image Generation

by QwenLM in QwenLM/qwen-code-examples

Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions.

MITAuto-check passedMedia & Creative

Install Image Generation

skills CLI
$ npx skills add QwenLM/qwen-code-examples --skill image-generation -a claude-code

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

GitHub CLI
$ gh skill install QwenLM/qwen-code-examples image-generation --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/QwenLM/qwen-code-examples.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/image-generate .claude/skills/image-generation && 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
image-generation
GitHub stars
143
Token cost
~568 tokens
SKILL.md length
206 words
Files
2 (incl. scripts)
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions.

  • Works in 3 steps: Refine the Prompt → Run the Script → View Results
  • Tasks that involve Image generation
  • SKILL.md covers Core Features, Prerequisites, User Guide and Example
  • Runs JavaScript scripts from its folder; calls node; needs DASHSCOPE_API_KEY

What it does

Image Generation is an agent skill from QwenLM/qwen-code-examples. Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions.

Its SKILL.md is about 570 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/generate_image.js`).

It sits in Media & Creative, covering Image generation. It works with Alibaba Cloud. The repository describes itself as: A collection of practical examples and best practices for Qwen Code. The licence is MIT.

When your agent uses it

  • Tasks that involve Image generation

Example prompts

  • “/image-generation”

Requirements

  • Node.js
  • A credential in DASHSCOPE_API_KEY

Workflow steps

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

  1. Refine the Prompt
  2. Run the Script
  3. View Results

What it can do on your machine

Read from SKILL.md and the folder at commit 0ece9fe. 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/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    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 these keys or tokens, usually read from environment variables:

    • DASHSCOPE_API_KEY

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

Context cost

Image Generation loads about 568 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 206 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~568

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 QwenLM/qwen-code-examples at commit 0ece9fe, republished under its MIT licence (© QwenLM). 206 words, ~568 tokens.

Download SKILL.mdSave it as .claude/skills/image-generation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
image-generation
description
Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions.
version
1.0.0
license
MIT

Image Generation Skill

This skill allows agents to automatically generate high-quality images (defaulting to hand-drawn style) based on user intent.

Core Features

  • Smart Prompt Optimization: Transforms simple user intent into detailed hand-drawn style prompts.
  • Fast Generation: Uses non-streaming interfaces to significantly speed up image generation.
  • Auto-Save: Automatically downloads generated images locally and saves metadata and API responses simultaneously.

Prerequisites

Before using this skill, ensure that the DASHSCOPE_API_KEY environment variable is set:

bash
export DASHSCOPE_API_KEY="Your API Key"

User Guide

1. Refine the Prompt

You need to refine the user's original intent into a prompt suitable for image generation. For hand-drawn versions of architecture or flowcharts, it's recommended to include keywords like "hand-drawn", "sketch", "architectural drawing", etc.

2. Run the Script

Use the following command to call the generation script:

bash
node skills/image-generate/scripts/generate_image.js "Your detailed prompt"
3. View Results

After the script completes, it will generate the following files in the current directory:

  • image_YYYY-MM-DDTHH-mm-ss.png: The generated image file.
  • metadata_YYYY-MM-DDTHH-mm-ss.json: Metadata including prompt, file size, and duration.
  • response_YYYY-MM-DDTHH-mm-ss.json: Raw API response data (for debugging).

Example

User Intent: "Help me draw an architecture diagram of an AI coding assistant."

Recommended Prompt: "A detailed hand-drawn architectural diagram of an AI coding assistant, showing the interaction between the user, the IDE, and the LLM, technical sketch style, clean lines, white background."

Execution Command:

bash
node skills/image-generate/scripts/generate_image.js "A detailed hand-drawn architectural diagram of an AI coding assistant, showing the interaction between the user, the IDE, and the LLM, technical sketch style, clean lines, white background."

© QwenLM, MIT. 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 1 other file (scripts) in skills/image-generate of QwenLM/qwen-code-examples.

  • SKILL.md
  • scripts/generate_image.js

Open the folder on GitHubat commit 0ece9fe

Compare with similar skills

Image Generation 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.

Image Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Image Generation this skillQwenLM/qwen-code-examples143—~568Automated safety check: PassMIT
Aliyun Wan Imagecinience/alicloud-skills397—~1.5kAutomated safety check: PassMIT
Aliyun Zimage Turbocinience/alicloud-skills397—~863Automated safety check: PassMIT
Bailian Media Generationmodelstudioai/cli542—~2kAutomated safety check: PassApache-2.0
Dashscopecalesthio/OpenMontage66k—~1.5kAutomated safety check: NotesAGPL-3.0
Aliyun Qwen Imagecinience/alicloud-skills397—~1.8kAutomated safety check: PassMIT

Similar skills

  • Aliyun Wan Image

    cinience/alicloud-skills

    A skill your agent uses when generating or editing images with DashScope Wan 2.7 image models (wan2.7-image, wan2.7-image-pro).

    397 GitHub stars~1.5k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Aliyun Zimage Turbo

    cinience/alicloud-skills

    A skill your agent uses when generating images with Alibaba Cloud Model Studio Z-Image Turbo (z-image-turbo) via DashScope multimodal-generation API.

    397 GitHub stars~863 tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Bailian Media Generation

    modelstudioai/cli

    Chinese-language entry point into Alibaba Cloud Bailian's image, video and speech generation and understanding, routed through separate image, video, speech and vision commands.

    542 GitHub stars~2k tokensUpdated today
    Media & CreativeAuto-check passed
  • Dashscope

    calesthio/OpenMontage

    DashScope (Alibaba Cloud Bailian / 阿里云百炼) integration — image generation (qwen-image-2.0-pro), text-to-speech (qwen3-tts-flash), and ASR with word-level timestamps (qwen3-asr-flash-filetrans).

    66k GitHub stars~1.5k tokensUpdated 6 days ago
    Media & CreativeAuto-check: notes
  • Aliyun Qwen Image

    cinience/alicloud-skills

    A skill your agent uses when generating images with Model Studio DashScope SDK using Qwen Image generation models (qwen-image, qwen-image-plus, qwen-image-max, qwen-image-2.0 series and snapshots).

    397 GitHub stars~1.8k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed

More from QwenLM/qwen-code-examples

All 9 skills in this repo
  • Dashboard Builder

    QwenLM/qwen-code-examples

    Build full-stack dashboard applications using React/Next.js + shadcn/ui + Tailwind CSS + Recharts + Express with customizable data sources.

    143 GitHub stars~3.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Auto PR

    QwenLM/qwen-code-examples

    Automated PR submission assistant, including code review, documentation generation, and PR creation

    143 GitHub stars~790 tokensUpdated 4 mo ago
    Auto-check passed
  • Codegraph QA

    QwenLM/qwen-code-examples

    Use CodeScope to analyze any indexed codebase via its graph database (neug) and vector index (zvec).

    143 GitHub stars~4.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Oss Styles

    QwenLM/qwen-code-examples

    为开源项目生成专业宣传视频,传入 {owner}/{repo} 参数 Triggers on "生成开源视频", "宣传视频", "oss video", "remotion video".

    143 GitHub stars~405 tokensUpdated 4 mo ago
    Auto-check passed
  • Browser Use

    QwenLM/qwen-code-examples

    Control browser pages using the Playwright MCP server. An agent skill from QwenLM/qwen-code-examples.

    143 GitHub stars~451 tokensUpdated 4 mo ago
    Auto-check passed
  • Computer Use

    QwenLM/qwen-code-examples

    Control the local desktop using the computer MCP tool from computer-use-mcp.

    143 GitHub stars~632 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Image Generation

What does Image Generation do?

Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions. Image Generation is an agent skill from QwenLM/qwen-code-examples. Image generation skill based on Alibaba Cloud DashScope, supporting the creation of high-quality hand-drawn or standard images from user descriptions.

When should I use Image Generation?

Image Generation fits situations like: tasks that involve Image generation.

How do I install Image Generation in Claude Code?

Run `npx skills add QwenLM/qwen-code-examples --skill image-generation -a claude-code`. Or copy the skill folder (skills/image-generate in QwenLM/qwen-code-examples) into .claude/skills/image-generation in your project. Claude Code loads it when a task matches its description.

How do I install Image Generation in Codex?

Run `npx skills add QwenLM/qwen-code-examples --skill image-generation -a codex`. Or copy the skill folder (skills/image-generate in QwenLM/qwen-code-examples) into .agents/skills/image-generation in your project. Codex loads it when a task matches its description.

Can I use Image Generation 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 QwenLM/qwen-code-examples --skill image-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/image-generation, .gemini/skills/image-generation, .github/skills/image-generation and .opencode/skills/image-generation in your project.

What does Image Generation need to run?

Going by SKILL.md and its folder, Image Generation needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node) and credentials named DASHSCOPE_API_KEY. Our summary lists: Node.js; A credential in DASHSCOPE_API_KEY.

Does Image Generation 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 Image Generation 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 Image Generation use?

Image Generation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Image Generation use?

About 568 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Image Generation?

Skills that share tags, products or a category with Image Generation: Aliyun Wan Image (cinience/alicloud-skills, 397 stars), Aliyun Zimage Turbo (cinience/alicloud-skills, 397 stars), Bailian Media Generation (modelstudioai/cli, 542 stars) and Dashscope (calesthio/OpenMontage, 66k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Image Generation?

QwenLM (a GitHub organization) maintains it in QwenLM/qwen-code-examples, which has 143 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on May 19, 2026.

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