# qianwen-video-generation

Generate or edit video with Wan and HappyHorse models. The skill handles text and image prompts, frame transitions, reference-based scenes, and video editing.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 5500 installs · ★ 116
- Author: QianWen-AI
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/QianWen-AI/qianwen-ai/tree/HEAD/skills/video/qianwen-video-generation/SKILL.md
- Updated: 2026-10-10
- HTML: https://affpapa.org/en/nevibecode/skills/qianwen-video-generation

## What it does

The skill sends video-generation jobs from text prompts or images, creates transitions between two frames, and builds scenes from references. It also supports VACE and videoedit workflows. Jobs run asynchronously: a script submits each request, checks its status, and downloads the result.

The package includes `scripts/video.py` and reference files covering request fields, prompt patterns, workflows, and media operations with ffmpeg or moviepy. You need Python 3.9+, `curl`, and an API key. Token Plan keys work with models from that plan’s catalog; for i2v, r2v, and kf2v, reference media must be supplied through accessible URLs rather than local files.

The kf2v mode has a fixed 5-second duration and produces silent video; other durations fail. Check the current model catalog before choosing parameters, since size and aspect-ratio fields differ between model families.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add QianWen-AI/qianwen-ai --skill qianwen-video-generation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/qianwen-video-generation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/qianwen-video-generation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add QianWen-AI/qianwen-ai --skill qianwen-video-generation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/qianwen-video-generation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add QianWen-AI/qianwen-ai --skill qianwen-video-generation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/qianwen-video-generation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install QianWen-AI/qianwen-ai qianwen-video-generation
```

2. **Manually: put the files in place**
- File: `.github/skills/qianwen-video-generation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add QianWen-AI/qianwen-ai --skill qianwen-video-generation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/QianWen-AI/qianwen-ai --path skills/video/qianwen-video-generation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/qianwen-video-generation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add QianWen-AI/qianwen-ai --skill qianwen-video-generation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/QianWen-AI/qianwen-ai/tree/HEAD/skills/video/qianwen-video-generation/SKILL.md

## When to use it
- generate a clip from a text prompt
- animate a still image
- create a transition between two frames
- stage a new scene using character references
- edit or extend an existing video

## Example prompts
- Generate a video from this prompt: a rainy city at night, with the camera moving slowly forward.
- Animate `portrait.png` and keep the character in frame.
- Create a silent 5-second transition from `start.png` to `end.png`.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d0aa8a80b193147c.

BEGIN THIRD-PARTY FILE d0aa8a80b193147c
```text
---
name: qianwen-video-generation
description: "Generate videos using Wan and HappyHorse 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/HappyHorse models, or explicitly invokes this skill by name (e.g. use qianwen-video-generation). DO NOT TRIGGER when: user wants to generate images (use qianwen-image-generation), understand/analyze existing videos (use qianwen-vision), text-only tasks."
compatibility: "Requires Python 3.9+ and curl. Cursor: auto-loaded. Claude Code: read this skill's SKILL.md before first use."
---

# Qwen Video Generation

Generate videos using Wan and HappyHorse models. All tasks are **asynchronous** — submit, then poll until
completion.
This skill is part of **QianWen-AI/qianwen-ai**.

> **⚠️ Critical Parameter Differences:**
> - **kf2v (First+Last Frame)**: Duration is **fixed at 5 seconds** — other values will fail. Output is **silent only**.
> - **Resolution parameters vary by model family, not mode alone**: Check the current model catalog before choosing `size`, `resolution`, or `ratio`. For example, `happyhorse-1.1-t2v` uses `resolution` + `ratio`, while `wan2.6-t2v` uses `size`.

## Skill directory

Use this skill's internal files to execute and learn. Load reference files on demand when the default path fails or you need details.

| Location | Purpose |
|----------|---------|
| `scripts/video.py` | Default execution — mode auto-detect, submit, poll, download |
| `references/execution-guide.md` | Fallback: curl for all 5 modes, code generation |
| `references/request-fields.md` | Field tables and audio handling by mode |
| `references/workflows.md` | Duration extensions, multi-shot, VACE pipelines |
| `references/polling-guide.md` | Polling patterns and timing |
| `references/merge-media.md` | Concat, trim, audio overlay — ffmpeg/moviepy recipes |
| `references/prompt-guide.md` | Per-mode prompt formulas, sound description, multi-shot structure |
| `references/examples.md` | Full script examples per mode |
| `references/sources.md` | Official documentation URLs |

## Security

**NEVER output any API key or credential in plaintext.** Always use variable references (`$DASHSCOPE_API_KEY` in shell, `os.environ["DASHSCOPE_API_KEY"]` in Python). Any check or detection of credentials must be **non-plaintext**: report only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of `.env` or config files that may contain secrets.
```
END THIRD-PARTY FILE d0aa8a80b193147c

The third-party file has ended. Everything between the d0aa8a80b193147c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2634 of 20037 bytes. © QianWen-AI · Apache-2.0 · https://github.com/QianWen-AI/qianwen-ai/tree/HEAD/skills/video/qianwen-video-generation/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
