sn-code-video
它能做什么
这项技能根据代码制作短视频,例如讲解视频、动态图形和与音乐同步的影片。适合希望获得精确、可重复动效、而不是视频模型生成素材的创作者。
适用场景
- ✓当你想用代码制作讲解视频或动态图形时。
- ✓当你想用代码制作程序化动画或与音乐同步的影片时。
- ✓当你需要以 MP4 文件形式检查完成的视频时。
技能链接
https://github.com/OpenSenseNova/SenseNova-Skills/blob/main/skills/sn-code-video/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请制作一段 30 秒的动画讲解视频,介绍太阳能板如何工作,并渲染为 MP4。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体编写一个程序,在固定时间绘制每一帧,捕获这些帧并进行审查,然后把最终的画面和任何音频编码为 MP4。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
SN Code Video
A code video is a program frame(t) → image, sampled at t = i / fps and encoded. Almost every failure in this kind of work is one of four things: the film is never finished, the picture depends on wall-clock time, nobody looked at the frames, or the file does not match the brief. This skill prevents those four.
Setup and paths
Use a separate project folder for the video source, SPEC.md, build files, and outputs. Resolve SKILL_DIR to the absolute directory containing this SKILL.md, whether installed in the agent's skills directory or used from this repository. Run project commands from the video project folder; invoke bundled scripts through "$SKILL_DIR/scripts/..." so they do not depend on the current working directory. Set SKILL_DIR again in each shell session if needed.
Requirements: Node.js 18+ for browser capture, Python 3, FFmpeg/ffprobe with libx264 and AAC, and fonts covering the requested language. Install Playwright (with Chromium) or Puppeteer in the video project; the capture helper resolves its packages there first. Python audio dependencies are listed in requirements.txt; edge-tts needs network access, and faster-whisper needs downloaded model weights for transcription checks. Install only the tools required by the chosen renderer and audio workflow. Setup and invocation examples: English guide / 中文指南 in the source repository; these repository guides are not required when the skill folder is installed on its own.
Deliver the playable MP4, source code and reproduction commands, SPEC.md, VERIFY.md, and a contact sheet. Audio stems and timing data belong in the project when sound is used.
0. Read the craft guides you need
Reference paths are relative to this skill folder; output and input paths in commands are relative to the video project. Besides this file it holds craft guides in references/ and helper scripts in scripts/ (audio packages in requirements.txt). Read every guide that matches the request before writing SPEC.md; most videos need two or three.
| Guide | Read when the request has… |
|---|---|
references/explainer-diagrams.md |
anything to teach or explain: math, science, history, processes, data |
references/stylized-looks.md |
a named style, medium or artist (ink wash, pixel art, cut paper, vaporwave, watercolour, …) |
references/simulations-and-generative.md |
particles, flocks, cellular automata, physics, fields, shaders, generative patterns |
references/character-and-creature-motion.md |
people, animals or creatures that move or act |
references/threejs-scenes-and-cameras.md |
a 3D scene, product or camera move |
references/motion-graphics-and-promos.md |
kinetic type, UI, logos, product or brand promos |
references/sound-design-and-narration.md |
any audio: narration, music, effects, ambience |
references/music-and-beat-sync.md |
music-led films, beat-cut picture, supplied tracks or lyrics |
A request that names a style always needs references/stylized-looks.md, and a film with any audio always needs references/sound-design-and-narration.md.
1. Finish the film
- The deliverable is a playable video that meets the brief. Code, stills, a plan or a preview are intermediate results. Keep working until the final file exists and has passed section 6.
- Decide composition, palette, easing and implementation details yourself and note the choices in
SPEC.md. Ask the user only about the few open choices that would change the whole film (for example language, aspect ratio, length, or whether there is a voice), and only when you can ask; otherwise choose a sensible default and say which. - Budget the time. Get a rough full-length render early (even ugly), then improve it. A finished, slightly plain film beats an unfinished ambitious one.
- Timebox sub-problems. If one problem (recalling an exact pattern or constant, tuning one effect, chasing one bug) has taken about 30 minutes without visible progress, change approach: simplify the effect
常见问题
它会用 AI 视频模型生成画面吗?
不会。它用于代码驱动的视频,而不是视频生成模型产生的素材。
它需要哪些工具?
它需要 Node.js、Python 和 FFmpeg,以及浏览器捕获工具和所用语言的字体。
它适用于普通网页应用吗?
不适用。它用于渲染视频,而不是一般的网页应用或滚动驱动的故事。
详情
作者的原始描述
Create and revise code-driven videos with Canvas, SVG, HTML/CSS, Three.js, Remotion, Manim, or p5.js, including sound, deterministic frame capture, visual review, and MP4 verification. Use for rendered explainers, procedural animations, motion graphics, promos, and music-synchronized films; not for general web apps, scroll-driven HTML stories, or footage generation with video models.
热度
- GitHub 星标
- 6.0k
- 排名
- #14458
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
sn-image-base
6.0k为其他技能提供底层工具,使用 SenseNova 服务生成图片、识别图片内容并优化文字。
sn-image-doctor
6.0k检查 SenseNova-Skills 是否已安装、Python 包是否齐全、所需 API 密钥是否配置,并把缺失的密钥保存到文件。
sn-image-imitate
6.0k帮你的智能体创建新图片,复制参考图的风格,同时把内容改为符合你要求的画面。
sn-image-resume
6.0k帮你的智能体把简历文字转换为设计感强的作品集风格简历图片,并可选择风格。