Community程式設計與開發github.com

影片生成

當使用者要求生成、創作或想像影片時使用此技能。支援結構化提示詞和參考圖片以引導生成。

影片生成 是什麼?

這個技能透過結構化 JSON 提示詞和 Python 腳本,實現高品質影片的自動化生成。使用者可定義主題、風格、技術規格,並可選擇提供參考圖片作為引導或影片的首尾幀。工作流程分為三個步驟:理解需求、建立結構化 JSON 提示詞檔案、以及透過 generate.py 腳本執行生成。腳本支援 --prompt-file、--reference-images、--output-file 和 --aspect-ratio 等參數,並會自動根據環境變數 GEMINI_API_KEY 或 MINIMAX_API_KEY 選擇 Gemini Veo 或 MiniMax 作為後端提供者。生成完成後,影片會儲存至 /mnt/user-data/outputs/,並透過 present_files 工具分享給使用者。

相容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/bytedance/deer-flow/tree/main/skills/public/video-generation

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

影片生成技能

總覽

此技能使用結構化提示詞和 Python 腳本生成高品質影片。工作流程包括建立 JSON 格式的提示詞,並可選擇性地使用參考圖片來執行影片生成。

核心能力

  • 為 AIGC 影片生成建立結構化的 JSON 提示詞
  • 支援參考圖片作為引導或影片的首尾幀
  • 透過自動化的 Python 腳本執行來生成影片

工作流程

步驟 1:了解需求

當使用者請求生成影片時,需辨識以下項目:

  • 主體/內容:影片中應包含什麼
  • 風格偏好:藝術風格、氛圍、色調
  • 技術規格:長寬比、構圖、光線
  • 參考圖片:可引導生成的任何圖片
  • 不需要檢查 /mnt/user-data 下的資料夾

步驟 2:建立結構化提示詞

在 /mnt/user-data/workspace/ 目錄下建立一個結構化的 JSON 檔案,命名模式為:{描述性名稱}.json

步驟 3:建立參考圖片(可選,當圖片生成技能可用時)

為影片生成建立參考圖片。

  • 如果只提供 1 張圖片,則將其用作影片的引導幀

步驟 3:執行生成

呼叫 Python 腳本:

python /mnt/skills/public/video-generation/scripts/generate.py \
  --prompt-file /mnt/user-data/workspace/prompt-file.json \
  --reference-images /path/to/ref1.jpg \
  --output-file /mnt/user-data/outputs/generated-video.mp4 \
  --aspect-ratio 16:9

參數:

  • --prompt-file:JSON 提示詞檔案的絕對路徑(必要)
  • --reference-images:參考圖片的絕對路徑(可選)
  • --output-file:輸出影片檔案的絕對路徑(必要)
  • --aspect-ratio:生成影片的長寬比(可選,預設:16:9)

[!NOTE] 請勿讀取 python 檔案,只需使用參數直接呼叫它。

影片生成範例

使用者請求:「生成一段描述《納尼亞傳奇:獅子·女巫·魔衣櫥》開場畫面的短影片片段」

步驟 1:在網路上搜尋《納尼亞傳奇:獅子·女巫·魔衣櫥》的開場畫面

步驟 2:建立包含以下內容的 JSON 提示詞檔案:

{
  "title": "納尼亞傳奇 - 火車站告別",
  "background": {
    "description": "二戰疏散場景,在擁擠的倫敦火車站。蒸氣和煙霧瀰漫空氣中,孩子們正被送往鄉下以躲避倫敦大轟炸。",
    "era": "1940 年代戰時英國",
    "location": "倫敦火車站月台"
  },
  "characters": ["佩文西太太", "露西·佩文西"],
  "camera": {
    "type": "雙人特寫鏡頭",
    "movement": "靜態帶輕微手持晃動",
    "angle": "側面視角,親密構圖",
    "focus": "兩張臉都對焦,背景柔化散景"
  },
  "dialogue": [
    {
      "character": "佩文西太太",
      "text": "親愛的,你要為了我堅強起來。我會來找你的……我保證。"
    },
    {
      "character": "露西·佩文西",
      "text": "我會的,媽媽。我保證。"
    }
  ],
  "audio": [
    {
      "type": "火車汽笛聲(表示發車)",
      "volume": 1
    },
    {
      "type": "弦樂情感湧動,然後漸弱",
      "volume": 0.5
    },
    {
      "type": "火車站的環境音",
      "volume": 0.5
    }
  ]
}

步驟 3:使用圖片生成技能建立參考圖片

載入圖片生成技能,並根據該技能生成一張參考圖片 narnia-farewell-scene-01.jpg。

步驟 4:使用 generate.py 腳本生成影片

python /mnt/skills/public/video-generation/scripts/generate.py \
  --prompt-file /mnt/user-data/workspace/narnia-farewell-scene.json \
  --reference-images /mnt/user-data/outputs/narnia-farewell-scene-01.jpg \
  --output-file /mnt/user-data/outputs/narnia-farewell-scene-01.mp4 \
  --aspect-ratio 16:9

請勿讀取 python 檔案,只需使用參數直接呼叫它。

輸出處理

