### Run from source: clone, install, and start dev server Source: https://github.com/0xsline/openchatcut/blob/main/README.md Clone the repository, install dependencies, copy the environment template, and start the development server. Requires Node.js 24.x and npm. On Linux x64, use ONNXRUNTIME_NODE_INSTALL=skip npm install for a CPU-only install. ```bash git clone https://github.com/0xsline/OpenChatCut.git cd OpenChatCut npm install cp .env.example .env.local npm run dev ``` -------------------------------- ### Install OpenChatCut Agent Skill Source: https://github.com/0xsline/openchatcut/blob/main/README.md Install the single OpenChatCut Agent Skill using npx. After installation, tell the agent 'Set up OpenChatCut' to register the local MCP connection and load the editor's 26 specialized skills on demand. ```bash npx skills add 0xsline/OpenChatCut ``` -------------------------------- ### Example Editing Task Description Source: https://github.com/0xsline/openchatcut/blob/main/README.md Describe an editing task directly to the agent. This example instructs the agent to start an edit session, read the draft, add a scratch sound effect and a glitch transition, submit for review, and wait for user approval. ```text Start an OpenChatCut edit session. Read the draft, add a scratch sound effect at 8 seconds on the second audio track, and add a glitch transition between the adjacent video clips. Submit the draft for review and wait for the user to approve it in OpenChatCut before reporting that the edit was applied. ``` -------------------------------- ### browse_library catalog search examples Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/SKILL.md Example queries for the browse_library tool to search built-in effects, transitions, and audio effects. Use these before generating a shader unless the user names an exact asset id visible in read_project. ```text browse_library(query: "zoom") browse_library(category: "transitions", query: "dissolve") browse_library(category: "audio-fx") ``` -------------------------------- ### Scenario-intake form JSON example Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/widget-forms/SKILL.md A JSON example for a scenario-intake form with title, prompt, submitLabel, messagePrefix, and a single-select scenario field. Use this as a template for warm, action-oriented copy. ```json { "title": "What do you want to make?", "prompt": "Choose the closest video scenario, or choose Something else and describe your idea.", "submitLabel": "Start creating", "messagePrefix": "I want to start with this video direction:", "fields": [ { "id": "scenario", "label": "Which scenario fits your video best?", "type": "single", "variant": "scenario", "otherPlaceholder": "For example: turn my travel footage into an atmospheric vlog / make a launch video for a new product" } ] } ``` -------------------------------- ### import_media create_session command Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/known-errors/SKILL.md Use `import_media action=create_session` to start a media import session, then run the OpenChatCut media import helper once with the returned token for client-held files. This is the correct path for copying local media into the workspace for video/audio/image/GIF imports. ```text import_media action=create_session ``` -------------------------------- ### Submit shader effect and transition requests Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/SKILL.md Examples of calling submit_shader with different types (effect, transition) and prompts. The last example shows using referenceAssetIds to create a stronger version of an existing effect. Before calling, restate the user's intent in one sentence; after track_progress returns, state what was produced in one line. ```ts submit_shader({ type: "effect", prompt: "Chromatic aberration with RGB split", name: "Chromatic Aberration", }); submit_shader({ type: "transition", prompt: "Smooth crossfade with soft edge", name: "Crossfade", }); submit_shader({ type: "effect", prompt: "Cinematic teal-orange color grade", }); submit_shader({ type: "effect", prompt: "Stronger version", referenceAssetIds: ["effect_asset_id"], }); ``` -------------------------------- ### Qoder Settings File Paths Source: https://github.com/0xsline/openchatcut/blob/main/README.md Qoder's Connect button writes the endpoint and bearer token into Qoder's own settings file. The China build is written as well when installed. ```text ~/.qoder/settings.json (international build) ~/.qoder-cn/settings.json (China build — written as well when installed) ``` -------------------------------- ### Run desktop development build Source: https://github.com/0xsline/openchatcut/blob/main/README.md Starts the Electron shell with embedded services for desktop development. The desktop app shares project, agent, generation, and export logic with the web build. ```bash npm run desktop:dev ``` -------------------------------- ### submit_music examples for MiniMax provider Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/music/references/minimax.md Five submit_music calls showing instrumental BGM, vocals with lyrics, auto lyrics, music-cover, and higher-quality WAV instrumental. Each uses provider: "minimax" with mode-specific arguments. Cover requires the Settings model to be music-cover*. ```typescript // Instrumental BGM submit_music({ provider: "minimax", mode: "cover", prompt: "Cinematic strings, hopeful, soft under dialogue", name: "BGM · strings", }); ``` ```typescript // Vocals + lyrics submit_music({ provider: "minimax", prompt: "Indie folk, acoustic guitar, intimate", lyrics: "[Verse]\n...\n[Chorus]\n...", name: "Song · folk", }); ``` ```typescript // Auto lyrics from prompt submit_music({ provider: "minimax", prompt: "Rainy night pop, melancholic chorus about leaving home", lyricsOptimizer: true, name: "Song · auto lyrics", }); ``` ```typescript // Music-cover (Settings model must be music-cover*) submit_music({ provider: "minimax", prompt: "Warm acoustic cover, intimate coffee-shop vibe", referenceAssetId: "audioAssetId", name: "Cover · acoustic", }); ``` ```typescript // Higher-quality WAV instrumental submit_music({ provider: "minimax", prompt: "Orchestral trailer hit", isInstrumental: true, audioFormat: "wav", sampleRate: 44100, bitrate: 256000, name: "Hit · wav", }); ``` -------------------------------- ### Start dev server with render concurrency override Source: https://github.com/0xsline/openchatcut/blob/main/MACOS-RENDER-TUNING.md Use this command to start the development server with a specific render concurrency for testing. Stop the existing development server first; an already-running process will not pick up a new environment variable. An isolated profile's saved settings.env overrides a shell value if that key is already saved there. ```bash OPENCHATCUT_RENDER_CONCURRENCY=4 npm run dev ``` -------------------------------- ### Submit complex multimodal job with submit_video Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/SKILL.md For complex multimodal jobs, build the full args object up front and pass it in a single call. This example includes firstFrame, refImages, refVideos, refAudios, durationSeconds, and ratio. ```ts submit_video({ model: "seedance2", prompt: "...", name: "...", firstFrame: "abc12345", refImages: ["def67890", "ghi24680"], refVideos: ["abc99999"], refAudios: ["jkl55555"], durationSeconds: 8, ratio: "9:16", }); ``` -------------------------------- ### submit_music examples for all providers and modes Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/music/SKILL.md Shows submit_music calls for Mureka (instrumental, song, prompt-song, soundtrack, track), MiniMax (t2m, cover), Atlas (t2m), and Sonilo (v2m). Each call uses provider-specific parameters; count can multiply charges, and Sonilo v2m uses a project video asset. ```TypeScript // Mureka instrumental (default count is deliberately 1) submit_music({ provider: "mureka", mode: "instrumental", prompt: "Warm lo-fi piano bed under narration", count: 1 }); // Mureka lyrics song submit_music({ provider: "mureka", mode: "song", prompt: "Bright modern pop", gender: "female", count: 2, lyrics: "[Verse]\nCity lights open the night\n[Chorus]\nWe build the future in real time", }); // Mureka prompt song submit_music({ provider: "mureka", mode: "prompt-song", prompt: "A hopeful road-trip anthem", styles: ["pop", "folk"] }); // Score a project video or image submit_music({ provider: "mureka", mode: "soundtrack", sourceAssetId: "videoAssetId", prompt: "Tense restrained documentary score" }); // Generate a stem from a Mureka song id submit_music({ provider: "mureka", mode: "track", songId: "song-id", trackType: "Drums", prompt: "Tight punchy acoustic drums" }); // MiniMax instrumental / vocals submit_music({ provider: "minimax", mode: "t2m", prompt: "Upbeat electronic tech intro", isInstrumental: true }); submit_music({ provider: "minimax", mode: "t2m", prompt: "Rainy night pop", lyricsOptimizer: true }); // MiniMax cover from a project audio asset submit_music({ provider: "minimax", mode: "cover", prompt: "Warm acoustic coffee-shop cover", referenceAssetId: "audioAssetId" }); // Atlas Cloud text-to-music submit_music({ provider: "atlas", mode: "t2m", prompt: "Cinematic ambient score with restrained piano", isInstrumental: true }); // Sonilo video-to-music from the rendered cut (prompt optional) submit_music({ provider: "sonilo", mode: "v2m", sourceAssetId: "renderedCutAssetId" }); submit_music({ provider: "sonilo", mode: "v2m", sourceAssetId: "renderedCutAssetId", prompt: "Warm indie folk, no drums" }); ``` -------------------------------- ### Image-to-video submission with firstFrame Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/seedance2.md Animates a known start frame. The aspect ratio becomes adaptive server-side, so no ratio parameter is needed. ```TypeScript submit_video({ model: "seedance2", firstFrame: "assetId", prompt: "The scene comes alive: soft wind, slow push-in, …", durationSeconds: 6, name: "Living still · push-in", }); // ratio becomes adaptive server-side ``` -------------------------------- ### submit_image examples for image generation Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/image-gen/SKILL.md Shows basic generation, quality option (gpt-image-2 only), reference images via referenceAssetIds, nano-banana reference-heavy use, multiple images with count, and MiniMax (image-01) with promptOptimizer disabled. Only pass imageSize "2K" or "4K" when explicitly requested; they are experimental. Reference asset ids are resolved server-side; accepted formats are png, jpeg, webp, svg (auto-rasterized), heic, heif, each ≤50MB. If a jobId is returned, use track_progress; otherwise treat asset ids as done. ```TypeScript // Basic generation submit_image({ model: "gpt-image-2", prompt: "a cute orange cat", name: "Cat", }); // With quality (gpt-image-2 only) submit_image({ model: "gpt-image-2", prompt: "hero poster with bold title", quality: "high", name: "Hero Poster", }); // With reference images — pass project asset ids; backend resolves bytes submit_image({ model: "gpt-image-2", prompt: "change background to beach", referenceAssetIds: [""], name: "Beach Edit", }); // Reference-heavy with nano-banana submit_image({ model: "nano-banana", prompt: "composite poster", referenceAssetIds: ["", ""], name: "Composite", }); // Multiple images submit_image({ model: "gpt-image-2", prompt: "product shots", count: 3, name: "Product", }); // MiniMax (optional single subject reference; R2 must be configured for refs) submit_image({ model: "image-01", prompt: "matte product bottle on marble, soft studio light", name: "Bottle still", promptOptimizer: false, }); ``` -------------------------------- ### Qwen Work MCP Configuration JSON Source: https://github.com/0xsline/openchatcut/blob/main/README.md Paste this JSON into 千问办公's custom MCP connector store. It uses streamable-http type with a bearer token header. Use the guide's Copy config button to get it. ```json { "mcpServers": { "openchatcut": { "type": "streamable-http", "url": "http://localhost:5199/api/external-mcp/mcp", "headers": { "Authorization": "Bearer " } } } } ``` -------------------------------- ### Hailuo optimizer knobs: literal and draft examples Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/hailuo.md Two submit_video calls for the Hailuo model. The first disables prompt optimization for a literal brand shot; the second enables fast pretreatment for a quick draft, which only works with the optimizer on (default). Both use durationSeconds 6. ```ts submit_video({ model: "hailuo", prompt: "Exact brand shot. [Static shot] No style rewrite.", durationSeconds: 6, promptOptimizer: false, // more literal name: "Literal brand", }); ``` ```ts submit_video({ model: "hailuo", prompt: "Quick draft street walk", durationSeconds: 6, fastPretreatment: true, // only with optimizer on (default) name: "Draft walk", }); ``` -------------------------------- ### Wait for transcription readiness Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/transcription/SKILL.md Example of calling track_progress with action 'wait' and target 'transcription' to wait for transcription to complete. The assetIds field should be set to the asset ID or prefix. ```json { "action": "wait", "target": "transcription", "assetIds": "13c1aa02cd" } ``` -------------------------------- ### GrayscaleEffect Class Implementation Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/references/design-principles.md Example effect extending EffectProcessor. In initialize, it compiles a fragment shader that converts to grayscale using dot product. In render, it passes the input texture and intensity uniform using the render pass. ```typescript export class GrayscaleEffect extends EffectProcessor { async initialize(ctx: EffectInitContext): Promise { ctx.compileShader({ id: "grayscale", fragmentShader: `#version 300 es precision highp float; uniform sampler2D u_input; uniform float u_intensity; in vec2 v_texCoord; out vec4 fragColor; void main() { vec4 color = texture(u_input, v_texCoord); float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114)); fragColor = vec4(mix(color.rgb, vec3(gray), u_intensity), color.a); }`, }); } protected render(ctx: EffectRenderContext): WebGLTexture { const props = ctx.properties as { intensity?: number } | undefined; return ctx.renderPass({ id: "grayscale", textures: { u_input: ctx.inputTexture }, uniforms: { u_intensity: props?.intensity ?? 1.0 }, }); } } ``` -------------------------------- ### edit_item built-in LUT effect example Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/SKILL.md Adds a built-in LUT effect (builtin:slog3-s709) to a clip with an intensity override. Use delete and re-add to swap LUTs, and delete to remove. ```text edit_item(json: '{"adds":[{"type":"effect","targetItemId":"","assetId":"builtin:slog3-s709","propertyOverrides":{"intensity":1}}]}') ``` -------------------------------- ### Audio reference submission with refAudios Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/seedance2.md Uses an audio reference to guide timing and mood. Audio alone is invalid; always pair with a visual channel (e.g., refImages). ```TypeScript submit_video({ model: "seedance2", refImages: ["subjectId"], refAudios: ["bedId"], prompt: "@Image1 character walks a rainy street; timing and mood follow @Audio1.", durationSeconds: 8, name: "Rain walk · audio-led", }); ``` -------------------------------- ### Example JSON form definition for ask_followup_questions Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/widget-forms/SKILL.md Use this JSON to configure an ask_followup_questions card with single and multi choice fields. The form presents a title and prompt, with a submit label and a message prefix. Note: this structure does not support custom HTML, timeline parameter bridges, editor item selection, or file upload fields. ```json { "title": "Your video idea", "prompt": "Choose or fill in what you have in mind so OpenChatCut can pick a good starting direction.", "submitLabel": "Send idea", "messagePrefix": "Continue with this video direction:", "fields": [ { "id": "goal", "label": "What's the main goal of this video?", "type": "single", "options": [ { "id": "product_intro", "label": "Product intro" }, { "id": "social_ad", "label": "Social ad" }, { "id": "__other__", "label": "Something else" } ] }, { "id": "elements", "label": "What should it include? (Select all that apply)", "type": "multi", "options": [ { "id": "broll", "label": "B-roll" }, { "id": "logo", "label": "Brand logo" }, { "id": "__other__", "label": "Something else" } ] } ] } ``` -------------------------------- ### Update OpenChatCut skill with npx skills update Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/known-errors.md Run when the skill baseline is newer. Updates the installed skill, then re-read its files. ```bash npx skills update openchatcut ``` -------------------------------- ### CubeTransition class with BoxGeometry and per-face materials Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/examples/cube-rotate.md Implements a 3D cube rotation transition. Uses BoxGeometry(1.5 * aspect, 1.5, 1.5 * aspect) so the cube face is square in the X/Z plane. Camera at z=2.5 with FOV 45 fills the viewport. Rotation around Y axis uses cubic easing: starts slow, accelerates, then decelerates. ```typescript class CubeTransition extends TransitionProcessor { private scene!: Scene; private camera!: PerspectiveCamera; private cube!: Mesh; private outMat!: MeshBasicMaterial; private inMat!: MeshBasicMaterial; async initialize(ctx: TransitionInitContext): Promise { const aspect = ctx.width / ctx.height; this.scene = new Scene(); this.camera = new PerspectiveCamera(45, aspect, 0.1, 1000); this.camera.position.z = 2.5; const geometry = new BoxGeometry(1.5 * aspect, 1.5, 1.5 * aspect); this.outMat = new MeshBasicMaterial(); this.inMat = new MeshBasicMaterial(); // Front face (index 4) and Right face (index 0) const materials = [ this.inMat, new MeshBasicMaterial({ color: 0x000000 }), new MeshBasicMaterial({ color: 0x000000 }), new MeshBasicMaterial({ color: 0x000000 }), this.outMat, new MeshBasicMaterial({ color: 0x000000 }), ]; this.cube = new Mesh(geometry, materials); this.scene.add(this.cube); } protected render(ctx: TransitionRenderContext): WebGLTexture { this.outMat.map = ctx.three.wrapTexture(ctx.outgoingTexture); this.inMat.map = ctx.three.wrapTexture(ctx.incomingTexture); // Cubic easing const p = ctx.progress; const eased = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2; this.cube.rotation.y = -eased * (Math.PI / 2); return ctx.threePass(this.scene, this.camera); } } ``` -------------------------------- ### Default OpenChatCut MCP endpoint Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/getting-started.md Default endpoint for the OpenChatCut MCP server. Start OpenChatCut first and use the endpoint shown in Settings → MCP; if desktop port 5199 was occupied, that page reflects the active fallback port. ```text http://localhost:5199/api/external-mcp/mcp ``` -------------------------------- ### Multi-character prompt template with NOT clauses Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/kling.md Use this prompt template for multi-character scenes to prevent attribute leakage. It specifies positions, distinct outfits and traits, explicit NOT clauses, and a fixed camera. The example shows a LEFT/RIGHT split with a man and woman, each with unique attributes and negations. ```text LEFT: @Image1 man — grey-blue tactical jacket, short beard. NOT red cape, NOT braid. RIGHT: @Image2 woman — red cape gold trim, long braid. NOT grey jacket, NOT short beard. Camera: fixed MS, both fully separated. Motion settles as both face camera, still. ``` -------------------------------- ### edit_item track-bound zoom effect examples Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/SKILL.md Two edit_item calls that add a builtin:zoom effect in track-bound mode. The first zooms the entire video clip; the second zooms a sub-range (frames 90-150) with a punch shape. Both require trackId, trackBoundFrom, and trackBoundDurationInFrames. ```text # Zoom on the entire video clip edit_item(json: '{"adds":[{"type":"effect","assetId":"builtin:zoom","mode":"track-bound","trackId":"","trackBoundFrom":,"trackBoundDurationInFrames":,"propertyOverrides":{"magnification":1.5,"shape":"hold"}}]}') ``` ```text # Zoom on a sub-range of the clip (e.g. frames 90–150 only, a punch zoom on a beat) edit_item(json: '{"adds":[{"type":"effect","assetId":"builtin:zoom","mode":"track-bound","trackId":"","trackBoundFrom":90,"trackBoundDurationInFrames":60,"propertyOverrides":{"magnification":2,"shape":"punch"}}]}') ``` -------------------------------- ### submit_voice examples for ElevenLabs, Doubao, MiniMax, and Cartesia Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/voice/SKILL.md Shows how to call submit_voice with different providers. ElevenLabs supports delivery controls like speed, stability, similarityBoost, and outputFormat. Doubao supports speedRatio, pitch, and loudnessRatio. MiniMax requires configuration (see references/minimax-tts.md). Cartesia requires a confirmed account voice ID (confirmedCartesiaVoiceId) and uses modelId sonic-3. ```TypeScript // English / multilingual via ElevenLabs submit_voice({ provider: "elevenlabs", text: "Hello world", voiceId: "peter", }); ``` ```TypeScript // Chinese via Doubao submit_voice({ provider: "doubao", text: "你好世界", voiceId: "liuchang", }); ``` ```TypeScript // With speed adjustment (Doubao only) submit_voice({ provider: "doubao", text: "这是一段稍快的中文旁白。", voiceId: "liuchang", speedRatio: 1.5, }); ``` ```TypeScript // With Doubao delivery controls (speed / loudness / native pitch) submit_voice({ provider: "doubao", text: "这次事故提醒我们,安全永远不能侥幸。", voiceId: "liuchang", pitch: -1, speedRatio: 0.92, loudnessRatio: 1.1, }); ``` ```TypeScript // With ElevenLabs delivery controls submit_voice({ provider: "elevenlabs", text: "The launch changed how teams plan their daily work.", voiceId: "peter", speed: 0.95, stability: 0.4, similarityBoost: 0.8, outputFormat: "wav_44100", }); ``` ```TypeScript // MiniMax TTS (when configured) — see references/minimax-tts.md submit_voice({ provider: "minimax", text: "欢迎使用视频编辑助手。", voiceId: "female-yujie", speed: 1, name: "VO · welcome", }); ``` ```TypeScript // Cartesia shape after the user confirms the exact account voice ID. // confirmedCartesiaVoiceId represents that supplied value, not a preset. submit_voice({ provider: "cartesia", text: "A concise product introduction.", voiceId: confirmedCartesiaVoiceId, modelId: "sonic-3", speed: 1, languageCode: "en", outputFormat: "mp3", }); ``` -------------------------------- ### Browse and place a sound effect from the library Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/voice/SKILL.md Use browse_library with category "sound-effects" to find a suitable sound, then place it with edit_item using the returned assetId and fromFrame as the anchor. The example shows a short whoosh transition placed at frame 120 on track A1. ```ts browse_library({ category: "sound-effects", query: "short whoosh transition", }); edit_item({ adds: [ { type: "audio", assetId: "library:sound:whoosh-short", fromFrame: 120, trackId: "A1", }, ], }); ``` -------------------------------- ### Retry transcription for stuck or failed ASR Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/transcription/SKILL.md Example of calling manage_transcript with action 'retry_transcription' and the asset id/prefix to force-retry ASR. This starts a new transcription run but does not wait for completion; follow with track_progress to wait. ```json { "action": "retry_transcription", "asset": "13c1aa02cd" } ``` -------------------------------- ### Run build, test, and lint commands Source: https://github.com/0xsline/openchatcut/blob/main/README.md Run these commands for type checking, production build, core regression checks, and static analysis. ```bash # Type checking and production build npm run build # Core regression checks npm test # Static analysis npm run lint ``` -------------------------------- ### submit_video with shotType: "customize" and multiPrompts Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/kling.md Omit the top-level prompt and provide 2-6 entries in multiPrompts. Each shot has a 1-based consecutive index, non-empty prompt ≤512 chars, and integer duration ≥1. The sum of durations must exactly equal durationSeconds. Repeat identity details in every shot prompt to preserve consistency. ```TypeScript submit_video({ model: "kling", shotType: "customize", durationSeconds: 12, ratio: "16:9", mode: "std", multiPrompts: [ { index: 1, duration: 4, prompt: "[Shot 1] WS. Slow dolly in. Key from camera-left window, 4500K warm amber. " + "Woman in grey coat enters cafe. Motion settles as she reaches the counter.", }, { index: 2, duration: 4, prompt: "[Shot 2] MCU. Static. Same woman, grey coat, short dark hair. She smiles at barista. " + "Motion settles as steam rises past her face.", }, { index: 3, duration: 4, prompt: "[Shot 3] CU. Very slow push-in. Hands take a paper cup. " + "Motion settles as both hands cradle the cup center-frame.", }, ], name: "Cafe storyboard · 3 shots", }); ``` -------------------------------- ### Open the editor at localhost:5199 Source: https://github.com/0xsline/openchatcut/blob/main/README.md Open this URL in a browser to access the editor. The editor requires a secure context, so use localhost or 127.0.0.1 on the machine running it, or serve over HTTPS. ```text http://localhost:5199 ``` -------------------------------- ### Submit video generation jobs with submit_video Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/SKILL.md Use submit_video to create text-to-video or image-to-video jobs. Supports seedance2 (default), kling, and hailuo models. For image-to-video, pass the project asset id as firstFrame; the server resolves the media URL. Kling requires a prior Model Selection check. Hailuo supports 6s or 10s durations, optional firstFrame/lastFrame (lastFrame requires firstFrame), and resolution options. After submission, poll with track_progress using action=status or action=wait. ```ts // Text-to-video (seedance2 default) submit_video({ model: "seedance2", prompt: "A cat walks across a sunny windowsill", name: "Cat on windowsill", }); // Image-to-video with seedance2 — pass the project asset id directly; the server resolves the asset's media URL submit_video({ model: "seedance2", prompt: "The scene comes to life, gentle breeze rustles the curtains", firstFrame: "abc12345", name: "Living room animation", }); // Kling text-to-video — only after Model Selection check submit_video({ model: "kling", prompt: "A sports car drifts around a wet corner", name: "Car drift shot", }); // MiniMax Hailuo — 6s or 10s; optional firstFrame / lastFrame (with first) submit_video({ model: "hailuo", prompt: "A ceramic cup steams on a wooden table, soft morning light [Push in]", durationSeconds: 6, resolution: "720p", name: "Coffee steam morning", }); ``` -------------------------------- ### edit_item add raw shape Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/known-errors/SKILL.md Shows the `edit_item` add raw shape. The new item goes inside the `adds` array of the `json` transaction. The second example is a simple video placement with `type`, `assetId`, and `fromFrame`. ```json { "json": "{\"adds\":[{...}]}" } ``` ```json { "json": "{\"adds\":[{\"type\":\"video\",\"assetId\":\"...\",\"fromFrame\":0}]}" } ``` -------------------------------- ### Register OpenChatCut MCP server with Codex Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/getting-started.md Register the OpenChatCut MCP server with Codex when it is missing. Export the token copied from Settings → MCP first. ```bash export OPENCHATCUT_MCP_TOKEN='' codex mcp add openchatcut \ --url http://localhost:5199/api/external-mcp/mcp \ --bearer-token-env-var OPENCHATCUT_MCP_TOKEN ``` -------------------------------- ### submit_video tool shape for Hailuo modes Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/hailuo.md Shows the submit_video call for text-to-video, image-to-video, and first+last frame modes. Text-to-video uses prompt only; image-to-video adds firstFrame; first+last adds lastFrame. Duration is 6s (or 10s with 720p), resolution 1080p forces 6s. Do not pass ratio, refImages, refVideos, refAudios, shotType, or multiPrompts. ```typescript // Text-to-video submit_video({ model: "hailuo", prompt: "…", // ≤2000 chars; optional [Push in] camera commands durationSeconds: 6, // or 10 with 720p resolution: "720p", // 1080p → duration 6 only name: "Descriptive pool name", }); // Image-to-video submit_video({ model: "hailuo", firstFrame: "imageAssetId", prompt: "The subject begins to move. [Push in]", durationSeconds: 6, resolution: "1080p", name: "Still · comes alive", }); // First + last frame submit_video({ model: "hailuo", firstFrame: "startImageId", lastFrame: "endImageId", prompt: "Smooth morph between the two frames; continuous camera.", durationSeconds: 6, name: "Frame morph A→B", }); ``` -------------------------------- ### OpenChatCut MCP Endpoint Source: https://github.com/0xsline/openchatcut/blob/main/README.md OpenChatCut exposes a Streamable HTTP MCP endpoint at this URL. The repository's root .mcp.json already contains the local connection. Before using timeline tools, run OpenChatCut and open the target project. ```text http://localhost:5199/api/external-mcp/mcp ``` -------------------------------- ### PageCurlTransition class implementation Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/shader-gen/examples/page-curl.md Defines a TransitionProcessor subclass. The initialize method sets up the scene, camera, and two planes: incomingMesh at z=-0.001 and a subdivided curlMesh. The render method deforms the curlMesh vertices each frame based on progress, the fold position, and three curl zones, then returns the Three.js pass texture. ```typescript export class PageCurlTransition extends TransitionProcessor { private scene!: Scene; private camera!: PerspectiveCamera; private curlMesh!: Mesh; private incomingMesh!: Mesh; private curlMat!: MeshBasicMaterial; private incomingMat!: MeshBasicMaterial; private aspect!: number; private W!: number; async initialize(ctx: TransitionInitContext): Promise { this.aspect = ctx.width / ctx.height; this.scene = new Scene(); const fov = 45; const fovRad = (fov * Math.PI) / 180; const dist = 1 / Math.tan(fovRad / 2); this.camera = new PerspectiveCamera(fov, this.aspect, 0.01, 100); this.camera.position.z = dist; this.W = 2 * this.aspect; const H = 2; this.incomingMat = new MeshBasicMaterial({ side: 2 }); this.incomingMesh = new Mesh( new PlaneGeometry(this.W, H), this.incomingMat, ); this.incomingMesh.position.z = -0.001; this.scene.add(this.incomingMesh); this.curlMat = new MeshBasicMaterial({ side: 2 }); this.curlMesh = new Mesh( new PlaneGeometry(this.W, H, 80, 80), this.curlMat, ); this.scene.add(this.curlMesh); } protected render(ctx: TransitionRenderContext): WebGLTexture { const p = ctx.progress; const eased = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2; this.incomingMat.map = ctx.three.wrapTexture(ctx.outgoingTexture); this.curlMat.map = ctx.three.wrapTexture(ctx.incomingTexture); const W = this.W; const radius = W * 0.08; const foldX = -W / 2 + eased * (W + radius * Math.PI); const pos = this.curlMesh.geometry.attributes.position; const uv = this.curlMesh.geometry.attributes.uv; const count = pos.count; for (let i = 0; i < count; i++) { const ox = uv.getX(i) * W - W / 2; const oy = uv.getY(i) * 2 - 1; let nx: number, nz: number; if (ox <= foldX) { nx = ox; nz = 0; } else { const delta = ox - foldX; const angle = delta / radius; if (angle <= Math.PI) { nx = foldX + radius * Math.sin(angle); nz = radius * (1 - Math.cos(angle)); } else { const extra = delta - radius * Math.PI; nx = foldX - extra; nz = radius * 2; } } pos.setXYZ(i, nx, oy, nz); } pos.needsUpdate = true; this.curlMesh.geometry.computeVertexNormals(); return ctx.threePass(this.scene, this.camera); } } ``` -------------------------------- ### Inventory table for tagging source assets by role Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/ecommerce-product-montage/references/material-roles.md Use this table to tag each source asset with its role, strength, and a note before planning the edit. Strength is a judgment, not a file property — the same clip can be strong in one role and useless in another. ```plaintext asset role strength note clip_04.mp4 hero demo strong real unboxing, natural light ugc_02.mp4 ugc reaction medium genuine laugh, but audio low review_01.png proof strong verbatim 5-star, on-brand broll_11.mp4 context b-roll weak pretty but unrelated to hook ``` -------------------------------- ### Submit multimodal Seedance 2 video generation job Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/seedance2.md Calls submit_video with model 'seedance2', a joined prompt describing shots and references, firstFrame, refImages, refVideos, refAudios, durationSeconds, and a descriptive name. The prompt uses @Image1, @Video1, @Audio1 ordinals that must match the payload order. The asset lands in the media pool only; use edit_item to place it on the timeline. ```TypeScript submit_video({ model: "seedance2", prompt: [ "9:16, 10s, cinematic product film.", "Shot 1 (0–3s): @Image1 bottle on marble, slow orbit, soft key from left.", "Shot 2 (3–7s): hand lifts bottle; motion energy follows @Video1 camera push.", "Shot 3 (7–10s): hero CU, label sharp; mood follows @Audio1.", "sharp details, no warping logo, stable reflections.", ].join(" "), firstFrame: "heroStillId", // @Image1 refImages: ["labelDetailId"], // @Image2 refVideos: ["orbitRefId"], // @Video1 refAudios: ["bedId"], // @Audio1 durationSeconds: 10, name: "Bottle hero · 10s multi-beat", }); ``` -------------------------------- ### Qoder MCP Configuration JSON Source: https://github.com/0xsline/openchatcut/blob/main/README.md This JSON configures the OpenChatCut MCP server in Qoder's settings file. It uses HTTP type with a bearer token header. Restart Qoder afterwards to load the server. ```json { "mcpServers": { "openchatcut": { "type": "http", "url": "http://localhost:5199/api/external-mcp/mcp", "headers": { "Authorization": "Bearer " } } } } ``` -------------------------------- ### Video Thumbnail Generation Prompt Template Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-thumbnail-generator/SKILL.md The standardized prompt structure for requesting thumbnail generation, including platform, aspect ratio, composition, real reference, text, style, and constraints. ```text [Platform] thumbnail, [aspect ratio / dimensions], [style name]. COMPOSITION: [subject position, scale, background, graphic balance] REAL REFERENCE: [describe selected frame zone by zone] TEXT: "[short title]" in [high-contrast style] STYLE: [one-line style recipe from references] CONSTRAINTS: readable at mobile size, no fake UI, no watermark, no play button. ``` -------------------------------- ### Generate custom sound effects with submit_sound Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/voice/SKILL.md Use submit_sound only when the user explicitly requests a generated sound, the library has no suitable match, or the sound is too specific. The examples show a basic prompt, a custom duration of 15 seconds (valid range 0.5-22), and a high promptInfluence of 0.8 for better adherence. ```ts // Custom/generated sound effect after the library has no suitable match submit_sound({ prompt: "A dog barking in the distance" }); // With custom duration (0.5-22 seconds) submit_sound({ prompt: "Thunder and heavy rain", durationSeconds: 15, }); // High prompt adherence submit_sound({ prompt: "Sci-fi laser gun firing", promptInfluence: 0.8, }); ``` -------------------------------- ### Progressive tool exposure URL Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/getting-started.md URL for progressive tool exposure. Clients that honor MCP tools/list_changed can reduce their initial prompt by negotiating progressive exposure. The equivalent request header is X-OpenChatCut-Tool-Exposure: progressive. The initial list keeps connection, session, project-read, ToolSearch, and load_skill tools; ToolSearch and load_skill expand only that transport session's list. Clients that cache one fixed tool list for the whole connection must use the default URL. ```text http://localhost:5199/api/external-mcp/mcp?toolExposure=progressive ``` -------------------------------- ### Text-to-video submission with seedance2 Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/seedance2.md Basic text-to-video generation using only a prompt. The prompt should follow an 8-element structure for best results. Duration and aspect ratio are specified. ```TypeScript submit_video({ model: "seedance2", prompt: "…", // 8-element structure preferred durationSeconds: 8, ratio: "9:16", name: "Descriptive pool name", }); ``` -------------------------------- ### edit_item retry with explicit trackId Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/known-errors/SKILL.md Example of an explicit `trackId` to include in an `edit_item` update when retrying after an overlap error. The error text is `Overlap: updated item at ... would overlap existing item at ... on this track.` Do not force the write or delete the conflicting item silently; retry with an available track or ask the user which layer should win. ```json "trackId":"V2" ``` -------------------------------- ### Codex MCP Configuration Source: https://github.com/0xsline/openchatcut/blob/main/README.md Add this TOML configuration to your Codex configuration to register the OpenChatCut MCP server. The URL points to the local Streamable HTTP endpoint. ```toml [mcp_servers.openchatcut] url = "http://localhost:5199/api/external-mcp/mcp" ``` -------------------------------- ### Run required checks after changes Source: https://github.com/0xsline/openchatcut/blob/main/README.md Run these commands after changing the agent, timeline, preview, or export paths. ```bash npx tsc -b --force npm test npm run build ``` -------------------------------- ### submit_image({ model: "image-01", … }) for MiniMax stills Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/image-gen/references/image-01.md Shows the required call shape for MiniMax image-01 generation with a normal prompt and a literal brand packshot variant that disables promptOptimizer. Pass at most one reference image in referenceAssetIds; R2 must be configured to supply a temporary signed URL. ```ts submit_image({ model: "image-01", prompt: "…", // ≤1500 chars name: "Descriptive still", aspectRatio: "16:9", count: 1, // max 9 seed: 42, }); // Literal brand packshot (less auto-rewrite) submit_image({ model: "image-01", prompt: "Exact product bottle, white seamless, label text as written", name: "Bottle literal", promptOptimizer: false, }); ``` -------------------------------- ### Check Codex MCP entry Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/getting-started.md Check the existing Codex MCP entry for openchatcut. ```bash codex mcp get openchatcut ``` -------------------------------- ### Register OpenChatCut MCP server with Claude Code Source: https://github.com/0xsline/openchatcut/blob/main/skills/openchatcut/references/getting-started.md Register the OpenChatCut MCP server with Claude Code using HTTP transport and a bearer token header. ```bash claude mcp add --transport http \ -H "Authorization: Bearer " \ openchatcut http://localhost:5199/api/external-mcp/mcp ``` -------------------------------- ### submit_video with shotType: "intelligence" Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/kling.md Pass a single top-level prompt describing the whole sequence. The model auto-decomposes into up to 6 shots. Use when quick multi-cut coverage is needed without per-shot durations. Include technical shot language (size, camera, motion) in the prompt for quality. ```TypeScript submit_video({ model: "kling", shotType: "intelligence", durationSeconds: 10, ratio: "9:16", prompt: "Two-shot dialogue then CU reaction. Shot reverse shot. " + "MCU on speaker A, then B. Soft key camera-left 4500K. " + "Motion settles as B looks down, breath steadies.", name: "Dialogue · intelligence multi", }); ``` -------------------------------- ### Candidate ledger JSON template Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/livestream-to-clips/SKILL.md Use this JSON template to record a compact candidate ledger entry for each clip candidate before heavy editing. It captures the source range, profile and confidence, event type, narrative arc, evidence categories, missing evidence, opening hook, standalone reason, risk flags, target duration, and packaging. The fields are placeholders to be filled with actual candidate data. ```json { "sourceRange": [0, 0], "profile": "talk", "profileConfidence": 0, "event": "", "arc": { "setup": [], "peak": [], "payoff": [] }, "evidence": { "speech": [], "visual": [], "audio": [], "interaction": [], "metadata": [] }, "missingEvidence": [], "openingHook": "", "standaloneReason": "", "riskFlags": [], "targetDuration": 0, "packaging": "" } ``` -------------------------------- ### Motion endpoint: prompt with and without 'Motion settles' Source: https://github.com/0xsline/openchatcut/blob/main/src/agent/skills/video-gen/references/kling.md Contrasts a prompt missing an endpoint with one that ends with 'Motion settles' to prevent stalls and mid-action cut-offs. Use for every shot, including single-shot, I2V, intelligence, and each customize entry. ```text ✗ A woman walks a rainy alley under neon. ✓ A woman walks a rainy alley under neon. Motion settles as she pauses under a red lantern, face half-turned to camera. ```