video-edit
Edit existing video on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Wan 2.7 Edit-Video (general restyle / background swap / packaging swap, identity + motion preservation), Kling 2.6 Pro Motion Control (transfer precise motion from a reference video to a target character), or Lucy Edit Restyle (lightweight identity-stable restyle / outfit swap). Bundles each model's documented prompting patterns so the skill gets sharper edits without burning iterations on the wrong model. Calls `runcomfy run <vendor>/<model>/<endpoint>` through the local RunComfy CLI. Triggers on "video edit", "edit video", "restyle video", "swap video background", "motion control", "outfit swap video", or any explicit ask to transform a video.
NPX Install
npx skill4agent add agentspace-so/runcomfy-agent-skills video-editTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Video Edit — Pro Pack on RunComfy
npx skills add agentspace-so/runcomfy-skills --skill video-edit -gPick the right model for the user's intent
| User intent | Model | Why |
|---|---|---|
| Restyle a talking-head video — preserve face / pose / lip movement | Wan 2.7 Edit-Video | Strong identity + motion preservation; supports up to 1080p |
| Swap product background, keep camera motion | Wan 2.7 Edit-Video | Camera motion preserved; one-direction edit honored |
| Replace packaging design using a reference image | Wan 2.7 Edit-Video + | Reference-conditioned design transfer |
| Apply cinematic color grade / commercial polish | Wan 2.7 Edit-Video | Good at single-direction global look changes |
| Transfer precise motion from a reference video to a target character | Kling 2.6 Pro Motion Control | Designed for motion mapping with identity hold |
| Lip-sync motion of a target character to source video's lip movement | Kling 2.6 Pro Motion Control | Built for tight temporal coherence |
| Lightweight outfit / costume swap with identity preservation | Lucy Edit Restyle | Core strength is localized identity-stable edits |
| Identity-stable restyle ("astronaut in desert", "warm golden-hour lighting") | Lucy Edit Restyle | Specializes in temporal consistency for restyle |
| Default if unspecified | Wan 2.7 Edit-Video | Most versatile, highest resolution |
Prerequisites
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account — .
runcomfy login - CI / containers — set .
RUNCOMFY_TOKEN=<token> - A source video URL — formats and limits depend on the chosen route.
Route 1: Wan 2.7 Edit-Video — default for restyle / background / packaging
wan-ai/wan-2-7/edit-videoSchema
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Lead with preservation. One edit direction per call. |
| string | yes | — | MP4/MOV URL, 2–10s, ≤100MB. |
| string | no | — | URL — use for direct design / appearance transfer only. |
| enum | no | (input) | |
| enum | no | (input) | W:H. Defaults to input. |
| int | no | 0 | |
| enum | no | | |
| int | no | — | Reproducibility. |
Invoke
runcomfy run wan-ai/wan-2-7/edit-video \
--input '{
"prompt": "Preserve the speaker'\''s face, pose, and lip movement; change the background to a modern office with neutral lighting.",
"video": "https://.../speaker.mp4",
"audio_setting": "origin"
}' \
--output-dir <absolute/path>runcomfy run wan-ai/wan-2-7/edit-video \
--input '{
"prompt": "Maintain the original framing and hand movement; replace the packaging design using the reference image.",
"video": "https://.../hand-holding-package.mp4",
"reference_image": "https://.../new-packaging.png",
"audio_setting": "origin"
}' \
--output-dir <absolute/path>Prompting tips
- Preservation goals first: .
"Preserve [face / pose / motion / framing / lip movement]; [then state the change]" - One edit direction per call. Compound edits drift on motion.
- only when justified (packaging swap, costume swap with target visual). Don't pass refs for general restyle.
reference_image - for talking-head where you don't want soundtrack regenerated.
audio_setting: "origin" - Source video constraints: 2–10s, ≤100MB.
Route 2: Kling 2.6 Pro Motion Control — when motion FROM a reference clip is the point
kling/kling-2-6/motion-control-proSchema
| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | Describe target motion / style. |
| string | yes (image orientation) | Reference for character / background consistency. |
| string | yes | Motion reference. 10–30s depending on orientation. |
| bool | no | Preserve audio from reference video. |
| enum | yes | |
Invoke
runcomfy run kling/kling-2-6/motion-control-pro \
--input '{
"prompt": "A young american woman dancing",
"image": "https://.../target-character.jpg",
"video": "https://.../motion-reference-dance.mp4",
"character_orientation": "image",
"keep_original_sound": true
}' \
--output-dir <absolute/path>Prompting tips
- Subject must be > 5% of frame in the image reference for clean identity hold.
- Spatial constraints help: .
"character on left side, background motion right" - Simplify if results drift between iterations — drop adjectives, keep core motion description.
- caps output at 10s;
character_orientation: "image"allows 30s."video"
Route 3: Lucy Edit Restyle — lightweight identity-stable restyle / outfit swap
decart/lucy-edit/restyleSchema
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Natural-language edit instruction. |
| string | yes | — | MP4/MOV/WEBM/GIF. |
| enum | no | | |
Invoke
runcomfy run decart/lucy-edit/restyle \
--input '{
"prompt": "Change outfit to professional business attire; preserve face and motion.",
"video_url": "https://.../subject-walking.mp4"
}' \
--output-dir <absolute/path>runcomfy run decart/lucy-edit/restyle \
--input '{
"prompt": "Make lighting warm and golden hour; preserve face, pose, and motion.",
"video_url": "https://.../subject-portrait.mp4"
}' \
--output-dir <absolute/path>Prompting tips
- Localized change phrasing wins. "Outfit", "lighting", "background" — pick one bucket.
- Preserve identity goals — is enough; don't over-specify.
"preserve face and motion" - Avoid total replacement ("astronaut in space" works; "swap subject for a different person" doesn't). Lucy is built for localized style mods, not full character swap.
- No aspect ratio control — output matches input. Cropping happens server-side if you don't pre-match.
Limitations
- Each route inherits its model's limits. Wan 2.7 Edit: 2–10s, 1080p ceiling. Kling: 10s (image orientation) or 30s (video orientation). Lucy: 720p ceiling, no aspect control.
- No multi-route blending. This skill picks one model per call.
- Brand-specific overrides — if the user named a specific model, route to the corresponding brand skill () for fuller treatment.
wan-2-7
Exit codes
| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
How it works
runcomfy run <model_id>.runcomfy.net.runcomfy.com--output-dirCtrl-CSecurity & Privacy
- Token storage: writes the API token to
runcomfy loginwith mode 0600 (owner-only read/write). Set~/.config/runcomfy/token.jsonenv var to bypass the file entirely in CI / containers.RUNCOMFY_TOKEN - Input boundary: the user prompt is passed as a JSON string to the CLI via . The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content.
--input - Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
- Outbound endpoints: only (request submission) and
model-api.runcomfy.net/*.runcomfy.net(download whitelist for generated outputs). No telemetry, no callbacks.*.runcomfy.com - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.