Communitygithub.com

0xsline/openchatcut

透過 Fal.ai、gpt-image-2、nano-banana、MiniMax image-01 和 xAI Grok Imagine 生成 AI 圖片。當使用者要求產生或建立圖片時使用。

openchatcut 是什麼?

此技能讓 AI 代理能根據使用者提示,透過多種 AI 模型產生高品質圖片。它支援 Fal.ai、OpenAI 的 gpt-image-2、nano-banana(擅長參考圖片保留)、MiniMax image-01 和 xAI Grok Imagine 等模型,每種模型各有優勢,例如文字渲染、提示遵循度或影像保真度。技能會根據使用者需求或可用的供應商 API 金鑰自動選擇最適合的模型。代理必須在提交前閱讀所選模型的專屬參考文件以確保正確使用。工具參數包括長寬比、圖片大小、品質、參考資產 ID 和生成數量,並提供嚴格的預設值與提示機制,避免未經使用者同意自動升級尺寸。程式碼範例展示基本生成、搭配參考圖片編輯,以及使用不同模型的一次生成多張圖片。結果可能同步回傳資產 ID,或非同步回傳 jobId 需透過 `track_progress` 追蹤。此技能適用於 Claude Code、Cursor 和 Codex 等 AI 編碼平台。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

圖片生成

透過 submit_image 生成 AI 圖片(僅使用已設定的供應商金鑰)。除非使用者要求變化版本,否則每次請求以生成一張清晰的靜態圖片為優先。

模型選擇

模型參考文件優勢最大參考圖片數
fal + falModelreferences/fal.md明確的 Fal 型錄;每模型限制請見工具 schema依模型而異
gpt-image-2references/gpt-image-2.md最佳文字渲染,最強的提示遵循度16
nano-bananareferences/nano-banana.md最強的參考圖片保真度14
image-01references/image-01.mdMiniMax 靜態圖片 / 直播風格;透過 R2 支援單一主體參考1
grok-imaginereferences/grok-imagine.mdxAI Grok Imagine;文生圖,最多 4 張輸出,1K/2K0
  • 若選擇或要求 Fal.ai,請使用 model: "fal" 以及要求的 falModel,或使用能力資訊中儲存的 Fal 預設模型。若未選擇,請詢問使用者。原生供應商的預設值與下方控制項不適用於 Fal。
  • 預設模型:當 gpt-image-2 金鑰已設定時,預設使用 gpt-image-2。
  • 參考圖片數量多時 → 使用 nano-banana。
  • 使用者指定 MiniMax,或僅有 MiniMax 圖片金鑰已設定時 → 使用 image-01。
  • 尊重能力配置:不要呼叫供應商金鑰未設定的模型。

重要: 生成前,請先閱讀所選模型的參考文件。

工具參數

參數值預設值
aspectRatio1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:916:9
imageSize512px, 1K, 2K, 4K (依模型而異)1K
width / heightGPT Image: 512–3840,需能被 16 整除;MiniMax: 512–2048,需能被 8 整除—
qualitylow, medium, high, auto (僅限 gpt-image-2)high
referenceAssetIds專案資產 ID 陣列 — 後端會從伺服器端解析位元組—
name簡短描述性的資產名稱,會顯示在素材庫中—
count要生成的圖片數量 (1–10;image-01 最多 9 張)1
promptOptimizer僅限 MiniMax image-01 — prompt_optimizerfalse
seed僅限 MiniMax image-01—
maskAssetId, background, moderation, inputFidelityGPT Image 編輯/輸出控制項—
outputFormat, outputCompressionGPT Image PNG/JPEG/WebP 控制項PNG

預設值

  • 長寬比:16:9。若專案構圖不是 16:9,請先詢問使用者想使用的長寬比再生成。
  • 尺寸:1K。

送出前務必詢問

  • 絕不自動升級尺寸。
  • 僅在使用者明確要求時,才傳入 imageSize: "2K" 或 "4K"。請警告使用者 2K/4K 為實驗性功能,可能較慢。

參考圖片

當使用者提供素材進行編輯、合成,或作為視覺指引時使用(例如「更換背景」、「將這些合成為一張海報」)。

  • 透過 referenceAssetIds 傳入專案資產 ID。後端會從伺服器端擷取並編碼這些資產 — 請勿自行擷取資產位元組。
  • 當使用者 @-參考 一個圖片資產時,請直接將其 ID 傳入 referenceAssetIds。
  • 後端接受的格式:png, jpeg, webp, svg(自動柵格化為 png), heic, heif。每個檔案 ≤ 50MB。

執行

// 基本生成
submit_image({
  model: "gpt-image-2",
  prompt: "一隻可愛的橘貓",
  name: "貓咪",
});

// 搭配品質設定 (僅限 gpt-image-2)
submit_image({
  model: "gpt-image-2",
  prompt: "英雄海報,粗體標題",
  quality: "high",
  name: "英雄海報",
});

// 搭配參考圖片 — 傳入專案資產 ID;後端解析位元組
submit_image({
  model: "gpt-image-2",
  prompt: "將背景更換為沙灘",
  referenceAssetIds: ["<assetId>"],
  name: "沙灘編輯",
});

// 參考圖片數量多時使用 nano-banana
submit_image({
  model: "nano-banana",
  prompt: "合成海報",
  referenceAssetIds: ["<id1>", "<id2>"],
  name: "合成海報",
});

// 多張圖片
submit_image({
  model: "gpt-image-2",
  prompt: "產品照",
  count: 3,
  name: "產品",
});

// MiniMax (可選的單一主體參考;使用參考圖片需先設定 R2)
submit_image({
  model: "image-01",
  prompt: "霧面產品瓶罐放置於大理石上,柔和棚燈",
  name: "瓶罐靜態照",
  promptOptimizer: false,
});

OpenChatCut 的 submit_image 可能會根據供應商路徑同步回傳已完成的素材庫資產。若回傳 jobId,請使用 track_progress;否則將結果中的資產 ID 視為已處理完成。

規則

  • 務必提供 name,使用簡短描述性的資產名稱。
  • 送出前,簡短告知使用者你即將生成的內容 — 尤其是在生成多張圖片時。
  • 僅呼叫其供應商金鑰已設定(根據能力提示)的模型。

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

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.

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.

相關技能