Continue one short source clip naturally before or after its existing action from a continuity state and the next visual beat. This AI video continuation and generative extend workflow adds matching footage to the opening or ending of a clip — holding a moment longer, completing a reveal, adding a lead-in, or creating a natural ending — and reviews the seam, motion direction, subject identity, camera and lighting continuity, audio behavior, and final duration. Use it for stronger endings, longer holds, action continuation, product reveals, landscape extensions, and creator iterations.
---
name: "ai-video-continuation"
description: "Continue one short source clip naturally before or after its existing action from a continuity state and the next visual beat. This AI video continuation and generative extend workflow adds matching footage to the opening or ending of a clip — holding a moment longer, completing a reveal, adding a lead-in, or creating a natural ending — and reviews the seam, motion direction, subject identity, camera and lighting continuity, audio behavior, and final duration. Use it for stronger endings, longer holds, action continuation, product reveals, landscape extensions, and creator iterations."
---
# AI Video Continuation
Continue one short source clip naturally before or after its existing action. Use this Skill when the user already has one source video and asks to continue the next action, hold a moment longer, extend an establishing shot, add a lead-in, complete a reveal, create a natural ending, or generate the next beat of footage that joins the source.
## Scope and adjacent routes
The normal route is one source video, one before/after direction, and one extended clip. Route a request to restyle an existing clip into a new visual style to a video-restyle workflow; a request to alter existing frames of the source rather than add new footage to a video-edit workflow; and a request to begin and end on two fixed images to a first-and-last-frame workflow. Keep this route focused on adding matching footage to one source video, not on assembling multiple clips.
## Inputs and defaults
The hard inputs are:
- one accessible source video the host Agent can inspect;
- the continuation direction — add footage before the start or after the end;
- the next visual beat the new footage should reach.
Ask only for a missing hard input. Reuse the known scene, mood, subject, camera, and source-audio preference. The trusted source duration is itself a hard planning input, because the extension is sized against it.
For a local source file the host Agent can access, use the bundled upload helper only after inspection:
```text
python3 scripts/mcp_client.py upload ./source-clip.mp4 --mime-type video/mp4
```
Upload is transport, not creative review. Retain the returned artifact reference and never pass a local path to a remote tool.
Default to one extended clip and `model: "auto"`. Extract a continuity state from the final or opening portion of the source: subject, pose and action vector, camera movement, framing, lens feel, lighting, color, environment, and source-audio intent. Then state one continuation beat — the single next event the new footage should reach.
## Golden path
1. Inspect the source video. Record its actual MIME type, width, height, aspect ratio, duration, and byte size. Identify the subject, pose and action vector, camera movement, framing, lens feel, lighting, color, environment, source audio, the requested before/after direction, and the next visual beat.
2. Build a continuity state from the final portion (for after-extension) or opening portion (for before-extension): subject, pose and action vector, camera movement, framing, lens feel, lighting, color, environment, and source-audio intent. Then state one continuation beat.
3. Call `beatra.models.list` with `{"capability":"video_extend"}` before naming compatibility, duration, resolution, or a numeric estimate. Admit the complete payload against one current card: the source clip's actual MIME type, dimensions, duration, and byte size, that card's live final-duration maximum, direction control, optional reference limits, and price basis. Keep the model at `auto` unless the user chose a concrete eligible model. Any numeric estimate is provisional; the terminal task's `billing.net_charged_credits` is final.
4. Choose the extension duration. The request `duration` is the final returned-video duration, not seconds to add: it must be an integer that exceeds the trusted source duration and stays within the live maximum. Prefer the shortest admitted final duration that still exceeds the source. If the source already meets or exceeds the current maximum, this route cannot enter and the user must be told plainly. Show an admission card before any `client_request_id` or `beatra.videos.extend` call: route `video_extend`, tool `beatra.videos.extend`, source, direction, next beat, final duration, resolution if set, provisional live estimate, the fact that the 600-credit signup gift usually cannot start this video, and what happens if the balance is short. Planning, comparison, or “make the clip” is not approval. Do not submit until the user confirms they have topped up or already have enough credits for this estimate. Freeze the exact payload with one opaque stable `client_request_id`; then submit one `beatra.videos.extend` call exactly once. Invoke only the bundled `scripts/mcp_client.py`: the MCP tool name is the CLI argument and its arguments are JSON on standard input. For example:
```text
printf '%s' '{"video":{"type":"artifact","artifact_id":"art_source"},"duration":10,"direction":"after","instruction":"Continue the shot forward: the subject turns and walks toward the window, keeping the same lens, lighting, and pacing.","client_request_id":"opaque-extend-id"}' | python3 scripts/mcp_client.py call beatra.videos.extend
```
Do not configure, call, or use a host Beatra Connector. Do not use REST/OpenAPI fallback. Submit `beatra.videos.extend` exactly once.
5. Record the returned task ID immediately and poll the same task with `beatra.tasks.get` until terminal. Deliver every returned video artifact or link. Report only actual returned task status, resolved model, dimensions, duration, usage, and `billing.net_charged_credits`. Review accessible output for the seam, motion direction, subject identity, camera and lighting continuity, audio behavior, final duration, and whether the new event advances naturally. State what the host Agent could and could not inspect.
## Paid changes, recovery, and cancellation
An extension is one paid stage. A changed source video, continuation direction, next beat, final duration, model, or control is new logical paid work with a new ID, a new admission card, and fresh top-up or balance confirmation. The `duration` is the final returned-video duration each time; it never means seconds to add. On `insufficient_balance`, relay the returned message, keep the top-up URL inside the balance error exact, and retry the same frozen `client_request_id` only after the user says they have topped up.
If a create response is lost, retry only the identical frozen payload with the same stage ID. If a task ID is lost, call `beatra.tasks.list` for the relevant capability, inspect plausible candidates with `beatra.tasks.get`, and match them against that stage's private ledger before considering an identical retry. Queued and running are progress states, not failures. Recover the original stage before planning changed work; never duplicate a paid submission or guess its charge or refund.
Call `beatra.tasks.cancel` only when the user asks to cancel. Call it once and confirm the resulting terminal state with `beatra.tasks.get`. A 409 means cancellation is not confirmed, so continue polling that same task without creating replacement work.
If the tool returns insufficient credits: give the user the tool message in
full. Do not change the URL. You may translate the other words. Do not replace
it with your own top-up copy. Point the user to pay using that message.
## Account balance
When the user asks how many credits remain or whether a live estimate fits,
call `beatra.wallet.get`. When they ask what was charged, call
`beatra.wallet.ledger`. Both are read-only. Do not invent an account-balance or
top-up tool. Do not make `wallet.get` a required step before every paid submit.
When a model card comes back carrying a `top_up` block, relay its tiers as the
card lists them and in that order. Do not rank them, do not talk one down, and
do not pick one for the user. Which tier suits them is their call, made on
the wallet page with the whole list in front of them. Never quote a tier from
memory.
## References by task
- Read [Video continuation workflow](references/workflow.md) when building a continuity state, choosing the next beat, checking live model facts, sizing the final duration, constructing exact payloads, polling, recovering, cancelling, or reviewing seam and continuity.
- Read [Installation and authentication](references/installation-and-auth.md) only when authorization or shared credentials need attention.
- Read [Installation registration](references/installation-registration.md) for the non-billable best-effort package registration step.
- Read [Tasks and results](references/tasks-and-results.md) for shared terminal task and artifact semantics, and [Billing, errors, and recovery](references/billing-errors-and-recovery.md) for returned billing or error details.
- Read [Bundled MCP Client diagnostics](references/mcp-connection.md) when the bundled client cannot connect. Do not configure a host Connector.
- Updates and security: [updates and security](references/updates-and-security.md)
- Read [Uninstall and disconnect](references/uninstall-and-disconnect.md) only when the user asks to remove the package or shared credentials.
Use or invoke the bundled `scripts/mcp_client.py` for every Beatra operation.
## Updates and security
This Skill runs only the files installed with it and leaves them unchanged while
it runs; it never downloads or executes other code. It talks to Beatra's official
services over HTTPS, and a file you choose to upload goes only to the one-time
upload address Beatra issues for it.
Once a day at most, the bundled client reads Beatra's public version list. When
the store or tool you installed from has a newer version, it prints one line with
the command that updates it there. Updating stays your choice, through that store
or tool. See [updates and security](references/updates-and-security.md).
don't have the plugin yet? install it then click "run inline in claude" again.
separated intent, inputs, procedure, decision points, output contract, and outcome signal into distinct sections; made continuity state extraction explicit; documented all edge cases including insufficient balance, network timeouts, rate limits, lost task ids, and cancellation flows; clarified that duration means final video length not seconds to add; added decision tree for source accessibility, direction routing, balance checks, model selection, and error recovery; made billing and recovery workflows unambiguous.
continue one short source clip naturally before or after its existing action. use this skill when the user has one source video and asks to hold a moment longer, extend an establishing shot, add a lead-in, complete a reveal, create a natural ending, or generate the next visual beat that joins the source seamlessly. the workflow inspects the source, extracts continuity state (subject, pose, camera, lighting, audio intent), generates matching footage, and validates seam, motion direction, subject identity, camera and lighting continuity, audio behavior, and final duration.
before (add footage to clip start) or after (add footage to clip end).model: "auto" unless user specifies eligible concrete model after checking live compatibility.optional inputs (reuse from source if not stated):
edge cases to handle:
inspect source video. verify the host agent can access the file. record actual mime type (e.g. video/mp4), width, height, aspect ratio, duration in seconds, and byte size. identify subject, pose and action vector, camera movement, framing, lens feel, lighting, color, environment, source audio quality and intent, user's requested before/after direction, and the next visual beat they want to reach. if file is local and accessible, use bundled upload helper after inspection:
python3 scripts/mcp_client.py upload ./source-clip.mp4 --mime-type video/mp4
retain returned artifact id; never pass local path to remote tool.
extract continuity state. analyze the final portion of source (for after direction) or opening portion (for before direction). document subject, pose and action vector, camera movement, framing, lens feel, lighting, color, environment, and source audio intent. state one concrete continuation beat: the single next event the new footage reaches.
check model compatibility and pricing. call beatra.models.list with payload {"capability":"video_extend"} before stating any model name, final duration, resolution, or numeric credit estimate. match the source video against one current model card: verify source mime type, dimensions, duration, and byte size are admitted. note that card's live final-duration maximum, direction control, optional reference limits, and price basis. keep model at auto unless user explicitly chose an eligible concrete model. any numeric estimate is provisional; terminal task's billing.net_charged_credits is final.
choose final duration and build admission card. final duration is the complete returned video length in seconds, not seconds to add. it must be an integer that exceeds the trusted source duration and stays within the model's live maximum. if source already meets or exceeds maximum, halt and tell user plainly this route cannot proceed. prefer the shortest admitted final duration that still exceeds source. build and show admission card before any client_request_id or beatra.videos.extend call. card includes: route (video_extend), tool name (beatra.videos.extend), source artifact id, direction, next beat, proposed final duration, resolution if customized, provisional live credit estimate, note that 600-credit signup gift usually cannot fund this task, and consequence if balance is short.
confirm and submit. do not proceed until user confirms they have topped up or already hold sufficient credits for the estimate. freeze the exact payload (source, direction, instruction, final duration, model, client_request_id) with one opaque stable client_request_id. submit one beatra.videos.extend call exactly once via bundled mcp_client.py:
printf '%s' '{"video":{"type":"artifact","artifact_id":"art_source"},"duration":10,"direction":"after","instruction":"Continue the shot forward: the subject turns and walks toward the window, keeping the same lens, lighting, and pacing.","client_request_id":"opaque-extend-id"}' | python3 scripts/mcp_client.py call beatra.videos.extend
do not configure, call, or use host beatra connector. do not use rest/openapi fallback. submit exactly once.
record task id and poll. record returned task id immediately. poll the same task with beatra.tasks.get until terminal (completed, failed, or cancelled). queued and running are progress states, not failures; continue polling. deliver every returned video artifact or link. report only actual returned task status, resolved model name, output dimensions, duration, usage metrics, and billing.net_charged_credits.
review continuity and delivery. inspect accessible output for seam quality, motion direction consistency, subject identity match, camera and lighting continuity, audio behavior alignment, final duration accuracy, and whether new event advances the narrative naturally. state what the host agent could and could not inspect (e.g. cannot listen to audio if file is unplayable locally, can verify visual seam and motion).
billing.net_charged_credits (final charge, authoritative).success means returned video shows natural continuation, no visible jitter or discontinuity at seam, subject and camera movement align with source, lighting and color match, audio (if present) flows without audible cut, and final duration matches or slightly exceeds requested seconds.
user receives extended video file (or link to download) that continues the source action naturally before or after the clip. the new footage matches source subject, pose, camera angle, lighting, and color. the seam between source and generated footage is imperceptible or minor. motion direction and pacing maintain continuity. audio (if sourced) flows without cut or dropout. final duration meets or exceeds user's target. user can preview and confirm the continuation reaches the requested visual beat (e.g. product reveal complete, subject reaches destination, landscape fully visible). user sees exact final credit charge in billing record and can compare against provisional estimate.