Community编程与开发github.com

视频生成

当用户请求生成、创建或想象视频时使用此技能。支持结构化提示词和参考图像,实现引导式视频生成。

视频生成 是什么?

视频生成技能提供了一种自动化、高质量的视频创作方案,适用于AI代理场景。它允许用户基于结构化JSON提示词生成视频,并可选地使用参考图像作为引导帧或首尾帧。该技能支持通过Python脚本执行生成,并兼容多种后端提供者(如Gemini Veo、MiniMax),通过环境变量自动选择或强制指定。核心工作流包括分析用户需求、创建结构化提示JSON文件、可选生成参考图像、最后调用生成脚本输出视频文件。对于开发者而言,该技能简化了与AIGC视频生成API的集成,支持精确控制视频内容、风格、摄影机运动及音频元素,并提供了完整的输出处理与迭代优化流程。

兼容平台~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)

[!注意] 不要读取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,异步三步轮询/下载)
  • 强制指定: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.

相关技能