wan-prime-video
/wan-prime-video
Batch multiple local sprite images into one Wan3.0-Video-Prime first frame with per-role prompts and a matching crop layout. Use for cost-conscious sprite animation batches, single-image Wan Prime generation, or resuming an existing Wan Prime task.
- Author
- daetz-coder ↗
- Repository
- pixel-asset-workshop ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/compose_reference.py, scripts/generate_wan_video.py
What it does and when to use it
Batch multiple local sprite images into one Wan3.0-Video-Prime first frame with per-role prompts and a matching crop layout. Use for cost-conscious sprite animation batches, single-image Wan Prime generation, or resuming an existing Wan Prime task.
Original author description
Batch multiple local sprite images into one Wan3.0-Video-Prime first frame with per-role prompts and a matching crop layout. Use for cost-conscious sprite animation batches, single-image Wan Prime generation, or resuming an existing Wan Prime task.
How it works
- Prepare a batch locally
- Generate a clip
- Retrieve and deliver
SKILL.md preview
---
name: wan-prime-video
description: Batch multiple local sprite images into one Wan3.0-Video-Prime first frame with per-role prompts and a matching crop layout. Use for cost-conscious sprite animation batches, single-image Wan Prime generation, or resuming an existing Wan Prime task.
---
# Wan Prime Video
[简体中文](SKILL.zh.md)
When given multiple roles for the same video settings, compose them locally into one first frame. Each role gets its own cell and motion text. A batch uses one Wan task, so six roles can share a single submission. Use separate batches when motions need different durations or when the shared canvas leaves too little room for equipment or motion.
## Prepare a batch locally
Use [compose_reference.py](scripts/compose_reference.py) with Python 3 and ImageMagick. Make a JSON file listing the role images in reading order. Paths are relative to the JSON file. Transparent PNGs preserve clean edges and make it possible to align feet after trimming transparent margins.
```json
{
"roles": [
{"name": "Warhammer", "image": "hammer.png", "action": "attack", "motion": "Raise the hammer, strike down to the right once, and recover."},
{"name": "Grenadier", "image": "grenadier.png", "action": "run", "motion": "Run in place with alternating foot contacts."}
]
}
```
```bash
python3 skills/wan-prime-video/scripts/compose_reference.py \
--config ./batch.json --output ./batch-reference.png
```
This writes `batch-reference.png`, `batch-reference-prompt.txt`, and `batch-reference-layout.json`. It chooses a grid that maximizes space per role. Supply `cols` and/or `rows` to control the layout. The default is a 1280 × 720 canvas with a magenta key, common scale, and aligned feet. Optional config keys are `width`, `height`, `color`, `scale`, `baseline`, `duration`, `resolution`, and a default `action`. Supported actions are `idle`, `walk`, `run`, and `attack`. Review the composite and each cell's motion clearance. For custom poses or complex action prompts, use `$sprite-motion-prompts`.
Local preparation is sufficient when the user asks only for the reference or prompt. When generation is requested, pass the combined PNG and combined prompt to the runner **once per batch**. Set `--ratio adaptive` so the composition stays aligned with its layout. Match `--duration` and `--resolution` to the batch config. Deliver the layout JSON with the MP4. In 逐帧, import the JSON via 「导入格位 JSON」 and load the video. The extractor maps the saved occupied cells to the actual video size.
## Generate a clip
Resolve the user's image, prompt, output location, and settings from the request and project. Default to 5 seconds, 480P, 16:9, audio off, prompt rewriting off, and a solid magenta fill for transparent sprites and aspect-ratio padding. Honor the supplied settings. Provide prompt text or write just the selected prompt block to a UTF-8 text file.
Run the following from the Pixel Asset Workshop repository root. If you installed the skill elsewhere, use the absolute path to its bundled script.
```bash
python3 skills/wan-prime-video/scripts/generate_wan_video.py \
--image ./reference.png \
--prompt-file ./run-prompt.txt \
--resolution 480P --ratio 16:9 --duration 5 \
--output ./run.mp4
```
Use `--prompt` for a short inline prompt. Resolution supports 480P, 720P, and 1080P. Duration supports 2–30 whole seconds. Use `--ratio adaptive` to keep the input image proportions. Set `--background '#RRGGBB'` for a different key color. Set `--audio` or `--prompt-extend` when requested. The runner requires Python 3 and ImageMagick. With no output path, it saves `<image-stem>-wan-prime.mp4` in the working directory.
Set `DASHSCOPE_WORKSPACE` to your Model Studio workspace ID and `DASHSCOPE_REGION` to its region (defaults to `cn-beijing`). The runner uses `DASHSCOPE_API_KEY` or reads the macOS Keychain item for account `codex` and service `codex.wan-prime-video.<workspace-id>`. Keep credentials in the environment or Keychain and out of prompts, command arguments, and output. Add `--dry-run` to validate the inputs and settings locally without a workspace, credential or paid submission.
## Retrieve and deliver
The runner prints the task ID as soon as Alibaba accepts it. Wait for the task and link the saved MP4. If polling or the download is interrupted, run the same script with `--task-id <id> --output <path>` and the same workspace. If submission status is uncertain and no ID was returned, check Model Studio before submitting again. Each accepted submission is a separate generation.
See [Alibaba Cloud's Wan3.0 API reference](https://help.aliyun.com/en/model-studio/wan3-video-generation-api-reference) for model settings and response details.
The Pixel Asset Workshop example includes the exact submitted prompt, source clip and crop layout. It also shows how to extract the saved video locally without submitting another task. [Tiny Swords case study](../../examples/tiny-swords/README.md)
Files in this package (4)
- SKILL.md 5 KB
- SKILL.zh.md 4 KB
- scripts/compose_reference.py 9 KB
- scripts/generate_wan_video.py 10 KB
Versions
The database has no other skills named wan-prime-video.
Database snapshot: 13.11.2026 · package version 84d2a2eb0ce6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100qwencloud-video-generation
Generate videos using Wan models. Supports text-to-video, image-to-video, first+last frame, reference-based role-play, and video editing (VACE). TRIGGER when: user wants to create, generate, or edit video content, mentions video generation/animation/video clips/Wan models, or… - 90game-sprite-animation
Use when the task is to create sprite animation sets with consistent pivots and timing. - 100sprite-spec
Specify pixel-art sprites: palette, proportions, animation states, frame counts, and AI image prompts. Use when designing a character sprite or sprite sheet spec. - 100prime-help
Quick-reference card for the prime-agent plugin: which skill to use when, commands, setup, and known gotchas. One-shot display. Trigger: /prime-help, "prime help", "how do I use prime-agent", "one-shot or worker?". - 100scenario-wan
Use when generating or editing video with Wan models on Scenario via MCP: text-to-video, image-to-video from a still, first and last frame brackets, extending a clip, instruction-based video editing, character motion transfer or person replacement (Animate), aspect ratio… - 95sprite-processing
Use when processing, cropping, splitting, or cleaning up existing sprite images or sprite sheets. Triggers on "crop sprite", "remove background", "split sprite sheet", "make transparent", "process PNG".