Overview
Extract motion trajectories from a reference video, transfer them onto the target person/character image provided by the user, and generate a video of that character performing the same actions. The core tool is meitu video-motion-transfer(asynchronous task).
Before execution, the user should be clearly informed that: this Skill will read Meitu credentials, invoke the local meitu CLI, send the user-provided person image, reference action video, and related prompts to the Meitu OpenAPI for processing, and write the results to ./output/ or $VISUAL/output/meitu-video-dance/. When portrait and action materials are involved, confirm that you have authorization to process the people in the materials.
Dependencies
- meitu-cli (>=2.0.6):
npm install -g meitu-cli@latest- Preferred environment variables:
MEITU_OPENAPI_ACCESS_KEY/MEITU_OPENAPI_SECRET_KEY - or preset credential file:
~/.meitu/credentials.json - If manual initialization of local credentials is needed, you may explicitly run
meitu config set-ak --value "..."+meitu config set-sk --value "..."(will write to a local file) - Verify:
meitu auth verify --json
- Preferred environment variables:
Path aliases: Below,
$VISUAL={OPENCLAW_HOME}/workspace/visual/
Core Workflow
Preflight → [Context] → Execute → Refine → Deliver → [Record]
Preflight
meitu --version→ if not installed, promptnpm install -g meitu-cli@latestmeitu auth verify --json→ if credentials are invalid, guide configuration- Detect mode: cwd has
openclaw.yaml→ project mode; else → one-off Check$VISUALdirectory → determine capabilities can_record = cwd has openclaw.yaml AND$VISUALexists (either missing means false) - output_dir resolution (MUST be completed within Preflight):
Resolve output_dir: openclaw.yaml →
./output/| else →$VISUAL/output/meitu-video-dance/mkdir -p {output_dir}
Context (executed in project mode, skipped in one-off mode)
mode = one-off → skip this step, go directly to Execute.
Read step by step:
- Read DESIGN.md → extract Context References (quality, preferences, brand_refs)
- Try to read global assets: quality.yaml → global.md → scenes/{type}.md (scene file source: read the type from openclaw.yaml's
project.types(array takes priority) orproject.type) - If unreadable, use inline fallback values (all skip if missing) → quality forbidden list filters prompt elements, preferences enhance the creative direction
Execute
This is the core of the skill. The quality of action transfer is 80% determined by the input materials, 15% by the prompt, and 5% by the parameters.
1. Collect and validate inputs
The user must provide two inputs:
| Input | Description | Accepted formats |
|---|---|---|
| Target person image (image_url) | The character to "bring to life" | URL or local path (.jpg/.jpeg/.png) |
| Reference action video (video_url) | Action source | URL or local path (.mp4/.mov) |
Input quality precheck — proactively assess before calling the API to avoid wasting quota:
Check the target image for:
- Full body visible (at least down to the knees; dance types must include the feet) → if not satisfied, remind the user to change the image
- The person's outline is clear and not blended with the background → if the background is cluttered, suggest first using
meitu image-cutoutto cut out the subject and replace it with a clean background - Hands visible and not covering the face → hands covering the face will cause severe artifacts
- Front-facing or slightly angled (not pure side/back) → extreme angles produce poor generation quality
- Resolution short side ≥ 300px → if too small, it is recommended to first use
meitu image-superres-enhanceto improve clarity - Tight clothing is better than loose clothing → loose clothing (long skirts, coats) blurs joints and causes distortion
Check the reference video:
- Duration of 3-10 seconds is optimal → if too long, it is recommended to cut the core segment
- Single-person shot → multi-person shots cause motion confusion
- Stable camera (fixed position) → handheld shake/rapid zoom introduces noise
- Full body within the frame → the person going out of frame causes motion loss
- Moderate motion speed → extremely fast motion (such as breaking) easily produces limb ghosting
- Simple background → complex backgrounds interfere with pose estimation
Detailed evaluation criteria: When a more detailed input evaluation is needed, read references/input-quality-guide.md
If the input quality has serious issues (such as a half-body image + a full-body dance video),directly inform the user of the problem and suggest replacing the material, do not force the API call.
2. Build the Prompt
Key principle: the prompt describes the character's appearance and scene, not the motion. The motion comes from the reference video; writing motion descriptions in the prompt will conflict with the video signal.
Prompt construction strategy:
{角色外观描述}, {场景/背景描述}, {画面质量修饰}
Character appearance — extracted from the target image or supplemented by the user:
- Gender, age range, body type
- Clothing description (color, style, material)
- Hairstyle, hair color
- Distinctive features (accessories, tattoos, etc.)
Scene/background — by default consistent with the target image; the user may specify:
- "white studio background" (clean, all-purpose background)
- "city street at sunset" (scenario-based)
- Keep it concise, no more than one sentence
Image quality — fixed suffix:
high quality, detailed, natural proportions, realistic hands
Prompt example:
| Scene | Prompt |
|---|---|
| Girl dancing | a young woman in a white crop top and jeans, long black hair, white studio background, high quality, detailed, natural proportions |
| Anime character | anime character with blue hair and school uniform, rooftop scene, vibrant colors, high quality, consistent style |
| Business person | a man in a dark blue suit, short hair, modern office background, high quality, professional lighting |
Taboos:
- Do not describe specific motions ("hip-hop dance", "waving hands") → the motion is determined by the video
- Do not use platform-specific syntax (
--no、(keyword:1.5)、<lora:xxx>) - Do not use negative descriptions → express positively ("clean background" rather than "no clutter")
3. Call meitu-cli
meitu video-motion-transfer \
--skill_name skill_meitu-video-dance \
--image_list "{image_url}" \
--reference_video_list "{video_url}" \
--prompt "{composed_prompt}" \
--download-dir "{output_dir}"
Asynchronous task description:
- This command is an asynchronous task; the CLI will automatically poll until completion (internally calling
meitu task wait) - Generation time is usually 30s-120s, depending on video duration and server load
- Return JSON:
ok: true→ the result is indownloaded_files[0].saved_path(because--download-dir);ok: falsewas used → first check the CLI raw fieldcode、hint、error_name、action_url, then classify it asmeitu-toolsaccording toerror_type
4. Quality judgment and error degradation
On success, check the generation quality:
- Character identity consistency — whether the face, clothing, and hairstyle match the original image
- Motion completeness — whether the motion in the reference video is fully reproduced
- Limb naturalness — whether there are extra limbs, distorted joints, or abnormal fingers
- Temporal coherence — whether it is smooth between frames, and whether there is flickering/jumping
Error degradation strategy on failure:
| Level | Action | Description |
|---|---|---|
| L1 | Simplify prompt | Remove decorative modifiers, keep the core appearance + quality suffix |
| L2 | Check input match | Confirm whether the body type in the image matches the body type of the person in the video; if not, suggest replacing the image |
| L3 | Shorten the reference video | Clip the 3-5 second segment with the clearest motion and retry |
| L4 | Simplify the target image | Use meitu image-cutout to remove the complex background and retry |
| L5 | Stop and report an error | 2 consecutive failures → report code and hint, do not retry |
Common error code handling:
- Original error classified by
meitu-toolsasORDER_REQUIRED→ insufficient balance, inform the user to top up, provide action_url - Original error classified by
meitu-toolsasCREDENTIALS_MISSING→ AK/SK not configured, prioritize prompting to use environment variables or preset~/.meitu/credentials.json; only when the user explicitly requests writing to local credentials, then promptmeitu config set-ak/set-sk - Timeout → video too long or server busy, suggest shortening the video or retrying later
Refine
Present the result: Show the generated video to the user, explaining:
- "The motion comes from the reference video you provided"
- Point out possible quality issues (such as hand details, facial consistency)
- If there are obvious flaws, proactively propose fix suggestions
Feedback classification and corresponding adjustments:
| Feedback type | Adjustment method |
|---|---|
| "Motion is wrong/doesn't look like it" | Check the reference video quality, suggest switching to a clearer video segment |
| "The person doesn't look like the original image" | Enhance the appearance description in the prompt, add more details |
| "Background is wrong" | Adjust the scene description in the prompt |
| "Image quality is poor" | Check the input image resolution, upscale first if necessary |
| "Hands/face have problems" | This is a common limitation of current technology, suggest fixing with post-processing tools; or try reference images from different angles |
| "Want to change the motion" | The user needs to provide a new reference video |
Iteration pace: Suggest a maximum of 3 rounds. After that, proactively suggest:
- Change the input material (change the image or change the video)
- Break down the requirements (e.g., first generate a satisfactory character image, then do motion transfer)
- Lower expectations and explain the current technical limitations
Deliver
Directly use the output_dir parsed by Preflight.
mv {file} {output_dir}/{date}_{name}.mp4
Naming convention: {date}_{描述性名称}.mp4, e.g., 2026-03-23_girl-hip-hop-dance.mp4
Record (project mode MUST / one-off mode skip)
can_record = false → skip. In one-off mode, feedback is only valid for the current conversation.
can_record definition:
can_record = cwd 有 openclaw.yaml AND $VISUAL 存在(if either is missing, it is false)
User approved style →
read $VISUAL/memory/observations/observations.yaml → scan similar key → merge or append → write back.
len(projects) >= 2 → propose promotion (non-blocking).
Propose promotion (non-blocking: mention at the end of the reply, do not interrupt the main flow) → confirmed → write target + delete observation entry
User rejected ("don't want XX") → has openclaw.yaml → ask scope → project: DESIGN.md Constraints / universal: quality.yaml no openclaw.yaml → current task only
No feedback → skip entirely.
Output
| Property | Value |
|---|---|
| Format | MP4 video |
| Naming | {date}_{effect-name}.mp4 |
| Duration | Consistent with the reference video (usually 3-10 seconds) |
| Path | Determined by the Deliver step |