
Qwen Wanx Comic Gen
Generate manga and comic-style images from text prompts inside OpenClaw agents using Alibaba DashScope wan2.6-t2i.
Install
npx skills add https://github.com/agentbay-ai/agentbay-skills --skill qwen-wanx-comic-genWhat is this skill?
- Async wan2.6-t2i text-to-image via DashScope with task polling and local download
- Resolves API keys from ~/.openclaw/openclaw.json including ${ENV} placeholders
- Style must live in the prompt—wan2.6-t2i does not accept a separate style parameter
- Prints MEDIA: lines so OpenClaw can attach generated images to replies
- Timestamped output under ./tmp/qwen-wanx-comic-* directories
Adoption & trust: 1 installs on skills.sh; 40 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Video Editagentspace-so/runcomfy-agent-skills
Image To Videoagentspace-so/runcomfy-agent-skills
Image Editagentspace-so/runcomfy-agent-skills
Flux Kontextagentspace-so/runcomfy-agent-skills
Nano Banana 2agentspace-so/runcomfy-agent-skills
Nano Banana Editagentspace-so/runcomfy-agent-skills
Journey fit
Primary fit
Image generation is wired into the agent toolchain as an external API integration during product build. Calls DashScope async text-to-image, polls tasks, and emits MEDIA attachments—classic third-party generative integration work.
Common Questions / FAQ
Is Qwen Wanx Comic Gen safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Qwen Wanx Comic Gen
#!/usr/bin/env python3 """Generate manga/comic-style images using Alibaba DashScope wan2.6-t2i (Tongyi Wanxiang). This script is designed for use inside the OpenClaw "qwen-wanx-comic-gen" skill. It calls the asynchronous text-to-image API, polls for completion, downloads result images, and prints MEDIA: lines that OpenClaw can attach to replies. API key resolution: - Read the primary agent's model provider API key from the OpenClaw config (~/.openclaw/openclaw.json). If that value is a "${VARNAME}" placeholder, the script will resolve VARNAME from the current environment. Model: wan2.6-t2i (does NOT support style parameter; describe style in prompt instead) Example: python3 gen.py --prompt "动漫风格,四格校园日常漫画,Q版角色,小龙虾吉祥物" --n 1 """ import argparse import json import os import sys import time import datetime as dt from pathlib import Path from typing import Any, Dict, List, Optional from urllib import request, error # wan2.6-t2i uses the new async protocol endpoint CREATE_TASK_URL = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" TASK_STATUS_URL = "https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}" def default_out_dir() -> Path: now = dt.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") base = Path("./tmp") base.mkdir(parents=True, exist_ok=True) return base / f"qwen-wanx-comic-{now}" def _resolve_openclaw_config_path() -> Path: return Path.home() / ".openclaw" / "openclaw.json" # def _resolve_openclaw_config_path() -> Path: # return Path.home() / ".clawdbot" / "clawdbot.json" def _load_openclaw_config() -> Optional[Dict[str, Any]]: path = _resolve_openclaw_config_path() if not path.exists(): return None try: raw = path.read_text(encoding="utf-8") return json.loads(raw) except Exception: return None def _extract_primary_model_provider(cfg: Dict[str, Any]) -> Optional[str]: agents = cfg.get("agents") or {} if not isinstance(agents, dict): return None model_id: Optional[str] = None defaults = agents.get("defaults") or {} if isinstance(defaults, dict): model_field = defaults.get("model") if isinstance(model_field, str) and model_field.strip(): model_id = model_field.strip() elif isinstance(model_field, dict): primary_val = model_field.get("primary") if isinstance(primary_val, str) and primary_val.strip(): model_id = primary_val.strip() if not model_id: primary = agents.get("primary") or agents.get("main") if isinstance(primary, dict): val = primary.get("model") if isinstance(val, str) and val.strip(): model_id = val.strip() if not model_id or "/" not in model_id: return None provider = model_id.split("/", 1)[0].strip() return provider or None def _extract_provider_api_key(cfg: Dict[str, Any], provider: str) -> Optional[str]: models = cfg.get("models") or {} if not isinstance(models, dict): return None providers = models.get("providers") or {} if not isinstance(providers, dict): return None entry = providers.get(provider) or {} if not isinstance(entry, dict): return None api_key_val = entry.get("apiKey") if not isinstance(api_key_val, str) or not api_key_val.strip(): return None value = api_key_val.strip() if value.startswith("${") and value.endswith("}") and len(value) > 3: env_name = value[2:-1] env_val = os.environ.get(env_name, "").strip() return env_val or None return value def get_api_key() -> Optional[str]: cfg = _load_openclaw_config() if cfg is not None: provider = _extract_primary_model_provider(cfg) if provider: key = _extract_provider_api_key(cfg, provider) if key: return key else: key = (os.environ.get("DASHSCOPE_API_KEY") or "")