Qwen Skill

v1.0.0

Generate and edit images with Qwen Image via DashScope API. This is a skill, not a callable tool. First use the read tool to open this SKILL.md, then run the...

0· 140·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for huiya-code/qwen-skill.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Qwen Skill" (huiya-code/qwen-skill) from ClawHub.
Skill page: https://clawhub.ai/huiya-code/qwen-skill
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: DASHSCOPE_API_KEY
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install qwen-skill

ClawHub CLI

Package manager switcher

npx clawhub@latest install qwen-skill
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the behavior: the skill runs a Python CLI that calls DashScope Qwen Image endpoints and needs a DASHSCOPE_API_KEY and python3. Required binaries and the primary environment variable are appropriate and proportional to the stated purpose.
Instruction Scope
SKILL.md enforces running the included Python script and parsing MEDIA_REF output. The script will: load .env files (cwd and baseDir), read any local input image files you pass, POST to DashScope endpoints, download returned image URLs, and write published files and HTML viewers to an outbound directory. This behavior is expected for an image-generation skill, but .env auto-loading and saving files to ~/.openclaw/media/outbound are things to be aware of.
Install Mechanism
No automated installer is included; the skill is instruction-only and provides a pip3 install -r requirements.txt step. This is low-risk compared to arbitrary remote downloads. Requirements (requests, Pillow) are reasonable for the task.
Credentials
The only required credential is DASHSCOPE_API_KEY (declared as primary). The script also respects optional envs (DASHSCOPE_REGION, OPENCLAW_MEDIA_OUTBOUND_DIR, OPENCLAW_MEDIA_BASE_URL) and will load any variables from .env files if present — this can surface other project secrets if they exist in .env. That behavior is explainable but worth attention.
Persistence & Privilege
The skill does not request always:true, does not alter other skills, and its filesystem writes are limited to user-specified or default outbound directories. Autonomous invocation is enabled (the platform default) but not unusual here.
Assessment
This skill appears to do what it says: it runs the included Python CLI that calls DashScope (Qwen Image) and requires a DASHSCOPE_API_KEY. Before installing: 1) only provide a DashScope API key intended for image generation (avoid reusing highly privileged keys); 2) check any .env files in your current/project directories — the script auto-loads .env and may pull in other variables you did not intend to expose; 3) note that generated images are written to an outbound directory (default ~/.openclaw/media/outbound) and can be published to a public base URL if OPENCLAW_MEDIA_BASE_URL is set; 4) review the included scripts if you want to confirm behavior (network calls go to dashscope[.intl].aliyuncs.com); and 5) run the skill in an isolated environment or with restricted credentials if you are concerned about accidental exposure of other secrets.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🖼️ Clawdis
Binspython3
EnvDASHSCOPE_API_KEY
Primary envDASHSCOPE_API_KEY
latestvk97fe6772nbj09s4vaws5mn8mn838zck
140downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Qwen Image Skill

Use this skill for:

  • text-to-image generation
  • image-to-image editing (single image)
  • multi-image fusion/editing (1 to 3 input images)
  • never for file renaming by image understanding

Runtime behavior (strict)

  • qwen-image is a skill name, not a built-in tool name.
  • Never emit a tool call named qwen-image.
  • First use read on this SKILL.md, then execute the Python command below.
  • Hard requirement: do not answer from imagination. You must execute the script first.
  • Hard requirement: do not output markdown image syntax like ![](...).
  • Hard requirement: do not output JSON object in final assistant reply.
  • Hard requirement: do not describe image content unless the script actually ran successfully.
  • Hard requirement: never output MEDIA: in tool-stage outputs; only output MEDIA: in the final assistant reply.
  • Hard requirement: never transform MEDIA: lines into markdown image links.
  • Hard requirement: do not use this skill for OCR, pure image understanding, or filename renaming tasks.
  • If the user asks to rename files by image content, use qwen-vision-rename instead.
  • Run the command directly; do not output pre-check/process narration.
  • Do not read or print this SKILL.md or script source unless command fails.
  • Do not output installation/config instructions unless the user explicitly asks for setup.
  • Use script flag --emit-media-ref.
  • On success:
    1. parse the last MEDIA_REF:<path-or-url> line from stdout (ignore preceding shell noise lines)
    2. final reply must be exactly one line: MEDIA:<path-or-url>
    3. if missing MEDIA_REF:, retry command once
  • If command was not executed, do not send a final answer.
  • On failure, output exactly 2 short Chinese sentences:
    1. failure reason
    2. actionable fix

Setup

Install dependencies:

pip3 install -r {baseDir}/requirements.txt

Set API key:

export DASHSCOPE_API_KEY="your_api_key"

Optional region switch:

export DASHSCOPE_REGION="sg"  # sg or bj

Or use .env (auto-loaded from current directory, then {baseDir}):

cat > .env <<'EOF'
DASHSCOPE_API_KEY=your_api_key
DASHSCOPE_REGION=sg
OPENCLAW_MEDIA_OUTBOUND_DIR=~/.openclaw/media/outbound
OPENCLAW_MEDIA_BASE_URL=
EOF

Static URL mapping example (Nginx):

location /gen/ {
  alias /home/huiya/.openclaw/media/outbound/;
  autoindex off;
}

Commands

Text to image:

python3 {baseDir}/scripts/qwen_image.py text2img \
  --prompt "A futuristic tea shop in Shanghai at night, cinematic lighting" \
  --model qwen-image-2.0-pro \
  --size "1024*1024" \
  --n 1 \
  --emit-media-ref \
  --publish-dir ~/.openclaw/media/outbound \
  --out-dir {baseDir}/tmp/qwen-image

Image to image:

python3 {baseDir}/scripts/qwen_image.py img2img \
  --images ./input.png \
  --prompt "Keep composition, convert this to watercolor style" \
  --model qwen-image-2.0-pro \
  --n 1 \
  --emit-media-ref \
  --publish-dir ~/.openclaw/media/outbound \
  --out-dir {baseDir}/tmp/qwen-image

Notes

  • Recommended default: qwen-image-2.0-pro (quality first). qwen-image-2.0 can be used for faster/cheaper runs.
  • Input images can be local paths, public URLs, or data:image/...;base64,....
  • Returned image URLs are temporary. The script downloads images immediately to --out-dir.
  • Published images are copied to OPENCLAW_MEDIA_OUTBOUND_DIR (default: ~/.openclaw/media/outbound).
  • The script also writes .view.html preview pages and uses those URLs in visible text to reduce markdown-image rewrites.
  • OPENCLAW_MEDIA_BASE_URL is optional. Keep it empty for portable packaging; set it per deployment only when you need public links (e.g. https://example.com/gen or local http://127.0.0.1:8090).
  • --emit-media-ref + final one-line MEDIA: reply is recommended for Feishu to avoid duplicate media sends.
  • If you specifically need plain text URL in Control UI, use --reply-format link.
  • Existing shell environment variables override .env values.
  • If endpoint is not explicitly set, the script auto-retries once with the other region endpoint when receiving InvalidApiKey.

Comments

Loading comments...