sora
它能做什么
这项技能指导你的智能体使用 OpenAI 的 Sora API 制作短视频片段。适合需要 AI 生成视频用于演示、广告或镜头的创作者和营销人员。
适用场景
- ✓想根据文字提示生成一段新的短视频片段的时候。
- ✓想用视频 ID 对已有的 Sora 视频进行重混修改的时候。
- ✓需要查看任务状态,或下载视频、缩略图或雪碧图(spritesheet)的时候。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/sora/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用 Sora 生成一段 10 秒的产品演示视频,然后下载文件。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用附带的命令行工具创建视频任务,检查其状态,并下载完成的素材。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Sora Video Generation Skill
Creates or manages short video clips for the current project (product demos, marketing spots, cinematic shots, UI mocks). Defaults to sora-2 and a structured prompt augmentation workflow, and prefers the bundled CLI for deterministic runs. Note: $sora is a skill tag in prompts, not a shell command.
When to use
- Generate a new video clip from a prompt
- Remix an existing video by ID
- Poll status, list jobs, or download assets (video/thumbnail/spritesheet)
- Batch runs (many prompts or variants)
Decision tree (create vs remix vs status/download vs batch)
- If the user has a video id and wants a change → remix
- If the user has a video id and wants status or assets → status/poll/download
- If the user needs many prompts/assets → create-batch
- If the user asks for two versions with a small change (same shot, different subject/detail) → create the base, then remix for the variation
- Otherwise → create (or create-and-poll if they need a ready asset in one step)
Workflow
- Decide intent: create vs remix vs status/download vs batch.
- Collect inputs: prompt, model, size, seconds, and any input reference image.
- If batch: write a temporary JSONL under tmp/ (one job per line), run once, then delete the JSONL.
- Prefer CLI augmentation flags (
--use-case,--scene,--camera, etc.) instead of pre-writing a structured prompt. If you already produced a structured prompt file, pass--no-augmentto avoid double-wrapping. - Run the bundled CLI (
scripts/sora.py) with sensible defaults (see references/cli.md). For long prompts, prefer--prompt-fileto avoid shell-escaping issues; pair with--no-augmentif the prompt is already structured. - For async jobs, poll until complete (or use create-and-poll).
- Download assets (video/thumbnail/spritesheet) and save locally.
- Remove intermediate files created during invocation (for example
prompt.txt,remix_job.json, temp JSONL). If the sandbox blocksrm, skip cleanup or truncate the files without surfacing an error. - Iterate with a single targeted change per prompt.
Authentication
OPENAI_API_KEYmust be set for live API calls.
If the key is missing, give the user these steps:
- Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
- Set
OPENAI_API_KEYas an environment variable in their system. - Offer to guide them through setting the environment variable for their OS/shell if needed.
- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.
Defaults & rules
- Default model:
sora-2(usesora-2-profor higher fidelity). - Default size:
1280x720. - Default seconds:
4(allowed: "4", "8", "12" as strings). - Always set size and seconds via API params; prose will not change them.
- Use the OpenAI Python SDK (
openaipackage); do not use raw HTTP. - Require
OPENAI_API_KEYbefore any live API call. - If uv cache permissions fail, set
UV_CACHE_DIR=/tmp/uv-cache. - Input reference images must be jpg/png/webp and should match target size.
- Download URLs expire after about 1 hour; copy assets to your own storage.
- Prefer the bundled CLI and never modify
scripts/sora.pyunless the user asks. - Sora can generate audio; if a user requests voiceover/audio, specify it explicitly in the
Audio:andDialogue:lines and keep it short.
API limitations
- Models are limited to
sora-2andsora-2-pro. - API access to Sora models requires an organization-verified account.
- Duration is limited to 4/8/12 seconds and must be set via the
secondsparameter. - The API expects
secondsas a string enum ("4", "8", "12"). - Output sizes are limited by model (see
references/video-api.mdfor the supported sizes). - Video creation is async; you must poll for completion before downloading.
- Rate limits apply by usage tier (do not list specific limits).
- Content restrictions are enforced by the API (see Guardrails below).
Guardrails (must enforce)
- Only content suitable for audiences under 18.
- No copyrighted characters or copyrighted music.
- No real people (including public figures).
- Input images with human faces are rejected.
Prompt augmentation
Reformat prompts into a structured, production-oriented spec. Only make implicit details explicit; do not invent new creative requirements.
Template (include only relevant lines):
Use case: <where the clip will be used>
Primar
常见问题
使用它需要什么?
你需要 OPENAI_API_KEY,并且有权使用 Sora 视频 API。
能一次制作多个视频吗?
能。该技能支持根据提示词列表进行批量运行。
能修改我已经做好的视频吗?
能。该技能涵盖通过 ID 对已有视频进行重混。
详情
作者的原始描述
Use when the user asks to generate, remix, poll, list, download, or delete Sora videos via OpenAI\u2019s video API using the bundled CLI (`scripts/sora.py`), including requests like \u201cgenerate AI video,\u201d \u201cSora,\u201d \u201cvideo remix,\u201d \u201cdownload video/thumbnail/spritesheet,\u201d and batch video generation; requires `OPENAI_API_KEY` and Sora API access.
热度
- GitHub 星标
- 33k
- 排名
- #9094
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。