--- name: motion-template-to-video description: 使用已有可编辑 Motion 模板、工程文件夹、ZIP 或已选画廊源码出片,原样交付或替换文案、品牌与素材,保留约定结构和动效。包含已接受的首次体验;续作沿用当前工程。只有参考成片而无可编辑模板时走 motion-recreate,视频转可复用模板走 motion-video-to-template,原创走 motion-director。 --- # Template project → video ## Scope and shared execution Turn the selected editable template into the requested draft, editable project or finished video, preserving its agreed structure, motion and style. This is the implemented template route, including direct Skill selection. Read [shared context](../motion-production/references/context.md) once and apply only dependencies needed by this scope; reuse complete bodies and completed operations. Continue here without returning to production/start. MCP-only clients use resources/read `motion://workflow/template/start`, which returns this same file with `status: "ready"`. Changes to existing content use the [shared edit workflow](../motion-production/references/edit.md), including required related changes and preserved content. Missing instructions and target sources must finish returning to the model before a later call applies a template, imports, writes or exports. Entering this Skill again does not create another copy, apply the template again or repeat a completed export. The accepted installation experience follows [first-run defaults](../motion-production/references/templates.md#first-run-experience-defaults): use the exact template ID and unchanged sample content offered and accepted in this conversation, with that template's own duration. A single-template yes accepts it; a three-candidate yes needs clarification. Resume an existing experience project or create one independent copy once. Open its editable preview; export only if requested. Do not restart the template/assets questionnaire or substitute a fixed default. Initial installation reply rules and few-shots come from `docs/install.md`, section “Installation-success reply”; this Skill resumes creation after consent. ## Open the supplied project A template is a complete native HyperFrames project, not necessarily a catalog entry. For a supplied folder or ZIP, inspect/unpack it and make a working copy when editing or rendering is needed; resume that copy on later turns. Read `index.html`, native configuration and `TEMPLATE.md` (older templates may have `EDITING.md`/`REPLICA.md` instead) for changes or a fresh render. An unchanged request needs only the editable preview handoff below. Preserve source, assets and hidden Studio manifests. Do not require `template.json`, a local template ID or catalog registration. If the user selected a gallery/catalog item instead, read its exact source/guide and ID, then follow [catalog capabilities](../motion-production/references/templates.md). Bundled projects use `motion_create_project` with projectType=template, templateId, requestId, title and requirements only when the selected project has not already been created. Editable registry sources are inspected and adapted from their real source and assets; builtin and Prism catalog templates can create a project with projectType=template. For discovery call motion_list_templates, read or grep/jq the returned local JSONL index, and call motion_get_template for the chosen ID. Known IDs can go directly to motion_get_template. Preserve the instructions and review limitations in TEMPLATE.md. An external reference video is not an editable template: ordinary video recreation uses [motion-recreate](../motion-recreate/SKILL.md); a request to produce a reusable template uses [motion-video-to-template](../motion-video-to-template/SKILL.md). Correct the route once, carrying the selected source and scope, rather than substituting an unrelated example. See the [portable project contract](../motion-production/references/portable-project.md) for the handoff layout. HTML/CSS/JS is authoritative; metadata and editable variables are aids, not modification limits. For a plugin-managed artifact, use the [runtime adapter](../motion-production/references/production.md): confirm projectId/session ownership with `motion_get_project`, use `motion_import_assets` for supported local media, then read the current revision/version and save through `motion_edit_project` with projectId, requestId, expectedRevision and expectedVersionId. A real conflict requires reading the newer source and forming the edit again; preserve Studio changes and never bypass the guard or replay an old full file. For an independent folder/ZIP, work on its actual source/copy and record before-edit file evidence; a revision from an unrelated active MCP artifact cannot protect this directory. The MCP has no general folder/ZIP adoption or binary/font import Tool; use host capabilities for independent portable projects and report unavailable steps honestly. ## Unchanged: open it in the editor; changed: edit the working project With no requested changes to the supplied template, the editable preview handoff below is the delivery: the template's own `preview.mp4` already represents that source, so do not render, export, copy or compare it. If the editor cannot show this source (for example an independent folder the handoff cannot adopt), state that limitation and give the absolute path of its `preview.mp4` after confirming the file exists, decodes and belongs to this unchanged source. On a continued project that has already been edited, the original template preview is no longer the current result. Render or export only when the user asks for a video file. Use the existing working project, or create a copy once, without re-creating its design or changing its content/assets, using the pinned HyperFrames runtime identified in the project notes. Read its authoring guide/help via resources/read `motion://engine/SKILL.md` or the installed guide; managed project details return hyperframesCli/authoringGuide paths. Do not open Studio merely to locate a runtime. Render an independent directory directly with host shell capabilities, for example with HyperFrames 0.9.7: ```sh node /absolute/path/to/hyperframes/bin/hyperframes.mjs render /absolute/path/to/project-copy -o /absolute/path/to/output.mp4 ``` Native lint, snapshots and rendering can run in the background; complete the editable preview handoff below when the HTML is ready. For plugin-managed projects, request MP4 through `motion_export_request` with projectId, requestId, versionId and expectedRevision; poll `motion_get_project` with projectId/exportJobId. Lint and technical verification are automatic; inspect the actual completed job report and review visuals/audio separately. There is no separate public inspection or verification Tool. Use the pinned native CLI for lint/timeline/info checks before the HTML is ready. Before editing, ask the user when the request needs facts or assets only they can supply (brand, product, claims, prices, images), or when an ambiguous request would materially change the result. Ask all needed questions at once. Decide minor layout and timing details yourself and mention them briefly. Do not ask anything for an unchanged render. With requested changes, apply the shared edit workflow to the current working project. Use variables when helpful; edit HTML/CSS/JS, scene structure and media directly when the request needs it. Preserve unrelated content and motion. For longer wording, make the necessary related wrapping/layout/reading-time changes instead of forcing it into an unreadable original interval. Keep replaced wording in the template's type character (the same pixel, stencil, wide or display style), not a generic fallback face. Check text fitting and media cropping after edits. If brand, image or named-object replacements recur, update their relevant repeated appearances, not just the most prominent one. Do not invent prices, claims or other missing facts. When a reading hold shifts later pictures, inspect existing audio timing too. Preserving the audio file does not prove synchronization or continuous sound. Report any retained mismatch or silent tail; do not introduce audio generation services to resolve it. ## Open the editable result Once this turn's requested HTML is ready, complete the [editable preview handoff](../motion-production/references/native.md#editable-preview-handoff) automatically, before export or delivery. This applies to unchanged templates, edited templates and drafts, including requests that only mention the video. An unchanged request needs no render or export for this step. Use the same working project and report any independent-folder adoption limitation described in the handoff. ## Verify and deliver For an unchanged request, confirm in the editor that the intended template loaded and plays; unless the user asks for a video file, do not render, export or compare it. For an edited request, play the changed content and its related motion and sound in the editor preview; native snapshots help with layout but do not show motion. Do not export unless the user asks for a video file, then verify that actual MP4. For an edited request, inspect the requested content, its related layout/timing and unchanged sections against the template's `preview.mp4`. Verify that supplied replacement assets are actually used and old brand content does not remain at another relevant appearance. Record passed, failed and unrun checks separately in the copy's `TEMPLATE.md`. The project open in the editor is the deliverable. Do not copy, link or attach MP4s or other files unless the user asks for them; save requested files in the current workspace and link them by absolute local path, with only the plain path in each link target. For the editable Studio page, use the exact previewUrl from the handoff. Keep the reply short and in the user's words: one or two sentences on what changed and only the limitations the user would notice. For an unchanged request, use one completion sentence; the editable page remains open in the host. An accepted first-run experience follows the [first-run delivery and contextual invitation](../motion-production/references/templates.md#first-run-experience-defaults), including its limited exceptions, instead of adding project screenshots or technical evidence. Humans decide visual acceptance; do not give a subjective pass/fail verdict. Do not claim independent-agent verification unless a separate session actually performed it. For edited or freshly rendered requests, apply the relevant [review standards](../motion-director/references/motion-review.md); changed multi-scene relationships use [production decisions](../motion-director/references/production-decisions.md), and sound changes load the shared context's sound references. These standards do not restart original creative intake or impose a new style on the template. For a fresh managed export, follow [verification](../motion-production/references/verification.md) using the completed job/revision; reuse a matching existing job. Without a request for a video file, create no export job. Stop at the user's requested delivery stage; a draft or review-only request does not automatically render. If source edits change exposed variables, keep those shortcuts connected or remove stale declarations and explain the source editing entry. A variable declaration alone does not prove the control still works.