
Whiteboard Animation
Converts color images into whiteboard animation videos with that classic hand-drawn effect. You get a two-stage animation: first the sketch outline appears stroke by stroke, then the hand comes back through to add color. Works in single or batch mode, outputs H.264 MP4s, and the hand overlay is optional if you want just the drawing part. Best with white or light backgrounds. The batch mode is genuinely handy since it processes multiple images with custom durations for each, running them serially and giving you a summary at the end. Setup script handles the Python environment and OpenCV dependencies automatically, though you'll want Python 3.8 or higher already installed.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 7
- skills.sh installs
- 464
- GitHub stars
- 78
- last updated
- Aug 21, 2026
Install
$ npx -y skills add yangagent/whiteboard-animation-skill --skill whiteboard-animation --agent claude-codeInstalls into .claude/skills of the current project.
Files
白板手绘动画生成器
从输入图片生成白板手绘动画视频,动画分为两个阶段:
- 线稿绘制 — 手持笔在白板上逐步画出黑白线稿
- 上色 — 手持笔沿内容轮廓逐步涂上彩色,还原为原图
支持两种模式:单张模式和批量模式。
模式判断
- 用户提供单张图片路径 → 使用单张模式
- 用户提供多张图片路径(数组/列表) → 使用批量模式
单张模式工作流
第一步:准备环境
先用 --check 检测环境是否就绪:
python <skill目录>/scripts/setup_env.py --check
- 如果成功(退出码 0):最后一行输出
PYTHON_PATH=<路径>,捕获该路径用于后续步骤,直接跳到第二步 - 如果失败(退出码 1):运行完整安装:
python <skill目录>/scripts/setup_env.py
安装脚本会自动创建 .venv 虚拟环境并安装缺失依赖(opencv-python、numpy、av),最后一行同样输出 PYTHON_PATH=<路径>。
第二步:确认输入图片
从用户请求中获取图片路径,确认文件存在。支持格式:PNG、JPG、JPEG、BMP、TIFF。
白色或浅色背景的图片效果最佳。
第三步:确定参数
收集可选参数,所有参数都有合理的默认值:
| 参数 | 标志 | 默认值 | 说明 |
|---|---|---|---|
| 图片路径 | 位置参数(必填) | -- | 输入的彩色图片路径 |
| 输出目录 | --output-dir | ./output | 视频输出目录 |
| 时长 | --duration | 10000 | 视频总时长(毫秒) |
| 无手部 | --no-hand | 默认显示手 | 禁用手部覆盖效果 |
第四步:运行生成脚本
使用第一步获取的 PYTHON_PATH 运行生成脚本:
<PYTHON_PATH> <skill目录>/scripts/generate_whiteboard.py <图片路径> [--output-dir <目录>] [--duration <毫秒>] [--no-hand]
示例:
<PYTHON_PATH> <skill目录>/scripts/generate_whiteboard.py /path/to/photo.png --output-dir ./output --duration 20000
Sponsors
Details
- Repository
- github.com/yangagent/whiteboard-animation-skill
- Categories
- Design & UI/UX, Video & Audio Editing
- First seen
- Jun 3, 2026