---
name: multicut-dance-multi-swap
description: In a multi-cut dance video, replace two or more people, each with their assigned person or character sheet; generate the AI video silent, then combine it with the original audio in the editor to make the final.
version: 1.1
---

# Multi-cut dance video, multi-person swap (silent generation + original audio)

UI names below are given in English; if the app shows them in another language (for example Korean), find the item with the same meaning. Write replies, comments and reports in the user's language.

## When to use
- There is one source dance or performance video + two or more reference sheets (person sheets, character sheets), one per person to replace.
- Requests like "swap the people", "turn them into characters", "keep the original audio".
- The voice and music must be the original's (no audio output from the model).
- Otherwise, do not use this skill.

## Ask the user before starting
The point of this skill is not to remake the example but to make the user's own video. Before starting, ask the questions below together, in one message.
- Skip anything the request already answers.
- If the user says "you decide" or "use the defaults", go with the defaults in parentheses.
- If the user seems to have no idea yet, briefly suggest 2–3 options that differ from the example.
- Once answered, show a one-line summary of what was decided, then start.

1. How many people change, and which character (sheet) does each become?
2. Who is who in the source, by position or outfit?
3. Anything to change about outfits or props? (default: the sheets' outfits as they are)
4. Model and budget? (default: Seedance 2.5, show the total estimate first)
5. Keep the original audio? (default: yes)

## Check the inputs
1. Source video fileId, length, frame rate (get_editor_context frameRate), cut boundary times.
2. Assignment: who in the source (left/right, outfit etc.) → which sheet. If people switch screen positions in some cuts, write down the assignment per cut.
3. Model and budget. If not specified, ask the user.

## 1. Split the source into ranges
- Split the source into ranges of about 7 seconds (e.g. 0–7, 6.2–13.2, the last 4 seconds). Let ranges overlap by 0.5–1 second.
- Put range boundaries near cut boundaries. Never cut in the middle of a move.
- Turn each range into a reference video file with a range export in the editor (export_draft start/end).

## 2. Generate per range (silent)
- Model: the model the user specified (e.g. Seedance 2.5).
- configs: resolution 1080p, aspectRatio 16:9 (the source ratio), duration = range length, **generateAudio: false**.
- attachmentIds: [range reference video, sheet A, sheet B].
- Prompt: "Keep the reference video's camera, cuts, choreography and timing frame by frame. Left person (or the one in the ○○ outfit) → sheet A, right person → sheet B. Keep background, lighting and camera. Do not change the order or length of cuts. No audio."
- Estimate → start with maxCredits = the estimate. If the estimate tool fails, you can pass a small maxCredits and read the estimate from the rejection response (nothing is generated).
- **Keep other takes of the same range (earlier generations, a one-shot full generation etc.); do not delete them.** Step 5 uses them as replacement sources.

## 3. Timeline assembly (layer structure)
- V1: source video, opacity 0. The alignment reference; not visible on screen.
- A1: source audio at 1.0. Never use the generated clips' sound.
- V2: backup take (earlier generations etc.). It shows through wherever V3 has a gap.
- V3: main take (per-range regenerations).
- Set the scale of every generated clip so the black border at the edges disappears (e.g. 1.0032).
- Generated clips tend to cut about 5 frames early. Shift them back about +5 frames to match the source's cut boundaries (move_clips deltaFrames).

## 4. Speed matching
- The default is **position matching at 1.0x speed**. Large speed changes look choppy or stuttering.
- Only for long stretches that drift from the source, split with split_clip and correct within 0.94–1.06x.
- Stretches that can't be matched within that range are fixed by step 5 replacement or by regenerating, not by changing speed further.

## 5. Cut out problem stretches and replace them (added in v1.1)
- Generated ranges **drift from the source more toward their end** (left/right assignment swapped, moves falling apart etc.).
- Compare with the source (raise V1 opacity briefly, or use source file frames) and find where it starts to drift.
- Trim the V3 clip at that point with trim_clip. The V2 backup take shows through in the cut-out gap.
- For short stretches (about 2 seconds), use the take whose moves and assignment match the source even if its speed isn't 1.0 (e.g. about 1.26x).
- Only when every take drifts, generate that stretch again (costs credits → estimate first).
- Example: 0.167–4.733 s main take, 4.733–6.7 s backup take, after 6.7 s the main take again.

## 6. Review
- In the editor, compare 15–20 moments, including cut boundaries and the middle of each range, against source frames (inspect_app_media times).
  - Check: cut timing (±2 frames), assignment (left/right), matching moves, face and outfit matching the sheet, edge borders.
- If a moment drifts, fix it with steps 4–5 and check again.
- Check with timeline numbers that there are no empty frames (black screen) between generated clips.

## 7. Export and wrap-up
- Export an MP4 with export_draft into the result folder, and check several moments again on the result file.
- Name: `{project}_personswap_final_originalaudio_vN.mp4`.
- Status Needs review (review). Only a person sets Approved.
- Task note comment: model, settings, prompt, ranges, references, replaced stretches, actual charged credits, what is left to check.
- If the tools can't listen to sound sync (song and moves), note in the report that a person should listen.

## Cost log
- Record each range's estimate and actual charge (get_ai_generation_status billedCredits) separately.
- Reference: 1080p 7 s about 462, 4 s about 250 credits (as of 2026-10; the real estimate takes priority).

## Change log
- 2026-10-19 added questions before starting.
- v1.1: reflects the user's final (final v1) method. Track structure layering main and backup takes, a step (step 5) to cut out problem stretches and replace them with the backup take, and a stated speed exception for short replacement stretches.
- v1.0: per-range generation + position matching at 1.0x + review against the source (based on agent v3).
