Communitygithub.com

ComeOnOliver/skillshub

创建或管理当前项目的短视频片段(产品演示、营销短片、电影级镜头、UI 模拟)。默认使用 `sora-2` 和结构化提示增强工作流,并优先使用捆绑的 CLI 以进行确定性运行。注意:`$sora` 是提示中的技能标签,不是 shell 命令。

skillshub 是什么?

该技能用于在当前项目中通过 OpenAI Sora 模型生成或管理短视频,涵盖产品演示、营销广告、电影镜头和 UI 模拟等场景。它默认使用 `sora-2` 模型,并通过结构化的提示增强工作流来优化生成效果,同时提供可选的 CLI 工具(`scripts/sora.py`)以实现可复现的批量或单次任务。技能支持视频创建、基于 ID 的混音、状态轮询、资产下载以及批量处理,并能自动处理来自参考资料(如 `references/cinematic-shots.md`)的模板化提示。它要求配置 `OPENAI_API_KEY` 环境变量进行认证,并遵循严格的内容审核规则(如禁止受版权保护的角色、真实人物或不适合 18 岁以下受众的内容)。该技能主要面向 AI 代理(如 Claude Code、Cursor 或 Codex),通过清晰的决策树引导用户选择创建、混音、状态查询或批量操作,并利用提示增强模板和最佳实践来确保输出的一致性和质量。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/openai/skills/sora

在你喜欢的 AI 中提问

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

文档

Sora 视频生成技能

创建或管理当前项目的短视频片段(产品演示、营销短片、电影级镜头、UI 模拟)。默认使用 sora-2 和结构化提示增强工作流,并优先使用捆绑的 CLI 以进行确定性运行。注意:$sora 是提示中的技能标签,不是 shell 命令。

何时使用

  • 根据提示生成新的视频片段
  • 通过 ID 混音现有视频
  • 轮询状态、列出任务或下载资源(视频/缩略图/精灵图)
  • 批量运行(多个提示或多个变体)

决策树(创建 vs 混音 vs 状态/下载 vs 批量)

  • 如果用户有视频 ID 并希望修改 → 混音
  • 如果用户有视频 ID 并希望获取状态或资源 → 状态/轮询/下载
  • 如果用户需要多个提示/资源 → 创建-批量
  • 如果用户要求两个小幅改动的版本(相同镜头,不同主体/细节) → 先创建基础版,然后混音变体
  • 其他情况 → 创建(或者如果用户希望一步获取就绪资源,则 创建并轮询)

工作流程

  1. 决定意图:创建 vs 混音 vs 状态/下载 vs 批量。
  2. 收集输入:提示、模型、尺寸、时长以及任何输入参考图像。
  3. 如果是批量操作:在 tmp/ 下写入一个临时 JSONL 文件(每行一个任务),运行一次,然后删除该 JSONL 文件。
  4. 优先使用 CLI 增强标志(--use-case、--scene、--camera 等),而不是提前编写结构化提示。如果您已经生成了结构化提示文件,请传递 --no-augment 以避免双重包装。
  5. 使用捆绑的 CLI(scripts/sora.py)并采用合理的默认值(参见 references/cli.md)。对于长提示,优先使用 --prompt-file 以避免 shell 转义问题;如果提示已经结构化,请配合 --no-augment 使用。
  6. 对于异步任务,轮询直到完成(或使用 create-and-poll)。
  7. 下载资源(视频/缩略图/精灵图)并保存到本地。
  8. 删除调用期间创建的临时文件(例如 prompt.txt、remix_job.json、临时 JSONL)。如果沙箱阻止 rm,则跳过清理或将文件截断而不报错。
  9. 每次提示仅做一项有针对性的更改,迭代进行。

认证

  • 必须设置 OPENAI_API_KEY 才能进行实时 API 调用。

如果缺少密钥,请为用户提供以下步骤:

  1. 在 OpenAI 平台 UI 中创建 API 密钥:https://platform.openai.com/api-keys
  2. 将 OPENAI_API_KEY 设置为系统中的环境变量。
  3. 如有需要,主动引导用户根据其操作系统/shell 设置环境变量。
  • 切勿要求用户在聊天中粘贴完整密钥。请让用户本地设置密钥,并在准备就绪后确认。

默认值与规则

  • 默认模型:sora-2(使用 sora-2-pro 获得更高保真度)。
  • 默认尺寸:1280x720。
  • 默认时长:4 秒(允许的值:"4"、"8"、"12" 作为字符串)。
  • 始终通过 API 参数设置尺寸和时长;提示文字不会改变这些值。
  • 使用 OpenAI Python SDK(openai 包);不要使用原始 HTTP。
  • 在任何实时 API 调用之前都需要 OPENAI_API_KEY。
  • 如果 uv 缓存权限失败,设置 UV_CACHE_DIR=/tmp/uv-cache。
  • 输入参考图像必须为 jpg/png/webp 格式,并且应与目标尺寸匹配。
  • 下载 URL 有效期约 1 小时;请将资源复制到您自己的存储中。
  • 优先使用捆绑的 CLI,并且永远不要修改 scripts/sora.py,除非用户要求。
  • Sora 可以生成音频;如果用户要求画外音/音频,请在 Audio: 和 Dialogue: 行中明确指定,并保持简短。

