Communitygithub.com

vermicellichina-max/wan22-animate

用 Wan2.2-Animate 把静态人物图片和参考视频合成动作视频(动作模仿/舞蹈复刻/动漫角色动画)。输入一张角色图 + 一段参考视频,输出该角色跟着视频做同样动作和表情的 MP4。当用户提到"让这张图动起来""跟着视频跳舞""动作模仿""角色替换"" animate""Wan2.2-Animate""万相图生动作"或要求把某人的动作迁移到另一张图片上时,使用本技能。

wan22-animate 是什么?

wan22-animate is a Claude Code agent skill that 用 Wan2.2-Animate 把静态人物图片和参考视频合成动作视频(动作模仿/舞蹈复刻/动漫角色动画)。输入一张角色图 + 一段参考视频,输出该角色跟着视频做同样动作和表情的 MP4。当用户提到"让这张图动起来""跟着视频跳舞""动作模仿""角色替换"" animate""Wan2.2-Animate""万相图生动作"或要求把某人的动作迁移到另一张图片上时,使用本技能。.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add vermicellichina-max/wan22-animate

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Wan2.2-Animate Image-to-Video

Transfer motion and expression from a reference video to a static character image, generating a dynamic video. Uses Alibaba Cloud Bailian API with the fixed model name wan2.2-animate-move.

Pre-checks (Always Do First)

This skill requires an Alibaba Cloud Bailian API Key. First, switch the working directory to where this SKILL.md is located, then run:

python scripts/wan_animate.py check

If the path reports "file not found", retry using the absolute path of the skill directory (replace scripts/wan_animate.py with <skill_directory>/scripts/wan_animate.py). Do not give up or write requests yourself just because the script is missing.

  • Output "api_key_set": true → proceed directly.
  • Output false → Stop and ask the user for the API Key, do not guess or hardcode it. Inform the user to create one in the Alibaba Cloud Bailian console and set the environment variable:
# Windows PowerShell
$env:DASHSCOPE_API_KEY="sk-xxxx"
# macOS / Linux
export DASHSCOPE_API_KEY=sk-xxxx

Do not write the user's API Key into any files, notes, or conversation summaries. Only pass it via environment variables in the current session.

If the user wants to use a business space-specific domain (faster and more stable), have them provide it and set DASHSCOPE_API_HOST: https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com or for Singapore region https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com. Note that API Keys for Beijing and Singapore are not interchangeable.

Execution

python scripts/wan_animate.py run \
  --image <character image path or URL> \
  --video <reference video path or URL> \
  --mode wan-std \
  --out ./output

Parameter Descriptions:

ParameterDescription
--imageRequired. Character image, can be a local path or public URL. Local files are automatically uploaded to Bailian temporary storage by the script.
--videoRequired. Reference video, same as above. Duration 2~30 seconds.
--modewan-std standard mode, fast and cheap, default; wan-pro professional mode, smoother but slower and more expensive.
--watermarkAdds an "AI-generated" watermark, not added by default.
--outOutput directory, default ./wan_animate_output.
--no-downloadOnly return the result link, no local download. Result links are valid for 24 hours; downloading locally is usually better.

The script automatically: uploads local assets → creates an async task → polls every 15 seconds → downloads the final output locally. A single video typically takes a few minutes—this is normal, do not abort midway, let the polling complete. Finally, it outputs the result JSON between RESULT_JSON_BEGIN / RESULT_JSON_END, and informs the user of the video path.

Asset Constraints (Check Before Submitting to Save a Round of Failure)

  • Image: JPG/JPEG/PNG/BMP/WEBP, width and height both 200~4096 px, aspect ratio 1:3 ~ 3:1, ≤ 5MB
  • Video: MP4/AVI/MOV, duration 2~30 seconds, width and height both 200~2048 px, aspect ratio 1:3 ~ 3:1, ≤ 200MB
  • Both assets must be publicly accessible URLs or local files. Regular URLs requiring login or anti-leeching will fail; in such cases, have the user download the file locally first and use the local path.

If constraints are exceeded, inform the user before calling and explain what needs to be done (crop, compress, transcode). Do not submit blindly.

Quality Optimization (Check These First When Output Looks Poor)

  1. The character's framing ratio in the image and reference video should be similar — a full-body and a half-body shot will almost certainly fail.
  2. The body proportions of the characters should match.
  3. The reference video should have as high resolution and frame rate as possible; blurry videos will directly degrade output quality.
  4. For the first attempt, use wan-std to verify motion alignment. Once satisfied, use wan-pro for the final version — pro mode is expensive, don't waste money upfront.

Common Error Handling

The script translates Bailian error codes into plain language; you only need to relay them to the user:

  • UrlOrFileNotReachable / downloadFail → link unreachable or requires authentication, switch to local file upload.
  • DataInspectionFailed / IPInfringementSuspect → asset failed content review or suspected infringement, replace the asset.
  • Arrearage / FreeQuotaExhausted → account overdue or free quota exhausted, requires recharge/purchasing the paid plan.
  • InvalidApiKey → Key invalid, have the user regenerate it.
  • Throttling → rate-limited, wait and retry.
  • InvalidParameter → asset dimensions/duration do not meet requirements, check against the constraints above.

Billing: Input is free; charged by the number of seconds of successfully generated video; failed calls are not charged. For specific unit prices, refer to the Bailian console. If the user asks, direct them to the "Model Pricing" page—do not quote from memory.

If the user has not yet provided assets, first ask where the image and video are. Do not fabricate file paths.

相关技能