Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of claude-short-video-generator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/zai39911-claude-short-video-generator)
---
name: claude-short-video-generator
description: Make an animated coding Short (YouTube Shorts, TikTok, Reels; 1080x1920 MP4) with AI voiceover, word-by-word captions and music from one coding tip.
---
# Claude Short Video Generator — skill
Use this when the user asks for a short vertical video that explains a coding tip (CSS, HTML, JavaScript, PHP, WordPress, Python, ...). For a new video every day that is also scheduled on YouTube, TikTok and Facebook, use the companion `daily-short-autopost` skill, which calls this one to make the video.
## Setup (once per session)
1. **Get the engine.**
- If the folder containing this `SKILL.md` also contains `shortgen/` (the ZIP from `dist/` was installed), copy that whole folder to a writable working directory, e.g. `cp -r <skill folder> ./shortgen-work && cd shortgen-work`.
- Otherwise clone it: `git clone --depth 1 https://github.com/Zai39911/claude-short-video-generator && cd claude-short-video-generator`.
2. `pip install -r requirements.txt` (add `--break-system-packages` if pip refuses). Check `ffmpeg -version`; install it if missing.
3. Branding: if the user has a brand, copy `brand.example.json` to `brand.json` in the working directory and fill in name, logo letter, colours and end-card text. Otherwise the default "DevShorts" brand is used.
4. The first render downloads the Kokoro voice model (~90 MB, from github.com) to `~/.cache/shortgen`. If the download is blocked, tell the user their Claude settings must allow code to reach github.com and pypi.org.
## Make a video
1. **Facts first.** Verify every technical claim (syntax, versions, browser support, dates) against official docs (MDN, php.net, python.org, developer.wordpress.org, ...). Never invent numbers.
2. Pick a format and copy its example to `examples/<topic>.py`:
- **Hook-first (recommended for Shorts, 20–40 s):** `examples/hook_wp_enqueue.py`. Scene 0 is `Z.hook_scene(...)`, fully visible at frame 0 (it's the scroll-stopper and the thumbnail): an alert chip (`STOP!`, `WARNING`, `DON'T DO THIS`, `NEVER DO THIS`), 3–8 huge words with one in `Z.RED`/`Z.YELLOW`, an optional yellow `sub` line and `icon='warn'` or `'cross'`. Hook text is a fear, mistake or result ("Your site is SLOW because of THIS"), never a bare function name. Give it one spoken sentence under ~2.5 s. Run with `Z.run(..., hook=True)`. End with a line that loops back into the hook.
- **Classic (35–60 s):** `examples/css_clamp.py` (full reference) or `examples/_template.py`.
3. Write `LINES = [(scene, spoken, subtitle), ...]`:
- 1–3 short sentences per scene. Cut anything that doesn't move the tip forward.
- Spell tricky words in the *spoken* text ("C S S", "P H P", "J S O N", "seven point one") and keep normal spelling in the subtitle.
- Classic format: end with `LINES = Z.add_end_scene_voice(LINES, last_index)`.
4. Write one function per scene `def sN(t, D, c)` that returns a frame:
- Start with `fr = Z.new_frame()` and a title from `Z.caption(...)` (it auto-fits the width).
- Content goes between y 380 and `Z.SUB_TOP` (1270), x from `Z.SAFE_X0` to `Z.SAFE_X1`. **Nothing below y 1536.**
- Use `Z.code_card` for code (≤30 chars per line at mono 40, ≤36 at mono 34), `Z.highlight_token` or `chip` to point at the key part, `Z.browser` for page demos, and `check`/`cross` for good and bad.
- Time animations from cue starts `c[i]['start']`, so visuals match the narration.
- Finish with `Z.cue_subs(fr, t, c)`. The last scene is `Z.end_scene`.
- Full helper list: `docs/API.md`.
5. Run `python examples/<topic>.py sheet` and **look at** `out/<topic>/sheet.png` (with `hook=True` the first still is the hook at t=0 and must be readable at thumbnail size). Fix overlaps or overflow, then repeat.
6. Run `python examples/<topic>.py`, then check frame 0 and 2–3 other frames of the final MP4 (`ffmpeg -i X.mp4 -frames:v 1 f0.png`).
7. Give the user the MP4 (and the `_small.mp4` copy under 3.8 MB for upload tools) plus a suggested title (≤70 chars), description, hashtags and tags.
## Don'ts
- Don't upload or post anywhere unless the user explicitly asks and a proper tool is available. For daily scheduling on YouTube, TikTok and Facebook, use the `daily-short-autopost` skill.
- Don't use other people's logos, characters, music or footage.
- Don't put anything in the bottom 20% of the frame.