API 限制

  • 模型仅限于 sora-2 和 sora-2-pro。
  • 对 Sora 模型的 API 访问需要经过组织验证的账户。
  • 时长限制为 4/8/12 秒,并且必须通过 seconds 参数设置。
  • API 期望 seconds 为字符串枚举类型("4"、"8"、"12")。
  • 输出尺寸因模型而异(参见 references/video-api.md 了解支持的尺寸)。
  • 视频创建是异步的;在下载前必须轮询完成状态。
  • 速率限制取决于使用层级(不列出具体限制)。
  • 内容限制由 API 强制执行(请参阅下面的防护栏)。

防护栏(必须强制)

  • 仅限适合 18 岁以下受众的内容。
  • 禁止受版权保护的角色或受版权保护的音乐。
  • 禁止真实人物(包括公众人物)。
  • 包含人脸图像的输入将被拒绝。

提示增强

将提示重新格式化为结构化的、面向生产的规范。仅将隐含细节显式化;不要凭空创造新的创意要求。

模板(仅包含相关行):

用途:<片段将用于何处>
主要请求:<用户的主要提示>
场景/背景:<地点、时间、氛围>
主体:<主要主体>
动作:<单一明确的动作>
镜头:<镜头类型、角度、运动>
灯光/情绪:<灯光 + 情绪>
调色板:<3-5 种颜色基调>
风格/格式:<电影/动画/格式提示>
时间/节拍:<计数或节拍>
音频:<环境提示/音乐/画外音(如果已请求)>
文本(逐字照录):"<确切文本>"
对话:
<对话>
- 说话者:"短句。"
</对话>
约束:<必须保留/必须避免>
避免:<负面约束>

增强规则:

  • 保持简短;仅添加用户已经暗示或在其他地方提供的细节。
  • 对于混音,明确列出不变项("相同镜头,仅更改 X")。
  • 如果任何关键细节缺失且阻碍成功,请提问;否则继续。
  • 如果您将结构化提示文件传递给 CLI,请添加 --no-augment 以避免工具重新包装它。

示例

生成示例(单镜头)

用途:产品预告
主要请求:展示一个哑光黑色相机放置在底座上,特写镜头
动作:4 秒内缓慢 30 度轨道环绕
镜头:85mm,浅景深,轻微的握持抖动
灯光/情绪:柔和主光,微妙的轮廓光,高级工作室感
约束:无 logo,无文字

混音示例(不变项)

主要请求:保持相同的镜头和构图,将调色板切换为青/沙/锈色,配合更暖的背光
约束:保持主体和镜头运动不变

提示最佳实践(简短列表)

  • 每个镜头一个主要动作 + 一个镜头运动。
  • 使用计数或节拍来指示时间("走两步,停下,转身")。
  • 对于 UI 或屏幕文字,保持文字简短并锁定镜头。
  • 当出现伪影(闪烁、抖动、快速运动)时,添加简短的避免行。
  • 较短的提示更具创意;较长的提示更可控。
  • 将对话放在专用块中;对于 4-8 秒的片段,保持每行简短。
  • 对于混音,明确说明不变项(相同镜头,相同镜头运动)。
  • 通过单项更改的后续提示进行迭代,以保持连续性。

按资产类型指导

当请求针对特定产物时,使用以下模块。它们提供了针对性的模板和默认值。

  • 电影级镜头:references/cinematic-shots.md
  • 社交广告:references/social-ads.md

CLI + 环境说明

  • CLI 命令 + 示例:references/cli.md
  • API 参数快速参考:references/video-api.md
  • 提示指导:references/prompting.md
  • 示例提示:references/sample-prompts.md
  • 故障排除:references/troubleshooting.md
  • 网络/沙箱提示:references/codex-network.md

参考映射

  • references/cli.md:如何通过 scripts/sora.py 运行创建/轮询/混音/下载/批量操作。
  • references/video-api.md:API 级别的控制项(模型、尺寸、时长、变体、状态)。
  • references/prompting.md:提示结构和迭代指导。
  • references/sample-prompts.md:可直接复制粘贴的提示配方(仅为示例;无额外理论)。
  • references/cinematic-shots.md:电影镜头的模板。
  • references/social-ads.md:简短社交广告节奏的模板。
  • references/troubleshooting.md:常见错误及其修复。
  • references/codex-network.md:网络/审批问题排查。

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能