Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问许可证需确认审计提醒

aliyun-wan-image万阿里云图片

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

903

周安装

38

GitHub Stars

383

下载量

316
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aliyun-wan-image(万阿里云图片)
来源仓库:https://github.com/cinience/alicloud-skills
仓库路径:skills/aliyun-wan-image
安装命令:
npx skills add https://github.com/cinience/alicloud-skills --skill aliyun-wan-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cinience/alicloud-skills --skill aliyun-wan-image

简介

aliyun-wan-image 提供文本生成图片与图像编辑能力。

  • 支持背景替换、提示词优化与多模态模型调用。
  • 需设置 API 密钥并选择合适区域,输出图片 URL 与元数据。
  • 涉及品牌、商品或人物展示时需额外核对授权与真实性。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Wan 2.7 Image Generation & Editing

Validation

mkdir -p output/aliyun-wan-image
python -m py_compile skills/ai/image/aliyun-wan-image/scripts/generate_image.py && echo "py_compile_ok" > output/aliyun-wan-image/validate.txt

Pass criteria: command exits 0 and output/aliyun-wan-image/validate.txt is generated.

Output And Evidence

  • Write generated image URLs, prompts, and metadata to output/aliyun-wan-image/.
  • Keep at least one sample JSON response per run.

Prerequisites

  • Install SDK (recommended in a venv):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope
  • Set DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials.

Critical model names

  • wan2.7-image-pro — professional version, supports 4K output
  • wan2.7-image — faster generation, up to 2K

Capabilities

CapabilityDescription
Text-to-imageGenerate images from text prompts
Image editingEdit images with text instructions (1-9 input images)
Interactive editingEdit specific regions via bounding boxes (bbox_list)
Group generationGenerate consistent multi-image sequences (enable_sequential=true, up to 12 images)
Color paletteControl color theme with custom hex+ratio palette (3-10 colors)
Thinking modeEnhanced reasoning for better quality (text-to-image only)

API endpoint

Sync (recommended):

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation

Async (for long tasks):

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation
Header: X-DashScope-Async: enable

Normalized interface (image.generate)

Request

  • prompt (string, required) — up to 5000 characters
  • size (string, optional) — 1K, 2K (default), 4K (pro only), or WxH pixel values
  • n (int, optional) — number of images, 1-4 (default 4), or 1-12 with enable_sequential
  • seed (int, optional) — range [0, 2147483647]
  • reference_image (string/array, optional) — URL or base64, up to 9 images
  • enable_sequential (bool, optional) — group image generation mode
  • thinking_mode (bool, optional, default true) — enhanced reasoning (text-to-image only)
  • bbox_list (array, optional) — bounding boxes for interactive editing
  • color_palette (array, optional) — custom color theme (3-10 colors with hex+ratio)
  • watermark (bool, optional, default false)

Response

  • image_url (string) — PNG, valid for 24 hours
  • image_count (int)
  • size (string) — actual output resolution
  • seed (int)

Quick start (Python + DashScope SDK)

import os
from dashscope.aigc.image_generation import ImageGeneration

def generate_image(req: dict) -> dict:
    messages = [
        {
            "role": "user",
            "content": [{"text": req["prompt"]}],
        }
    ]

    # Add reference images if provided
    ref_images = req.get("reference_images") or []
    if req.get("reference_image"):
        ref_images = [req["reference_image"]] + ref_images
    for img in ref_images:
        messages[0]["content"].append({"image": img})

    params = {
        "model": req.get("model", "wan2.7-image"),
        "messages": messages,
        "size": req.get("size", "2K"),
        "n": req.get("n", 1),
        "api_key": os.getenv("DASHSCOPE_API_KEY"),
        "seed": req.get("seed"),
        "watermark": req.get("watermark", False),
    }

    if req.get("enable_sequential"):
        params["enable_sequential"] = True
    if req.get("thinking_mode") is not None:
        params["thinking_mode"] = req["thinking_mode"]
    if req.get("bbox_list"):
        params["bbox_list"] = req["bbox_list"]
    if req.get("color_palette"):
        params["color_palette"] = req["color_palette"]

    response = ImageGeneration.call(**params)

    content = response.output["choices"][0]["message"]["content"]
    images = [item["image"] for item in content if isinstance(item, dict) and item.get("image")]

    return {
        "image_urls": images,
        "image_count": response.usage.get("image_count"),
        "size": response.usage.get("size"),
    }

Size reference

ModelSupported sizesDefault
wan2.7-image-pro1K, 2K, 4K (text-to-image only), or [768, 4096] px2K
wan2.7-image1K, 2K, or [768, 2048] px2K

Error handling

ErrorLikely causeAction
401/403Missing or invalid DASHSCOPE_API_KEYCheck env var or credentials file.
400 InvalidParameterUnsupported size, bad n value, or missing required imageValidate parameters against model limits.
429Rate limit or quotaRetry with backoff.

Output location

  • Default output: output/aliyun-wan-image/images/
  • Override base dir with OUTPUT_DIR.

Anti-patterns

  • Do not invent model names; use wan2.7-image or wan2.7-image-pro only.
  • Do not use 4K size with wan2.7-image (only pro supports 4K).
  • Do not use enable_sequential with bbox_list — they are separate modes.
  • Image URLs expire after 24 hours; download and persist immediately.

Workflow

  1. Confirm user intent: text-to-image, image editing, group generation, or interactive editing.
  2. Select appropriate model (pro for 4K or higher quality, standard for speed).
  3. Execute with explicit parameters and bounded scope.
  4. Download and save generated images before URL expiration.

References

  • See references/api_reference.md for full HTTP API details.
  • See references/sources.md for source links.

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.91%
按下载量换算120

Claude

30.14%
按下载量换算95

Cursor

19.58%
按下载量换算62

Gemini CLI

10.31%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills