Spiral gives your agent every tool with one account. Browse the tools →

How to Add the Media Editing Skill to Your AI Agent

Video skillUse when cropping, resizing to another aspect ratio, trimming, extracting audio, joining clips, putting an audio track on a video, making a GIF or a rapid-cut montage (load it before the edit), and whenever another Skill says to run one of these edits. FFmpeg recipes for editing existing media with the FFmpeg tool — crop an image or video (crop-window and aspect-ratio math, pad, or outpaint when a ratio change would cut content), trim a clip, extract a video's audio, merge (concatenate) video clips with cuts, fades or dissolves, merge audio with video (replace, mute and narrate, add music at a set volume, or mix dialogue with ducked music), turn a video into a looping GIF, and cut fast montages (chaotic random-segment stitches, flash montages interleaving several clips). Gives the exact command to send for each edit.

How to add Media Editing to your agent

Pick the way that suits you. Each takes about two minutes.

Save SKILL.md into your agent's skills

  1. Download the skill

    Claude Code, and other agents that read Agent Skills, load it from this folder when they start.

    mkdir -p ~/.claude/skills/media-editing
    curl -fsSL https://spiral.ai/skills/media-editing/SKILL.md -o ~/.claude/skills/media-editing/SKILL.md
    curl -fsSL https://spiral.ai/skills/media-editing/montage.md -o ~/.claude/skills/media-editing/montage.md
  2. Connect Spiral

    The skill runs its tools through Spiral. Send your agent this message once to set it up.

    set up https://spiral.ai/SKILL.md

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init
  2. Read the skill

    Built-in skills are on for every organization: the CLI prints this one with all its files.

    spiral agent-skills get media-editing --json

Read it from the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Fetch the skill

    The answer holds SKILL.md and every other file of the skill, in path order.

    curl https://api.spiral.ai/v1/skills/media-editing \
      -H "Authorization: Bearer $SPIRAL_API_KEY"

Then ask your agent for the task: it loads Media Editing when a request matches the skill's description.

When to use (description)

Use when cropping, resizing to another aspect ratio, trimming, extracting audio, joining clips, putting an audio track on a video, making a GIF or a rapid-cut montage (load it before the edit), and whenever another Skill says to run one of these edits. FFmpeg recipes for editing existing media with the FFmpeg tool — crop an image or video (crop-window and aspect-ratio math, pad, or outpaint when a ratio change would cut content), trim a clip, extract a video's audio, merge (concatenate) video clips with cuts, fades or dissolves, merge audio with video (replace, mute and narrate, add music at a set volume, or mix dialogue with ducked music), turn a video into a looping GIF, and cut fast montages (chaotic random-segment stitches, flash montages interleaving several clips). Gives the exact command to send for each edit.

Instructions

Media Editing

Edits of existing media (crop, trim, extract audio, merge clips, merge audio with video) run as one FFmpeg command on FFmpeg Media Editor. Read its input schema, estimate the cost, then run it. Never drop part of the request to fit a tool that cannot do it.

How the command is written
  • Write it as on a command line: ffmpeg -i <input> … <output name>. The leading ffmpeg is optional.
  • Inputs: put each https media URL after -i, or list the files in inputs and name them {in0}, {in1}, … in the command. Use the exact URLs you were given; never shorten or rebuild one.
  • Input options (-ss, -t, -loop 1, -stream_loop, -framerate) go before their -i.
  • End with the output file's name. Its extension picks the format: mp4, mov, webm, gif, mp3, wav, m4a, aac, flac, ogg, png, jpg, webp. One output file per run.
  • Quote filter graphs as in a shell. Arguments that read other files or URLs (-f, movie=, textfile=) are refused; give every input with -i instead.
  • max_seconds caps how long FFmpeg may run (the hold); the charge is the seconds it ran. Raise it from the default only for long re-encodes.
  • The run returns one output file URL. Use that URL in the next step; never guess one.

The recipes below use {in0}, {in1} for the inputs; replace them with https URLs after -i when you do not list inputs.

Crop