生成完成後:

  • 影片通常會儲存在 /mnt/user-data/outputs/ 目錄中
  • 使用 present_files 工具將生成的影片(優先)以及適用的生成圖片分享給使用者
  • 提供生成結果的簡短說明
  • 如果需要調整,可提供疊代修改的選項

注意事項

  • 無論使用者使用何種語言,提示詞一律使用英文
  • JSON 格式確保提示詞結構化且可解析
  • 參考圖片能大幅提升生成品質
  • 為獲得最佳結果,疊代調整是正常流程

提供者(Gemini / MiniMax)

由環境變數自動選擇(CLI 不變):

  • 設定 GEMINI_API_KEY → Gemini Veo(預設,不變)。
  • 僅設定 MINIMAX_API_KEY → MiniMax 影片(/v1/video_generation,非同步 3 步驟輪詢/下載)。
  • 使用 VIDEO_GENERATION_PROVIDER=gemini|minimax 強制指定。

MiniMax 覆蓋:MINIMAX_API_HOST(預設 https://api.minimaxi.com), MINIMAX_VIDEO_MODEL(預設 MiniMax-Hailuo-2.3)。第一個參考圖片被用作 MiniMax 的 first_frame_image。MiniMax 忽略 --aspect-ratio(它使用解析度/持續時間)。

Individual skills in this repo

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

academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints, or scientific publications. Supports comprehensive structured reviews covering methodology assessment, contribution evaluation, literature positioning, and constructive feedback generation. Trigger on queries involving paper URLs, uploaded PDFs, arXiv links, or requests like "review this paper", "analyze this research", "summarize this study", or "write a peer review".

bootstrap

Generate a personalized SOUL.md through a warm, adaptive onboarding conversation. Trigger when the user wants to create, set up, or initialize their AI partner's identity — e.g., "create my SOUL.md", "bootstrap my agent", "set up my AI partner", "define who you are", "let's do onboarding", "personalize this AI", "make you mine", or when a SOUL.md is missing. Also trigger for updates: "update my SOUL.md", "change my AI's personality", "tweak the soul".

bytedance/academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints, or scientific publications. Supports comprehensive structured reviews covering methodology assessment, contribution evaluation, literature positioning, and constructive feedback generation. Trigger on queries involving paper URLs, uploaded PDFs, arXiv links, or requests like "review this paper", "analyze this research", "summarize this study", or "write a peer review".

bytedance/chart-visualization

This skill should be used when the user wants to visualize data. It intelligently selects the most suitable chart type from 26 available options, extracts parameters based on detailed specifications, and generates a chart image using a JavaScript script.

bytedance/claude-to-deerflow

Interact with DeerFlow AI agent platform via its HTTP API. Use this skill when the user wants to send messages or questions to DeerFlow for research/analysis, start a DeerFlow conversation thread, check DeerFlow status or health, list available models/skills/agents in DeerFlow, manage DeerFlow memory, upload files to DeerFlow threads, or delegate complex research tasks to DeerFlow. Also use when the user mentions deerflow, deer flow, or wants to run a deep research task that DeerFlow can handle.

bytedance/consulting-analysis

Use this skill when the user requests to generate, create, or write professional research reports including but not limited to market analysis, consumer insights, brand analysis, financial analysis, industry research, competitive intelligence, investment due diligence, or any consulting-grade analytical report. This skill operates in two phases — (1) generating a structured analysis framework with chapter skeleton, data query requirements, and analysis logic, and (2) after data collection by other skills, producing the final consulting-grade report with structured narratives, embedded charts, and strategic insights.

bytedance/data-analysis

Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to CSV/JSON/Markdown.

bytedance/deep-research

Use this skill instead of WebSearch for ANY question requiring web research. Trigger on queries like "what is X", "explain X", "compare X and Y", "research X", or before content generation tasks. Provides systematic multi-angle research methodology instead of single superficial searches. Use this proactively when the user's question needs online information.

bytedance/find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

bytedance/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

bytedance/github-deep-research

Conduct multi-round deep research on any GitHub Repo. Use when users request comprehensive analysis, timeline reconstruction, competitive analysis, or in-depth investigation of GitHub. Produces structured markdown reports with executive summaries, chronological timelines, metrics analysis, and Mermaid diagrams. Triggers on Github repository URL or open source projects.

bytedance/image-generation

Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.

bytedance/podcast-generation

Use this skill when the user requests to generate, create, or produce podcasts from text content. Converts written content into a two-host conversational podcast audio format with natural dialogue.

bytedance/ppt-generation

Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Creates visually rich slides by generating images for each slide and composing them into a PowerPoint file.

bytedance/skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

bytedance/surprise-me

Create a delightful, unexpected "wow" experience for the user by dynamically discovering and creatively combining other enabled skills. Triggers when the user says "surprise me" or any request expressing a desire for an unexpected creative showcase. Also triggers when the user is bored, wants inspiration, or asks for "something interesting".

bytedance/vercel-deploy

Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link.

bytedance/video-generation

Use this skill when the user requests to generate, create, or imagine videos. Supports structured prompts and reference image for guided generation.

bytedance/web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

chart-visualization

This skill should be used when the user wants to visualize data. It intelligently selects the most suitable chart type from 26 available options, extracts parameters based on detailed specifications, and generates a chart image using a JavaScript script.

相關技能