Communitygithub.com

0xsline/openchatcut

当智能体需要用户通过聊天内表单提供结构化输入时使用,支持单选、多选、文本字段、样式选择器或语音试听选项。

openchatcut 是什么?

该技能允许AI智能体(如Claude Code、Cursor、Codex等)在对话中呈现结构化表单,用于收集用户的结构化输入。它通过调用`ask_followup_questions`工具,将字段序列化为编辑器原生的表单卡片,用户提交后,其回答会作为下一条消息返回。技能强调一次性规划整个问卷,避免试错后修正,并限制最多12个字段,若用户需要更多问题,应合并相关提示。它支持多种字段类型映射,包括单选、多选、文本、视觉样式、语音试听及启动场景卡片,每种类型都有对应的JSON格式规范。技能还提供了详细的文案撰写指导,要求采用温暖、开放、以动作为导向的表达,避免生硬的产品文档风格,例如在场景选择表单中使用“你想制作什么?”而非“请选择视频类型”。此外,它明确排除文件上传问题,要求用户在编辑器内单独上传媒体文件。

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

在你喜欢的 AI 中提问

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

文档

小部件表单

使用表单工具代替手写标记:编辑器聊天将表单渲染为交互式卡片,并返回用户的结构化答案。

运行时规则

调用 ask_followup_questions。它会将您的字段序列化为编辑器的原生表单卡片;用户的提交会作为下一条消息返回。

在调用工具之前规划整个问卷。发送一个最终表单,而不是先发送试用表单再发送修正表单。该工具最多支持12个字段;如果用户要求更多问题,请在首次调用之前将相关提示合并到组合字段中。

调用 ask_followup_questions 后,停止当前回合,等待提交的答案出现在聊天中。在用户的选项出现在对话中之前,不得应用选择、创建资产或根据推荐继续规划。

支持的字段映射

构建一个 fields 数组。所有可见字符串均使用用户对话语言编写。

  • 原生 <form-single> -> { type: "single", variant: "default" }
  • 原生 <form-multi> -> { type: "multi", variant: "default" }
  • 原生 <form-text> / <form-textarea> -> { type: "text" }
  • 原生 <form-visual> -> { type: "single", variant: "visual" }
  • 语音试听卡片 -> { type: "single", variant: "voice" }
  • 原生启动场景卡片 -> { type: "single", variant: "scenario" }

表单文案语气

对于表单级别的文本(title、prompt、fields[].label、submitLabel 和 messagePrefix),写法应像 OpenChatCut 是一个有能力的视频制作伙伴,邀请用户描述他们想要的内容,而不是像刻板的调查问卷。

目标是:

  • 温暖、开放且以行动为导向。文案应暗示“选择最接近的视频需求,或者直接告诉我你的想法;我们可以一起解决。”
  • 简短且易于浏览。prompt 使用一个自然的句子,问题标签简洁明了。
  • 诚实地界定能力。OpenChatCut 可以帮助完成许多视频工作流程,但不要声称具有不支持的能力,或在输入信息明确之前保证结果。
  • 使用用户的语言和本地产品术语。保持“OpenChatCut”、“B-roll”、“Motion Graphics”、“MG动画”、模型/产品名称和平台名称的既定形式。
  • 面向用户的创意措辞。对于早期规划或创意输入表单,优先使用自然术语,例如想法、方向、计划、故事、镜头列表、观众、情绪或视频需求,而不是内部生产文档语言。

避免僵硬的标签,如“选择视频类型”、“请为此项目选择视频类型”或“你想制作什么类型的视频?”用于场景输入,除非宿主没有空间容纳更温暖的文案。

对于场景输入表单,优先采用如下文案:

{
  "title": "你想制作什么?",
  "prompt": "选择最接近的视频场景,或者选择“其他”并描述你的想法。",
  "submitLabel": "开始创作",
  "messagePrefix": "我想从这个视频方向开始:",
  "fields": [
    {
      "id": "scenario",
      "label": "哪个场景最适合你的视频?",
      "type": "single",
      "variant": "scenario",
      "otherPlaceholder": "例如:将我的旅行素材转化为氛围感 Vlog / 为新产品的发布制作宣传视频"
    }
  ]
}

不要在表单中包含文件上传问题。如果任务确实需要源媒体,且项目/聊天中尚未包含,则单独要求用户在编辑器中上传文件(拖放或上传按钮,或粘贴到聊天编写器)。文件上传并非每个问卷的默认前提条件;仅当下一步编辑步骤依赖于缺失的媒体时才要求上传。