A crop only cuts pixels away; to extend the frame instead, see "Crop, pad or outpaint" below. A crop always needs a window: a crop with no window returns the image unchanged.

The window is crop=W:H:X:Y in pixels of the input, or as expressions of the input size: iw and ih are its width and height. Without X:Y, FFmpeg centers the window.

  • An exact pixel crop: crop=10:10:0:0 (width, height, then the top-left corner). For "crop to 10 by 10 pixels" crop to those pixels; do not convert them to tiny percentages.
  • A percentage window (x_percent, y_percent = its top-left corner, width_percent, height_percent = its size, not its right or bottom edge, all in % of the image): crop=iw*<width_percent/100>:ih*<height_percent/100>:iw*<x_percent/100>:ih*<y_percent/100>.
Cropping to an aspect ratio

The largest centered crop of a target ratio T (width ÷ height) needs no pixel sizes: crop='min(iw,ih*T)':'min(ih,iw/T)', for example 16:9:

ffmpeg -i {in0} -vf "crop='min(iw,ih*16/9)':'min(ih,iw*9/16)'" crop.png

For a video output, round each side down to an even number, which H.264 needs: crop='trunc(min(iw,ih*9/16)/2)*2':'trunc(min(ih,iw*16/9)/2)*2'.

When you need the window as percentages (to tell the user what is cut, or for a crop tool that takes percentages), let S be the source ratio and T the target ratio, both width ÷ height. S is known when you chose the image's size; for any other image read its width and height first (from the tool result that made it, or by probing the file).

  • T ≥ S (the target is wider): keep the full width and trim the height: width_percent = 100, height_percent = (S / T) × 100, x_percent = 0, y_percent = (100 − height_percent) ÷ 2.
  • T < S (the target is taller): keep the full height and trim the width: height_percent = 100, width_percent = (T / S) × 100, y_percent = 0, x_percent = (100 − width_percent) ÷ 2.

Clamp every percentage to 0–100. Square → 16:9 (S = 1, T ≈ 1.778): height_percent = 56.25, y_percent = 21.875. 16:9 → 9:16 (S ≈ 1.778, T = 0.5625): width_percent ≈ 31.6, x_percent ≈ 34.2:

ffmpeg -i {in0} -vf "crop=iw*0.316:ih*1:iw*0.342:ih*0" crop.png

The target ratio is the user's explicit ratio, or the destination platform's. The crop is centered and blind to content: when the subject is off-center, a centered crop may clip it, so say so rather than assume.

Crop, pad or outpaint: flag content loss first
RouteWhat happensTool
CropCuts the edges away; content outside the window is lost.FFmpeg Media Editor, as above
PadExtends the canvas with a solid border; every pixel is kept.FFmpeg Media Editor, pad below
OutpaintExtends the canvas and fills the new area with generated scenery.The image-edit model from model-recommendations, with the original attached and the target ratio

When the target ratio cuts content and the user has not said losing the edges is fine, do not crop straight away: say what a crop would remove and ask the user to choose one of the three routes. Naming the crop tool for a "resize" is not consent to lose content. Crop directly only when the user asked to cut something away, chose crop, or the crop removes nothing. The same applies to resizing to exact pixel dimensions of another ratio (for example a square size for a portrait photo).

Pad to ratio T, centered, on the smallest canvas of that ratio that holds the source:

ffmpeg -i {in0} -vf "pad='max(iw,ih*16/9)':'max(ih,iw*9/16)':(ow-iw)/2:(oh-ih)/2:color=white" padded.png

For a transparent border on PNG output, use format=rgba,pad=…:color=black@0.

Other crop notes
  • A video crop is the same filter with a video output: ffmpeg -i {in0} -vf "crop=ih*9/16:ih" -c:a copy vertical.mp4 (center 9:16 from a landscape clip, audio kept).
  • Keep the output format of the source unless the user asked for another (png for a PNG, jpg for a JPEG).
Trim
ffmpeg -ss 5 -i {in0} -t 10 -c copy clip.mp4

-ss is the start and -t the length, in seconds. -c copy cuts at keyframes; when the cut must be frame-exact, re-encode instead: -c:v libx264 -preset veryfast -crf 20 -c:a aac.

