Communitygithub.com

ai-video-editing

自然语言视频修改与编辑的通用工作流。当用户提出任何视频修改/生成需求时使用——例如"把视频里的文字改成X""放大/替换/删除画面里的某个元素""插帧/补帧让视频更流畅""给这张图注入运动做成视频""生成一段竖屏产品视频"等。负责把口语需求解析为结构化意图、判定可行性边界(原生可做 / 近似需确认 / 做不到)、路由到 miora 生成工具链、生成前确认、执行与验收。本技能是 miora-creative-core 与 miora-video-generation 的上层编排,所有图片/视频生成只调用 mcp__miora__* 工具。

ai-video-editing 是什么?

ai-video-editing is a Claude Code agent skill that 自然语言视频修改与编辑的通用工作流。当用户提出任何视频修改/生成需求时使用——例如"把视频里的文字改成X""放大/替换/删除画面里的某个元素""插帧/补帧让视频更流畅""给这张图注入运动做成视频""生成一段竖屏产品视频"等。负责把口语需求解析为结构化意图、判定可行性边界(原生可做 / 近似需确认 / 做不到)、路由到 miora 生成工具链、生成前确认、执行与验收。本技能是 miora-creative-core 与 miora-video-generation 的上层编排,所有图片/视频生成只调用 mcp__miora__* 工具。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zhaikai253400-prog/ai-video-creation-expert/tree/HEAD/skills/ai-video-editing

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

AI Video Editing Universal Workflow

Overview

Transform a user's plain-language video editing request into a deterministic, honest, and executable generation pipeline. The core principle is feasibility first, then tools: any request to "edit an existing video" must first pass through a feasibility gate. If it cannot be done, the process terminates transparently, never silently degrading the request.

Prerequisites

  • Before starting, verify that miora-creative-core is loaded; if not, load it immediately before proceeding.
  • Then verify that miora-video-generation is loaded; if not, load it immediately before proceeding.
  • All image/video generation must only use the mcp__miora__* tools. Never use plain-text generation tools when source material is available (this would break consistency and generate invalid output that the user would be charged for).
  • When communicating with the user, use design language. Do not expose tool fields, model identifiers, or task IDs.

Core Workflow

Execute in order. As soon as a condition is met, transition to the corresponding branch.

Step 1: Intent Parsing

Decompose the request into 7 slots. Follow exactly what the user explicitly says (do not "optimize" it). For vague parts, fill in along unspecified dimensions. If filling in would change a user-specified attribute, stop and ask.

SlotMeaningDefault Rule
ACTIONe.g., change text, enlarge, replace, delete, interpolate frames, change style, pure generationCannot classify -> ask a follow-up question
TARGETWhat does the action apply to?Vague -> ask user to point it out or upload a screenshot
SOURCESource material (video, screenshot, text)No material and not pure generation -> request it
PRESERVEWhat must not changeDefault: try to preserve as much as possible, but inform the user of potential drift
SCOPESingle frame, entire video, or a specific time rangeDefault: entire segment (requires confirmation)
SPECDuration, aspect ratio, generation quality, output resolutionShort videos default to portrait, landscape presentations default to landscape; duration defaults to the shorter of the options. If generation quality is not specified, you must use AskUserQuestion to let the user choose from 480P, 720P, or 1080P (recommend 720P, but require user confirmation). Never silently generate at a default, especially 480P. Follow ../miora-video-generation/references/resolution-selection.md.
KINDText nature (burned into frame / external subtitle track)If unclear, ask. Prefer subtitle track (more precise).

Step 2: Feasibility Gate (Critical — Every Request Must Pass)

Fundamental fact: The current tool is generative, lacking native video-to-video precise editing. Any request that says "keep everything else in the original video unchanged, only change this one part" cannot be achieved at the pixel level; the image will be regenerated and visual drift will occur.

Judge in order. Stop as soon as a condition is met:

  1. Generate a new video / animate a static image -> ✅ Use generation tools.
  2. Change text on an external subtitle track -> Inform the user: "Just modify the subtitle text and re-mux the track, no AI needed." Do not use generation tools.
  3. Change text that is burned into the frame -> ⚠️ Approximate. Must obtain informed confirmation, then use Path A.
  4. Enlarge/replace/delete a visual element in the frame -> ⚠️ Approximate. Must obtain informed confirmation, then use Path B.
  5. Frame interpolation, with start/end/keyframes provided -> ⚠️ Approximate. Use Path C to generate the transition. Without keyframes, explain that true interpolation is not possible.
  6. Strict requirement: "Don't touch a single other frame / pixel-perfect / lossless interpolation" -> ❌ Terminate before generation. Explain the limitations and provide alternative paths. Do not force it.

