Communitygithub.com

0xsline/openchatcut

在 OpenChatCut 工具调用失败或返回意外形状时使用。

openchatcut 是什么?

该技能为 AI 代理提供了一套全面的 OpenChatCut 视频编辑工具错误处理指南。它详细解释了调用 `edit_item` 时正确的 JSON 负载格式,包括更新和添加操作,以避免形状错误。此外,它还涵盖了处理时间线重叠、工作区路径限制、浏览器视频转换失败以及动态图形要求等常见问题。该技能支持 OpenChatCut 平台,并建议使用 `asset-import` 和 `import_media` 等替代工作流程来处理媒体导入,以及在出现转换错误时在本地使用 `ffmpeg` 重新编码。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/0xsline/openchatcut/tree/HEAD/src/agent/skills/known-errors

在你喜欢的 AI 中提问

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

文档

已知错误

edit_item 更新原始形状:

  • 错误:{ "id": "abc", "fromFrame": 30 }
  • 正确:{ "json": "{\"updates\":[{\"id\":\"abc\",\"fromFrame\":30}]}" }
  • 对于常见的移动、裁剪和轨道更改,使用相同的 updates 形状。

edit_item 添加原始形状:

  • 新项目位于 json 事务的 adds 数组内:{ "json": "{\"adds\":[{...}]}" }。
  • 使用 edit_item 进行简单的视频放置,例如 { "json": "{\"adds\":[{\"type\":\"video\",\"assetId\":\"...\",\"fromFrame\":0}]}" }。

时间线重叠:

  • 错误文本:Overlap: updated item at ... would overlap existing item at ... on this track.
  • 不要强制写入或静默删除冲突的项目。
  • 使用显式的可用 trackId 重试 edit_item 事务,例如包含 "trackId":"V2" 的更新,或者询问用户哪个图层应获胜。

工作区路径限制:

  • 外部 MCP 上的 push_asset 仅接受公共 http(s) URL 作为 filePath。它会拒绝本地路径、工作区路径和聊天附件路径。
  • 对于动态图形素材,通过 create_motion_graphic_from_code({ code:"...", name, width, height, durationInFrames }) 传递 JSX 源代码。push_asset 不再接受内联 code 参数。
  • 将本地媒体复制到工作区不是修复视频/音频/图像/GIF 导入的方法;请改用 asset-import 和 import_media。
  • 对于客户端持有的文件,使用 import_media action=create_session,然后使用返回的令牌运行一次 OpenChatCut 媒体导入助手。

浏览器视频转换失败:

  • 错误文本通常包含 Unable to convert video without dropping audio/video tracks 或 unknown_source_codec。
  • 重新运行 OpenChatCut 媒体导入助手;它负责前端对齐的转换,如果转换不可能,将显示用户可操作的错误。
  • 不要要求用户通过编辑器 UI 重新导入相同的文件作为解决方法——转换路径相同,错误会重复。修复源(使用 ffmpeg 在本地重新编码)或选择不同的文件。
  • 替换素材上传/转录后,如果失败的原始素材未使用,请将其删除。清理后的最终媒体池应看起来像一次成功的导入,而不是一次失败的导入加上一个替换品。

动态图形要求:

  • push_asset(type:"motion-graphic") 需要 width、height 以及 duration 或 durationInFrames。
  • MG 代码必须通过 OpenChatCut 验证器。
  • 根 AbsoluteFill 对于生成的 MG 代码无效;请使用缩放的根 div。
  • 避免在 MG 代码中声明顶层本地变量名为 scale。验证器/运行时可能已保留该标识符;请使用特定名称,例如 uiScale。

本地开发 Zero 注意事项:

  • 当后端在非默认端口上运行时,请使用匹配的 Zero view-syncer 配置。
  • 在此 POC 中,后端 3010、编辑器 5177 和 view-syncer 4850 已与较旧的 3000/5173/4848 堆栈有意隔离。

时间线帧渲染器注意事项:

  • 如果 view_timeline_frames 对某一帧失败,项目写入路径仍可能正常——在得出结论之前,使用较少帧或不同时间重试。
  • 仍在 blob: 占位符(上传进行中)上的素材渲染为空;在将空白帧视为错误之前,请等待 track_progress target=upload。
  • 除非工具返回的图像内容能明显确认目标帧,否则不要报告视觉证据成功。

Individual skills in this repo

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

0xsline/openchatcut

Connect an MCP-capable coding agent to OpenChatCut and edit local video projects. Use when the user asks to install, connect, or set up OpenChatCut; inspect or edit an OpenChatCut project; work with its timeline, transcript, captions, media, generation, motion graphics, audio, color, or export tools; or recover from an OpenChatCut MCP error.

0xsline/openchatcut

Use when acquiring or importing media into a OpenChatCut project asset library for video editing or creation, including local/attached videos, user-provided paths, public media URLs, web video/audio/image assets, upload fallback decisions, and deciding between import_media, download_media, or manual user action.

0xsline/openchatcut

Use when a OpenChatCut video editing or creation workflow needs export, render, download, share, final delivery, subtitle-file export, render choice, local-only asset handling, or export fallback explanation.

0xsline/openchatcut

AI image generation via Fal.ai, gpt-image-2, nano-banana, MiniMax image-01, and xAI Grok Imagine. Use when the user wants to generate or create an image / picture / still.

0xsline/openchatcut

Music generation via Mureka, MiniMax, Atlas Cloud, and Sonilo. Use for instrumentals, songs, soundtracks, track/stem generation, covers, or video-conditioned scoring of the finished cut through `submit_music`.

0xsline/openchatcut

OpenChatCut product knowledge — UI layout, editor features, and how generation providers are configured. Use when the user asks about the product interface, how to use a feature, where to find something, or needs GUI guidance for something the agent cannot do directly. Also use as fallback when a task fails and the user needs to complete it manually in the UI. NOT for live project-state queries ("where are my folders?", "what's on my timeline?", "where is clip X?") — those are answered by `read_project`, not by this skill.

0xsline/openchatcut

AI shader generator for WebGL video effects, transitions, masks, and color grading (LUT / 调色 / 电影感 / film look). Use when the user wants a video effect (滤镜 / 特效), a transition (转场 / crossfade / wipe / cube / 3d), a mask (蒙版 / 遮罩 / reveal), a zoom / push-in (推近 / 推镜头), or a color grade — try the built-in effects (zoom, builtin LUTs) before generating a new shader.

0xsline/openchatcut

Use when checking whether agent edits are reflected in the OpenChatCut project and editor.

0xsline/openchatcut

AI video generation via Fal.ai, Seedance 2.0, Kling, MiniMax Hailuo, xAI Grok Imagine, and OFox. Use when the user wants to generate a video clip — text-to-video, image-to-video, first/last-frame transitions, reference-guided generation, multi-shot, or generatively editing / extending an existing clip.

0xsline/openchatcut

Text-to-Speech (TTS), voiceover, narration placement/sync, and custom sound effects (SFX) generator. Use when the user wants generated speech from text, wants to add/replace/align narration or voiceover for an existing video/timeline, wants to keep existing voiceover synced after visual retiming edits, needs voice audition/selection, or explicitly wants a newly generated/custom sound effect that is not available in the Sound Effects library.

0xsline/openchatcut

Use when the agent should ask the user for structured input with an in-chat form, including single-select, multi-select, text fields, style pickers, or voice audition choices.

相关技能