🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Qwen Skill

by @huiya-code

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

Versionv1.0.0
βš™οΈ Configuration

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;
}

πŸ“‹ Tips & Best Practices

  • 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.
  • View on ClawHub
    TERMINAL
    clawhub install qwen-skill

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’