Communitygithub.com

0xsline/openchatcut

用於處理 OpenChatCut 工具呼叫失敗或返回意外型態的情況。

openchatcut 是什麼?

此技能為 AI 助手(如 Claude Code)與 OpenChatCut 影片編輯工具互動時提供錯誤處理指引。它詳盡記載了常見的失敗場景,包括 `edit_item` 指令的原始 JSON 格式錯誤、時間軸重疊、工作區路徑限制、瀏覽器影片轉檔問題,以及動態圖形與本地開發環境的特定限制。技能明確定義了正確的交易承載(payload)形狀,並針對每種錯誤提供具體的解決步驟,例如使用明確的 `trackId` 重試、改用 `import_media` 匯入媒體、或透過 `ffmpeg` 重新編碼原始檔案。它也引導開發者避免無效的解決方案(例如要求使用者透過編輯器 UI 重新匯入),並確保最終的媒體池與專案寫入路徑的健康狀態。此技能支援所有以 markdown 檔案定義的 OpenChatCut 工具,提供結構化且可執行的問題修復說明。

相容平台~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) 配置。
  • 在此概念驗證中,後端 3010、編輯器 5177 和視圖同步器 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.

相關技能