对于选择字段:

  • 使用 id 作为内部值,供下一个工具调用使用。
  • 使用 label 作为用户看到的内容。
  • 对于普通的单选和多选卡片(variant: "default"),仅保留选项标签。不要为每个选项添加 description,除非用户仅凭标签无法区分选项。
  • description 主要用于语音卡片。视觉风格卡片通常应仅使用 preview + label。
  • 当可以接受列表外的答案时,添加一个显式选项,其 id: "__other__" 和 label 使用与表单其余部分相同的语言,并使用用户期望用于列表外答案的词语。当选中此选项时,小部件会将其转换为文本输入。如果文本输入需要占位符,请使用 otherPlaceholder。

对于视觉卡片:

  • 在 preview 中使用真实的图片 URL 或数据图片 URL。
  • 对于设计风格目录选项,首先调用 manage_design_style,action: "list",然后将每个返回的预设映射为 { id: preset.presetId, label: preset.name }(此版本中无缩略图)。
  • 除非用户已选择了某个目录预设 ID,否则切勿硬编码。

对于语音卡片:

  • 使用 audioUrl 提供示例文件。
  • 优先使用文档化的示例路径,如 /voice-samples/doubao-liuchang.mp3 或公开的 HTTPS URL。不要传递本地主机示例 URL;MCP 宿主 iframe 无法可靠解析编辑器本地媒体。
  • 保持用户可见的描述与提供商无关。描述语音的方式应与原生 OpenChatCut 试听 UI 相同:性别/年龄段/语气/用例,例如 "Female / young / friendly, general" 或 "男 / 中年 / 低沉知识解说"。不要在选项描述中显示提供商名称,如 ElevenLabs 或 Doubao。
  • 保持选项 id 等于 submit_voice 所需的提供商语音 ID。

对于原生启动场景卡片:

  • 当用户应选择启动哪个 OpenChatCut 视频工作流时使用,例如口播剪辑、MG动画、长视频转短视频、产品/应用推广、AI短片或解说视频。
  • 将这些呈现为常见的视频需求/场景,而不是唯一可能的视频工作流。表单还必须允许用户描述不同的视频需求。
  • 仅使用一个单选字段,variant: "scenario"。
  • 使用下面的规范 ID 和用户语言的本地化标签提供选项。仅当需要自定义列表外标签时才包含 id: "__other__";否则后端会自动附加本地化的“其他”选项。
  • 内置了英文、中文和西班牙语场景标签/描述/启动提示。对于任何其他用户语言,请将每个场景的英文 label、description 和启动提示忠实地翻译为用户语言,并在选项对象中传递这些本地化值。保留 OpenChatCut 产品术语和工作流含义;不要添加新要求。使用 submitPrompt 传递翻译后的启动提示。此覆盖仅适用于 variant: "scenario";普通选项卡片、语音卡片和视觉风格卡片已经从其传递的值获取可见文本。
  • 不要提供自定义的 preview 或 audioUrl;后端会填充原生的首屏预览图片。
  • 规范 ID:talking-head、motion-graphics、long-video-to-shorts、app-promo、ai-cinematic-short-film、explainer,加上 __other__ 用于自由形式的视频需求。
  • 示例选项: { "id": "talking-head", "label": "口播剪辑" }, { "id": "motion-graphics", "label": "Motion Graphics" }, { "id": "long-video-to-shorts", "label": "长视频转短视频" }, { "id": "app-promo", "label": "产品 / 应用推广" }, { "id": "ai-cinematic-short-film", "label": "AI 短片" }, { "id": "explainer", "label": "解说视频" }, { "id": "__other__", "label": "其他" }。

当前不足

ask_followup_questions 仅用于结构化答案。它不支持原生自定义 HTML、时间线参数桥接、编辑器项目选择或文件上传字段。对于已由代理运行时持有或直接在此卡片外附加到聊天的文件,媒体导入工作流仍然有效:调用 import_media 并运行助手/直接上传路径。对于用户希望直接放入项目的文件,请要求他们使用 OpenChatCut 编辑器上传 UI。

示例

{
  "title": "你的视频创意",
  "prompt": "选择或填写你心中的想法,以便 OpenChatCut 挑选一个好的起始方向。",
  "submitLabel": "发送创意",
  "messagePrefix": "继续这个视频方向:",
  "fields": [
    {
      "id": "goal",
      "label": "这个视频的主要目标是什么?",
      "type": "single",
      "options": [
        { "id": "product_intro", "label": "产品介绍" },
        { "id": "social_ad", "label": "社交媒体广告" },
        { "id": "__other__", "label": "其他" }
      ]
    },
    {
      "id": "elements",
      "label": "它应该包含什么?(可多选)",
      "type": "multi",
      "options": [
        { "id": "broll", "label": "B-roll" },
        { "id": "logo", "label": "品牌标志" },
        { "id": "__other__", "label": "其他" }
      ]
    }
  ]
}

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

Use when a OpenChatCut tool call fails or returns an unexpected shape.

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.

相关技能