Quick three-category reference: ✅ Natively possible = text-to-video, image-to-video, reference-anchored video generation; ⚠️ Approximate = change text, elements, or interpolate frames (will cause drift, must obtain confirmation first); ❌ Impossible = pixel-level editing, strict preservation of original footage, lossless interpolation, maintaining exact identity across multiple assets.

See references/capability-boundary.md for details.

Step 3: Tool Routing

IntentPath
Text onlytext_to_video
Have an image, want to animate it / have start and end framesframe_to_video
Have an image, want to anchor subject or stylereference_to_video
Change burned-in text / change element / interpolate framesExtract key frames -> edit_image to modify frames -> frame_to_video / reference_to_video to regenerate
Modify a static image itselfedit_image

For step-by-step operations of the three main paths, see references/workflow-details.md.

Step 4: Pre-Generation Confirmation

Before each generation, use AskUserQuestion to ask once. The question body must clearly state three items: ① What will be produced and how many (for multiple assets, offer lighter parallel options); ② The specifications for this batch (aspect ratio, size, duration, including defaults, and show the defaults); ③ The materials being used (if none, state it's pure text generation). Ask once per batch; after agreement, complete the batch. Only ask again if the scale exceeds the range, parameters change substantially, the user requests a revision, or a new batch is started.

When dealing with the ⚠️ Approximate category, the confirmation must include the phrase "this will regenerate the image; other parts of the frame may visually drift." Only proceed when the user explicitly accepts.

For transitions / compositing, pass the shot acceptance gate first: Before stitching, transitions, subtitle burning, audio mixing, or exporting a multi-shot output, you must follow ../video-studio/references/shot-acceptance-gate.md to display every shot from the current batch to the user and obtain explicit confirmation that "all shots are approved." Write this to 03_work/shot-acceptance.md. Then separately confirm the transition cut table and compositing specifications. Sample approval, first-frame confirmation, and the generation confirmation from this step do not count as full shot acceptance. Do not proceed to the next step without confirmation for every shot.

Step 5: Execution

  • After the user agrees and before generation, if no canvas exists, create an empty .miora canvas and open it. Do not create a duplicate if one already exists.
  • Every time an asset is produced, immediately write it into this canvas (criterion: successfully obtained the local file). All final outputs go into the same canvas.
  • For consistency across multiple assets, use reference images as visual anchors and reuse them. Without reference images, consistency will be weak; inform the user honestly. Strict cross-asset identity consistency is not achievable; do not force it.
  • If no result is returned, first use miora_query_task to check the status. Do not treat it as a failure. If the user asks "is it done yet" later, check the status of the previous task.
  • Do not resubmit: If an original task is still running, do not issue a new generation. To reduce timeout, you may only shorten the duration or lower the resolution after user consent (this is a new generation, not a retry).
  • Prompt Construction: Provide a complete description, or if the user says "use my exact words," pass them verbatim. If vague, supplement with: subject / action / camera movement / lighting atmosphere / end state. One camera movement per shot. For camera movements, lighting positions, and color tones, consult the expert video-studio skill's references/shot-language.md (§3 Camera movement prompt patterns, §10 AI generation limitations) and references/cinematographer-playbook.md (§4 Lighting templates): Write as "shot type / camera position / one movement / light source direction / light quality / dominant color / end state." Do not stack empty terms like cinematic, 8k, masterpiece, and do not use director names. For complex camera movements (e.g., dolly zoom, long tracking shot, multi-motion overlay), default to a static frame with ffmpeg effects instead of generating. Do not write instructions like no watermark, remove logo, or watermark-free, and do not crop, blur, overlay, inpaint, or clear metadata to remove watermarks (see ../video-studio/references/content-compliance.md). For clean output, select official watermark-free tiers or use local open-source models before generation. For effects involving particles, magic, light effects, explosions, or dissipation, first load the vfx-studio expert and finalize the selection during the planning phase. Write prompts following ../vfx-studio/references/vfx-implementation.md §2 as a "start → process → end" sequence. Do not write effect names, studio names, or genre names. For effects that can be reliably achieved with post-production overlays (glow, particles, texture), do not hand them over to generation. Always burn text in post-production.

Step 6: Verification

Check each asset: Was the output actually obtained? Does the actual duration/aspect ratio match the confirmation? Does the subject match the description? Are all assets in the same canvas? For aspects that cannot be verified from the file (e.g., smoothness, camera movement), honestly mark them as unverifiable and let the user review them. Do not automatically regenerate unqualified assets; leave the decision to the user.

Red Lines

  • Do not pretend that pixel-level video editing or lossless frame interpolation is possible.
  • Do not silently degrade. Do not deliver "similar but not what the user asked for" and claim completion.
  • Do not deliver a storyboard script as a video asset. Do not silently downgrade to an image.
  • Do not re-issue a generation simply because you are "unsure if the previous one succeeded."
  • Do not crop, blur, overlay, or inpaint to remove "AI generated" labels or platform logos. Do not clear implicit identifiers or metadata. If the final output contains a logo, return to the generation step and switch to a licensed channel to re-produce; do not do post-production erasure.

For a complete quick reference and intent examples, see references/examples.md.

Reference Files

  • references/capability-boundary.md — Three-tier capability boundaries, realistic landing points for three types of requests
  • references/workflow-details.md — Intent slot values, detailed explanations of the three main paths, execution/verification protocol
  • references/examples.md — Intent example library, Do/Don't red line quick reference
  • Cross-skill (../video-studio/references/, load video-studio if not mounted): shot-language.md — Camera movement and shot type terminology; cinematographer-playbook.md — Lighting and color; transition-playbook.md — Transition design; director-playbook.md — Style cards; reference-deconstruction.md — Video analysis methods and templates; video-genres.md — Full genre routing (determine genre first, then select style); shot-acceptance-gate.md — Full shot acceptance gate (required before transitions/compositing)
  • Cross-skill (../vfx-studio/, load vfx-studio if not mounted): vfx-catalog.md — VFX master catalog; vfx-selection.md — Selection logic; vfx-implementation.md — Prompt formulas and ffmpeg recipes; vfx-masters.md — Top-level VFX and VFX art schools

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

prompt-reverse

从已有的图片或视频反推出可复用的 AI 生成提示词。当用户给一张图、一组图、一段视频,问「这是用什么提示词生成的」「帮我反推提示词」「照这张图写提示词」「把这段视频拆成提示词」「这个画面怎么生成的」「提取这段视频的画面/运镜/风格提示词」时使用——按证据帧提取可观察事实,回填 12 槽框架,输出中英双版本提示词与置信度,并明确区分「能确定的」与「推测的」。只复用语法、结构、参数与关系,不搬运原画面、台词、音乐、品牌与水印;不承诺复刻同一张图。不负责生成工具路由与确认门禁(在 miora-creative-core)、不负责写新故事(在 screenplay-studio)、不负责按文字需求扩写提示词(在 visual-prompt-craft)。

video-studio

接单式视频制作主流程(全类型):视频剪辑、修改、多素材合成、广告/带货/宣传片、画幅调整、字幕配乐、调色变速、按参考视频仿做同款,以及 AI 生成——文生图、改图、图生视频(首帧/首尾帧)、参考图生视频、文生视频、用用户的产品图/照片/素材生成新镜头,以及 AI 短剧的制作落地(资产圣经、定妆、分镜、逐镜生成再合成)。当用户说"帮我剪一下""把这几个视频合成一条""做个广告/宣传片/带货视频""照着这个视频做一个类似的""参考这个视频,我想做一个(自己的新需求)""喜欢这条的质感/节奏/打法,但故事换成…""按这个风格把我这个点子拍成短剧""改成竖屏/加字幕/换BGM""台词口型对不上怎么办""这个对白镜怎么拍""帮我配音/加字幕""用 LibTV 做/在 LibTV 画布里做""帮我检查一下 LibTV 做的东西/验收这个 LibTV 样片或成片""用我这几张图做个视频""让这张图动起来""帮我生成几个镜头/一张海报""做个短剧""按这个剧本拍成剧"等时使用。写剧本与戏剧手法交给 `../screenplay-studio/`,镜头衔接、一镜到底与叙事结构交给 `../cinema-craft/`,特效选型交给 `../vfx-studio/`;本技能负责分级、方案、分镜与 ffmpeg 成片,把它们落进同一条流水线。核心原则:先按复杂度分档,再按档位确认后动手;成片永远由 ffmpeg 最终合成。

相关技能