Extract audio
ffmpeg -i {in0} -vn -c:a libmp3lame -q:a 2 audio.mp3

Use audio.wav (-c:a pcm_s16le) when the next tool needs uncompressed audio. When the source has no audio track the command fails: say so and ask for another source.

Merge video clips

Clips must share size, frame rate and audio layout before they join. Normalize each input, then concatenate. For two clips, landscape 1920x1080 at 30 fps:

ffmpeg -i {in0} -i {in1} -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30[v0];[1:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30[v1];[0:a]aresample=44100[a0];[1:a]aresample=44100[a1];[v0][a0][v1][a1]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264 -preset veryfast -crf 20 -c:a aac merged.mp4
  • More clips: one scale…[vN] and aresample…[aN] chain per input, then concat=n=<count>. As many inputs per run as its schema allows (inputs maxItems); merge longer lists in batches, then merge the batches.
  • Use the size of the planned output (1080x1920 for vertical). Padding keeps a mismatched clip whole, with bars; say so to the user rather than letting a clip look wrong.
  • A clip with no audio track breaks concat with a=1. Give it silence inside the graph (anullsrc=r=44100:cl=stereo,atrim=0:<clip seconds>[aN] in place of its aresample chain), or join video only (a=0, no [aN] labels) and add the soundtrack after.
  • Fade or dissolve between clips: join two normalized clips with xfade and their audio with acrossfade; the offset is the first clip's length minus the transition:
ffmpeg -i {in0} -i {in1} -filter_complex "[0:v][1:v]xfade=transition=fade:duration=1:offset=4[v];[0:a][1:a]acrossfade=d=1[a]" -map "[v]" -map "[a]" -c:v libx264 -preset veryfast -crf 20 -c:a aac merged.mp4

Use transition=dissolve for a dissolve. Chain one xfade per join for more clips, adding each clip's length minus the transitions so far to the next offset.

A cut after speech goes after the line ends: read its end from word timings of the voice track, then start the next shot, including any dissolve, about 0.3–0.5 s later. A transition that starts before the measured end shows the next scene while the line is still playing.

Merge audio with video

Replace the audio (also "mute the source and add narration"); stops at the shorter input:

ffmpeg -i {in0} -i {in1} -map 0:v:0 -map 1:a:0 -c:v copy -c:a aac -b:a 128k -shortest -movflags +faststart out.mp4

Add music at a set volume (volume= from 0.0 to 2.0):

ffmpeg -i {in0} -i {in1} -map 0:v:0 -map 1:a:0 -filter:a "volume=0.3" -c:v copy -c:a aac -b:a 128k -shortest -movflags +faststart out.mp4

Keep the dialogue and mix music under it:

ffmpeg -i {in0} -i {in1} -filter_complex "[1:a]volume=0.2[bg];[0:a][bg]amix=inputs=2:duration=first[aout]" -map 0:v:0 -map "[aout]" -c:v copy -c:a aac -b:a 128k -movflags +faststart out.mp4

When -c:v copy fails (an unusual codec or container), re-encode the video: -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p.

Video to GIF

GIFs hold 256 colors per frame, so always build a palette from the clip and apply it with dithering (palettegen + paletteuse); a direct conversion looks washed out and banded. Default to 480 px wide at 15 fps, looping forever:

ffmpeg -i {in0} -vf "fps=15,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256:stats_mode=diff[p];[s1][p]paletteuse=dither=bayer:bayer_scale=5" out.gif
  • A GIF loops forever by default; FFmpeg Media Editor refuses -loop as an output option, so leave it out (an input -loop 1 before -i still loops a still image).
  • Size: 480 px at 15 fps for social or messaging; 720 px at 24 fps for high quality; 320 px at 10 fps for a small, fast file; omit scale to keep the source size (the file can be very large). Ask only when the user gave no width, frame rate, trim or loop preference that matters.
  • Trim first: -ss <start> -t <seconds> before -i. GIFs grow fast: for a clip longer than about 5 seconds, keep the best 2–5 seconds or lower the width (480 → 320) or frame rate (15 → 10).
  • Pixel art: fps=10,scale=256:256:flags=neighbor (never lanczos, which blurs hard edges), and keep transparency with palettegen=…:reserve_transparent=on and paletteuse=dither=bayer:alpha_threshold=128.
  • stats_mode: diff (default) favors the moving areas; full suits static or slow content; single builds the palette from one frame. Dither: bayer:bayer_scale=5 (default, 0–5), floyd_steinberg for photographs, sierra2 for gradients and skies, none for flat color.
  • A GIF has no audio: the track is dropped. The source must be a video; animate a still image with a video model first.
  • After delivery, offer tweaks: wider, narrower, faster, slower, trimmed.
Montages and rapid-cut edits

Chaotic stitches (short random-feeling segments from several clips) and flash montages (every clip sliced into equal time chunks and interleaved round-robin): read montage.md in this Skill's folder.

When to use something else
  • Captions, titles, motion graphics or a timed multi-scene edit: render a composition (the hyperframes-video Skill).
  • An edit that needs a model (outpainting, object removal, restyling): the image- or video-edit models in model-recommendations.

Files · 1

montage.md
# Montages and Rapid-Cut Edits

Two FFmpeg recipes that cut several clips into short pieces and reassemble them, each as one `spiral/ffmpeg` run (the **media-editing** Skill: read its input schema, estimate the cost, run it). List the clips in `inputs` and name them `{in0}`, `{in1}`, …; one run returns one output file, so a follow-up step (a loop, music) is a second run on that output's URL. As many clips per run as the schema's `inputs` allows. Both recipes re-encode and filter many segments: raise `max_seconds` above its default for long edits.

## The stream-label rule (both recipes)

A filter-graph label is consumed when used. A clip used in N segments needs N copies: `split=N` for its video and `asplit=N` for its audio, then `trim` (`atrim`) each copy. **Every split output must be used**: `split=5` with four outputs used fails with "unconnected output". Count each clip's uses and set `split=`/`asplit=` to exactly that count.

```
[0:v]split=2[c1a][c1b];
[c1a]trim=0:1,setpts=PTS-STARTPTS[s1];
[c1b]trim=2:3,setpts=PTS-STARTPTS[s2];
```

- `setpts=PTS-STARTPTS` (`asetpts` for audio) after every trim resets the segment to start at 0; without it `concat` leaves gaps or fails.
- Normalize every clip once, before splitting: `scale=W:H:force_original_aspect_ratio=increase,crop=W:H,fps=30,format=yuv420p,setsar=1` fills the frame with no bars (`decrease` letterboxes). Mismatched size or frame rate makes concat jump.
- An MP4 with cover art carries a hidden picture stream: take `[N:a:0]` rather than `[N:a]` for its audio.

| Aspect | `W:H`    | Use for               |
| ------ | -------- | --------------------- |
| 9:16   | 720:1280 | TikTok, Reels, Shorts |
| 16:9   | 1280:720 | YouTube, landscape    |
| 1:1    | 720:720  | Square                |
| 4:5    | 864:1080 | Instagram portrait    |
| 3:4    | 810:1080 | Portrait alternative  |

## Chaotic stitch

Slice 3–4 source clips (5–10 s each) into short pieces, scramble them into a random-feeling order, and join them with each segment's own audio.

**Plan before writing FFmpeg.** Write the segment map (#, source clip, trim start, trim end, length) and each clip's usage count, which is its `split=` and `asplit=` value. Order:

- Open with a short punchy cut (0.5 s or less) from a high-energy moment; put impactful moments at the start and near the end.
- Never put two consecutive segments from the same clip.
- Vary lengths: 60–70 % of cuts under 1 s, about 30 % at 1–2 s, an occasional 2–3 s cut for contrast; never over 3 s.
- Take moments from early, middle and late in each clip, not only its first seconds.

| Length    | Character                     |
| --------- | ----------------------------- |
| 0.3–0.6 s | Flash cut: impact, peaks      |
| 0.8–1.2 s | Punchy: the main content cuts |
| 1.5–2 s   | Standard: lets action breathe |
| 2–3 s     | Long: contrast, use sparingly |

**The command** has four parts: normalize and split each clip; trim each video copy; mirror every trim **exactly** on the audio copy of the same clip (video `[c2a]trim=0:0.5` ↔ audio `[ab1]atrim=0:0.5`); then concatenate video and audio separately, which is more reliable than interleaved pairs. Two clips, five segments, vertical:

```
ffmpeg -i {in0} -i {in1} -filter_complex "[0:v]scale=720:1280:force_original_aspect_ratio=increase,crop=720:1280,fps=30,format=yuv420p,setsar=1,split=2[c1a][c1b];[1:v]scale=720:1280:force_original_aspect_ratio=increase,crop=720:1280,fps=30,format=yuv420p,setsar=1,split=3[c2a][c2b][c2c];[0:a]aresample=48000,asplit=2[aa1][aa2];[1:a:0]aresample=48000,asplit=3[ab1][ab2][ab3];[c2a]trim=0:0.5,setpts=PTS-STARTPTS[s1];[c1a]trim=1:2,setpts=PTS-STARTPTS[s2];[c2b]trim=3:3.8,setpts=PTS-STARTPTS[s3];[c1b]trim=4:4.6,setpts=PTS-STARTPTS[s4];[c2c]trim=6:7.5,setpts=PTS-STARTPTS[s5];[ab1]atrim=0:0.5,asetpts=PTS-STARTPTS[as1];[aa1]atrim=1:2,asetpts=PTS-STARTPTS[as2];[ab2]atrim=3:3.8,asetpts=PTS-STARTPTS[as3];[aa2]atrim=4:4.6,asetpts=PTS-STARTPTS[as4];[ab3]atrim=6:7.5,asetpts=PTS-STARTPTS[as5];[s1][s2][s3][s4][s5]concat=n=5:v=1:a=0[outv];[as1][as2][as3][as4][as5]concat=n=5:v=0:a=1[outa]" -map "[outv]" -map "[outa]" -c:v libx264 -preset veryfast -c:a aac chaotic-edit.mp4
```

- Clips with no audio: drop every `asplit`/`atrim`/audio concat part, concat video only (`a=0`), and add music after.
- **Seamless loop:** a second run on the edit's URL appends its own first 0.5 s; every cut is already hard, so the seam reads as one more cut:

```
ffmpeg -i {in0} -filter_complex "[0:v]split=2[v1][v2];[0:a]asplit=2[a1][a2];[v2]trim=0:0.5,setpts=PTS-STARTPTS[vloop];[a2]atrim=0:0.5,asetpts=PTS-STARTPTS[aloop];[v1][vloop]concat=n=2:v=1:a=0[outv];[a1][aloop]concat=n=2:v=0:a=1[outa]" -map "[outv]" -map "[outa]" -c:v libx264 -preset veryfast -c:a aac looped-edit.mp4
```

- **Music:** a second run mixing the native audio low (about 30 %, for impact sounds) under the music (about 80 %): `[0:a]volume=0.3[native];[1:a]aresample=48000,volume=0.8,apad[music];[native][music]amix=inputs=2:duration=first[aout]`, mapping `0:v` and `[aout]`, `-c:v copy -c:a aac`.

| Error                                           | Fix                                                |
| ----------------------------------------------- | -------------------------------------------------- |
| `Invalid stream specifier`                      | A label was reused: `split` it first               |
| `Filter split/asplit has an unconnected output` | Match `split=`/`asplit=` to the exact usage count  |
| Audio and video out of sync                     | Copy every `trim=A:B` exactly into its `atrim=A:B` |
| Attached picture stream error                   | Use `[N:a:0]` for that input's audio               |
| Concat jumps or glitches                        | Normalize size, fps and `setsar` before splitting  |

## Flash montage

Animate N still images, slice every clip into equal time chunks, and interleave them round-robin by time window, then speed the reel up. Every subject appears in every window. With clips A–D, their first 2 s and 0.25 s chunks, the reel plays A1 B1 C1 D1 A2 B2 C2 D2 … through chunk 8.

1. **Images.** 4–10 is the sweet spot (2 just alternate; 30+ become subliminal flashes). All must share one aspect ratio: crop them to match first (Crop, in the **media-editing** Skill).
2. **Animate every image in parallel** (one run per image, all started at once), each video at its image's aspect ratio. Keep motion subtle — a slow camera push, fabric in the wind, an atmospheric shift; complex action sliced into 0.25 s fragments becomes incoherent ("Subtle cinematic motion, slow camera push in, soft atmospheric shift", not "Person runs across the room and catches a ball"). No model makes 2-second clips: request its shortest duration (from its input schema) and use the first 2 s, or scale the chunk windows to the real length.
3. **Interleave in one run.** Normalize each clip and `split` it into one copy per chunk; trim copy `k` to window `k` (`trim=0:0.25`, `trim=0.25:0.5`, `trim=0.5:0.75` …, each exactly one chunk long); concatenate in round-robin order with `a=0` (there is no audio) and `unsafe=1` (tolerates small timebase differences); then speed it up. Three clips, four 0.25 s chunks, vertical, 2× speed:

```
ffmpeg -i {in0} -i {in1} -i {in2} -filter_complex "[0:v]scale=720:1280:force_original_aspect_ratio=increase,crop=720:1280,fps=30,format=yuv420p,setsar=1,split=4[a1][a2][a3][a4];[1:v]scale=720:1280:force_original_aspect_ratio=increase,crop=720:1280,fps=30,format=yuv420p,setsar=1,split=4[b1][b2][b3][b4];[2:v]scale=720:1280:force_original_aspect_ratio=increase,crop=720:1280,fps=30,format=yuv420p,setsar=1,split=4[c1][c2][c3][c4];[a1]trim=0:0.25,setpts=PTS-STARTPTS[A1];[b1]trim=0:0.25,setpts=PTS-STARTPTS[B1];[c1]trim=0:0.25,setpts=PTS-STARTPTS[C1];[a2]trim=0.25:0.5,setpts=PTS-STARTPTS[A2];[b2]trim=0.25:0.5,setpts=PTS-STARTPTS[B2];[c2]trim=0.25:0.5,setpts=PTS-STARTPTS[C2];[a3]trim=0.5:0.75,setpts=PTS-STARTPTS[A3];[b3]trim=0.5:0.75,setpts=PTS-STARTPTS[B3];[c3]trim=0.5:0.75,setpts=PTS-STARTPTS[C3];[a4]trim=0.75:1,setpts=PTS-STARTPTS[A4];[b4]trim=0.75:1,setpts=PTS-STARTPTS[B4];[c4]trim=0.75:1,setpts=PTS-STARTPTS[C4];[A1][B1][C1][A2][B2][C2][A3][B3][C3][A4][B4][C4]concat=n=12:v=1:a=0:unsafe=1,setpts=0.5*PTS[outv]" -map "[outv]" -c:v libx264 -preset veryfast -movflags +faststart flash-montage.mp4
```

Do not skip the speed-up: `setpts=0.5*PTS` halves the timestamps (2×), which gives the signature look. `spiral/ffmpeg` does not allow `minterpolate`, so the speed-up keeps the source frames. When the reel is long, run the speed-up as its own second run on the interleaved reel.

**Variations to offer after the base result:**

| Chunk  | Effect                                                |
| ------ | ----------------------------------------------------- |
| 0.1 s  | Near-subliminal flashing; warn about flashing content |
| 0.25 s | Default: rapid, each subject recognizable             |
| 0.5 s  | Slower rhythm, more time per subject                  |
| 1.0 s  | Dramatic: subjects linger                             |

With more clips, use larger chunks so each subject stays recognizable. Speed: 1.5× `setpts=0.667*PTS`, 2× `0.5*PTS` (default), 3× `0.333*PTS` (with larger chunks), 4× `0.25*PTS` (0.5 s+ chunks only), each a plain `setpts` speed-up of the source frames (no interpolation filter).

- **Music:** a montage is silent; a strong beat suits it. A second run: `-i {in0} -i {in1} -filter_complex "[1:a]aresample=48000,apad[aout]" -map 0:v -map "[aout]" -c:v copy -c:a aac -shortest out.mp4`.
- **Boomerang loop:** a second run joining the reel with itself reversed: `[0:v]split=2[v1][v2];[v2]reverse[vr];[v1][vr]concat=n=2:v=1:a=0[outv]`.

Capabilities

Used in this skill · 1

  • Use when producing a narrative video about historical figures, fictional stories, day-in-the-life pieces, educational explainers with a protagonist, brand mascot stories, and any narrative video that depends on a consistent main character across scenes. Methodology for producing multi-scene character-driven short films: covers the full 11-phase pipeline — creative brief, style reference, character sheet, scene stills, animation, voiceover, per-clip audio mix, stitching, music with proper fade technique, optional subtitles, and optional Fin card — plus approval gates, parallelization strategy, asset naming, and the prompting principles that hold across video models. Tool and model selection is delegated to model-recommendations.

  • Use whenever the inferred intent is a continuous tracking shot or a long single-take video built from chained clips, including character-following journeys ("the character walks from room to room", "follow the figure across the city"), or an AI transition between two known frames (a first-to-last-frame clip from a start image to an end image, seamless loops from one image, chains of transitions A→B→C). Frame chaining: extract last frame → feed as next input → repeat → stitch. Covers workflow modes (all-at-once vs step-by-step), prompting rules, aspect ratio discipline, last-frame quality control, stitching, character continuity (original reference on every clip through reference-to-video, the handoff frame as an extra reference only, locked character description string, locomotion-through-space rule, the rear-facing danger, corrective stills), the morphing problem and visual bridges, and prompting cheat sheets for style/audio/camera.

  • Use when the user explicitly asks for Gemini Omni, Omni Flash or Google's Omni video model: text-to-video, image-to-video, reference-to-video or editing a short video with Gemini Omni. Covers finding the tools, duration format, edit-video preparation, prompt structure, media role tags, audio behavior, text rendering, timing, and how to prepare source media.

  • Use when a HyperFrames composition needs any motion or animation: atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

Questions about Media Editing

What does the Media Editing skill do?

Use when cropping, resizing to another aspect ratio, trimming, extracting audio, joining clips, putting an audio track on a video, making a GIF or a rapid-cut montage (load it before the edit), and whenever another Skill says to run one of these edits. FFmpeg recipes for editing existing media with the FFmpeg tool — crop an image or video (crop-window and aspect-ratio math, pad, or outpaint when a ratio change would cut content), trim a clip, extract a video's audio, merge (concatenate) video clips with cuts, fades or dissolves, merge audio with video (replace, mute and narrate, add music at a set volume, or mix dialogue with ducked music), turn a video into a looping GIF, and cut fast montages (chaotic random-segment stitches, flash montages interleaving several clips). Gives the exact command to send for each edit.

Which tools does Media Editing use?

It runs FFmpeg Media Editor through Spiral, each at the price on its tool page.

Does the Media Editing skill cost anything?

The skill is free. The tools it runs are billed pay-as-you-go from your Spiral balance at each tool's stated price, with no plan.

How does my agent know when to use Media Editing?

An agent reads each skill's description and loads its instructions when a request matches it.

How do I add Media Editing to Claude Code?

Save its files into ~/.claude/skills/media-editing/ with the commands on this page; Claude Code loads it when it starts.

Can I use Media Editing in other agents?

Yes. Any agent that reads Agent Skills folders loads the same files, and any other agent reads the skill with `spiral agent-skills get media-editing --json` or the Spiral API.

Is Media Editing on for my Spiral organization?

Yes. Built-in skills are on for every organization; an admin can turn Media Editing off on the console's Skills page.

Where is the Media Editing SKILL.md file?

At https://spiral.ai/skills/media-editing/SKILL.md, with no key needed. On the console's Skills page, Customize saves a copy you can edit as your organization's own skill.