360 Secure SkillHub
360 安全技能中心

image-to-video

该技能定义了一套图片转视频流程:定位会话中的最新参考图或请用户提供图片,与用户确认镜头运动、光照与场景变化意图,调用 video_generate 生成短视频,并按提供方限制回退分辨率、处理 API key 失效重试,最后以 MEDIA 指令交付 MP4。同时列出已知不兼容组合及 reference_image 与 first_frame 角色选择的注意事项。

leonrard
leonrard
热度 36.62
最近更新 2026-09-16 21:09:08
分类:创作依赖:MCP 服务应用场景:视频编辑 / 图像生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add leonrard/image-to-video
Metadata
name
image-to-video
description
Generate a video from a still image using video_generate. Use when the user asks to animate a reference image, turn a rendering into motion, or produce a short motion clip.

Image-to-Video

Workflow

  1. Identify the reference image.

    • Prefer the most recent image attachment in the session from image_generate.
    • If no local image exists, ask the user for one or generate it first with the image-generator skill.
    • Done when: the absolute path to the reference image is known.
  2. Confirm motion + lighting intent with the user.

    • Extract: camera motion (orbit / dolly-in / static / pan), scene progression (time-of-day change, weather shift, action), and any audio constraints.
    • Done when: the prompt describes one continuous motion and one lighting/state transition in concrete terms.
  3. Call video_generate with these defaults.

    • image: the path from step 1.
    • imageRoles: ["reference_image"] (use as visual reference, not strict first frame). Use ["first_frame"] only when the user wants the exact frame preserved.
    • aspectRatio: 16:9 for cinematic / drone shots, 9:16 for vertical, otherwise match the source image.
    • resolution: start at 1080P; fall back to 720P if the provider rejects the resolution/duration combo.
    • durationSeconds: 10 for time-lapse / orbit, 6 for action-heavy clips, 8 as a balanced default.
    • watermark: omit (provider ignores it on MiniMax-Hailuo-2.3).
    • timeoutMs: 300000.
    • Done when: the tool returns a task id and the run is backgrounded.
  4. Recover from known incompatibilities.

    • If the failure mentions "duration Xs and resolution YP" → drop to the next-lower resolution at the same duration (1080P → 720P, 720P → 540P).
    • If the failure mentions "invalid api key" → retry; the tool auto-selects the alternate provider path.
    • Done when: a successful generation task id is returned, or the user is told the combo is impossible and asked to choose another.
  5. Deliver the result.

    • Wait for the completion event; do not poll manually.
    • Reply with a short caption and the MEDIA: directive on its own line, using the absolute mp4 path the completion event returns.
    • Done when: the user can see and play the video inline.

Pitfalls

  • Don't combine a custom aspectRatio and a non-default size for MiniMax-Hailuo-2.3 — pick one.
  • 1080P + 10s is rejected on MiniMax-Hailuo-2.3. Use 1080P + 6s or 720P + 10s.
  • reference_image lets the model reinterpret lighting/composition; first_frame locks the start. Match the role to the user's intent.