Use when the user wants YouTube thumbnails for a video, for example 3 different thumbnails for an A/B test in YouTube "Test & compare", with or without their face. Used standalone and by /produce-video. Triggers on "youtube thumbnail", "youtube thumbnails", "make a thumbnail", "thumbnails for my video", "thumbnail A/B test", "/youtube-thumbnail".
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 Youtube Thumbnail?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/alemtuzlak-youtube-thumbnail)
---
name: youtube-thumbnail
description: Use when the user wants YouTube thumbnails for a video, for example 3 different thumbnails for an A/B test in YouTube "Test & compare", with or without their face. Used standalone and by /produce-video. Triggers on "youtube thumbnail", "youtube thumbnails", "make a thumbnail", "thumbnails for my video", "thumbnail A/B test", "/youtube-thumbnail".
---
# YouTube Thumbnail
Make **3 thumbnails** for one video, one for each of its 3 titles. YouTube "Test & compare" shows title N with thumbnail N. The test needs 3 thumbnails that clearly differ, so each one has its own layout and its own palette.
Each thumbnail is an HTML template from `templates/`. Fill its `{{tokens}}`, then render it to a PNG with the HyperFrames `snapshot` command.
In the commands below, `<SKILL_DIR>` is the folder of this skill (the folder of this `SKILL.md`), and `<OUT>` is the output folder.
## Rules (non-negotiable)
- **3 layouts and 3 palettes.** Each thumbnail has a different template and different colors.
- **The words add to the title. They never repeat it.** Title 1 carries the main keyword words, so thumbnail 1 has no words.
- **3 to 5 words** on thumbnails 2 and 3. No em dashes or en dashes (U+2014, U+2013) in them.
- **Official logos only.** Take the logo of the main product from its repo or its website. Never draw a logo or generate one.
- **Real pictures only.** A picture is a frame or a screenshot from the video, or a real post that the video shows. Unless the user asks for one, never make a fake post by a real person.
- **Readable at 320x180.** At the size of a phone search result, the words, the logo, and the face are clear.
- **PNG, 1280x720, under 2 MB.** `scripts/check-thumb.mjs` checks all three.
- **Stop every process that you start.** Thumbnails need no preview server.
## Inputs
- **The video.** The face and most pictures come from its frames. When `/produce-video` calls this skill, the video is `<OUT>/final.mp4`.
- **The 3 titles**, from `titles[].text` in `<OUT>/youtube.json` (written by `youtube-copy`). If the file is missing, ask the user for the 3 titles, or run `youtube-copy` first.
- **The face answer.** If the caller did not give it, ask: "Face on the thumbnails, yes or no?" If the user says "defaults" or "use sane defaults", the answer is no.
- **A repo or a website for the logos** (optional). If the user gives none, find the official repo or website of the main product yourself.
- **Pictures from the user** (optional). If the user gives pictures, use them before frames.
## Output
- `<OUT>/thumbnail-1.png`, `<OUT>/thumbnail-2.png`, `<OUT>/thumbnail-3.png`: 1280x720 PNG files, each under 2 MB. Thumbnail N pairs with title N. `youtube-publish` reads them from `<OUT>`.
- The work files, in `<OUT>/.work/thumb/`:
```text
<OUT>/.work/thumb/
frames/ frames from the video, to look at
thumb-1.json the token values of thumbnail 1
thumb-1/ the HyperFrames project of thumbnail 1
index.html the filled template
assets/ the logo, the picture, the face
thumb-1-out/ the snapshot: frame-00-at-0.5s.png
small-1.png a 320x180 copy of thumbnail-1.png
... the same files for thumbnails 2 and 3
```
When `/produce-video` calls this skill, the output folder is `<OUT>`. When the user runs it alone, use the folder that the user names. If the user names no folder, use the folder of the video.
## The 3 thumbnails
| N | Face yes | Face no |
| --- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| 1 | `no-text.html`: the logo and a picture. No words. | The same. |
| 2 | `words.html`: a big picture, the logo as a sticker, and 3 to 5 words. | The same. |
| 3 | `face-words.html`: the face in a circle, a small logo, and 3 to 5 words. | `face-words.html` with a square picture or a logo in the circle, and 3 to 5 words. |
Give each thumbnail its own palette. The sample values of the templates are 3 different palettes, and a good start:
- **Thumbnail 1** (`no-text.html`, dark): `bg` `#0d0e14`, `glow` `#8b5cf6`, `accent` `#1d9bf0`.
- **Thumbnail 2** (`words.html`, bright): `bg` `#7c3aed`, `glow` `#c4b5fd`, `text` `#ffffff`, `accent` `#facc15`, `accentText` `#0d0e14`.
- **Thumbnail 3** (`face-words.html`, dark): `bg` `#111827`, `glow` `#f97316`, `text` `#ffffff`, `accent` `#f97316`, `accentText` `#111827`.
You can change the colors to fit the logo and the pictures. Keep the 3 palettes clearly different. Keep a strong contrast: white `text` on a dark or strong `bg`, and a dark `accentText` on a bright `accent`.
## Pair each thumbnail with its title
The viewer sees title N and thumbnail N together. So the words on the thumbnail must say something new: an answer, a question, or a twist. Title 1 carries the main keyword words, so thumbnail 1 shows only the logo and a picture.
Example, for a video about agent harnesses:
| N | Title | Template | Words |
| --- | ---------------------------------------------------------- | ----------------- | -------------------------- |
| 1 | What Is an Agent Harness? (And Why T3 Code Is Not One) | `no-text.html` | none |
| 2 | Stop Calling T3 Code a Harness (Agent Harnesses Explained) | `words.html` | `IT'S AN` + `ORCHESTRATOR` |
| 3 | The 3 Levels of AI Agents: Loop, Harness, Orchestrator | `face-words.html` | `WHERE IS` + `T3 CODE?` |
The part before `+` goes in `{{words}}`. The part after it goes in `{{mark}}`.
- Title 2 says what T3 Code is not. Thumbnail 2 says what it is.
- Title 3 names 3 levels. Thumbnail 3 asks where T3 Code fits.
## Templates and tokens
The 3 templates are in `<SKILL_DIR>/templates/`. Each one is a still 1280x720 HyperFrames composition. The comment at the top of each file explains its tokens.
| Template | Tokens |
| ----------------- | -------------------------------------------------------------------------------------------------------------------- |
| `no-text.html` | `{{logo}}`, `{{picture}}`, `{{bg}}`, `{{glow}}`, `{{accent}}` |
| `words.html` | `{{logo}}`, `{{picture}}`, `{{words}}`, `{{mark}}`, `{{bg}}`, `{{glow}}`, `{{text}}`, `{{accent}}`, `{{accentText}}` |
| `face-words.html` | `{{face}}`, `{{logo}}`, `{{words}}`, `{{mark}}`, `{{bg}}`, `{{glow}}`, `{{text}}`, `{{accent}}`, `{{accentText}}` |
- **Files.** `{{logo}}`, `{{picture}}`, and `{{face}}` are paths in the project, for example `assets/logo.png`. A square logo PNG with a transparent background looks best.
- **`{{picture}}`** fills a 16:9 card. The card hides the parts that do not fit. A full video frame fits exactly. To show a part of a frame, crop that part to 16:9 first.
- **`{{face}}`** is a square picture with the face in the middle. The circle hides the corners and about 3% of each side.
- **`{{words}}`** is the white part. **`{{mark}}`** is the last word or two, in the `accent` box. An empty token hides its part. The templates show the words in capital letters. Write `&` as `&`.
- **Line length.** A line of `words.html` holds about 12 letters: keep the words on 1 or 2 lines. A line of `face-words.html` holds about 9 letters: keep them on 2 or 3 lines. A word that is longer than one line breaks in the middle, so use shorter words.
## Process
### 1. Make the work folders
```bash
mkdir -p "<OUT>/.work/thumb/frames" "<OUT>/.work/thumb/thumb-1/assets" "<OUT>/.work/thumb/thumb-2/assets" "<OUT>/.work/thumb/thumb-3/assets"
```
### 2. Get the logo
1. Find the source: the repo or the website that the user gave. If the user gave none, find the official repo or website of the main product.
2. In a repo, look for an `assets` folder, `public/`, `docs/`, the app icons (a 1024 px icon is good), and `logo.svg`.
3. On a website, look for the header logo, a brand or press page, and the app icon.
4. If the source has a square PNG with a transparent background, or an SVG, pick that file.
5. Copy the logo into the `assets/` folder of each thumbnail. All 3 templates use `{{logo}}`.
If you cannot find an official logo, ask the user for one. Never draw one.
### 3. Get the pictures
1. If `<OUT>/transcript.srt` exists, read it. Note the times where the video shows its main visuals: the diagram, the product, the code, a post.
2. Get the size and the length of the video:
```bash
ffprobe -v error -select_streams v:0 -show_entries stream=width,height:format=duration -of json "<video>"
```
3. Get a frame at each time that you noted. `<sec>` is the time in seconds:
```bash
ffmpeg -v error -y -ss <sec> -i "<video>" -frames:v 1 "<OUT>/.work/thumb/frames/at-<sec>.png"
```
4. Look at the frames. Pick the clearest picture for thumbnail 1 and for thumbnail 2. Different pictures (or different parts of one frame) make the 2 thumbnails differ more.
5. To use a part of a frame, crop it to 16:9, for example 960x540. `<x>` and `<y>` are the top-left corner of the part:
```bash
ffmpeg -v error -y -ss <sec> -i "<video>" -frames:v 1 -vf "crop=960:540:<x>:<y>" "<OUT>/.work/thumb/thumb-2/assets/picture.png"
```
To use a full frame, remove `-vf "crop=..."` from the command.
### 4. Get the face (face yes)
1. Get 8 to 12 frames from different parts of the video, with the frame command of step 3.
2. Look at them. Pick a frame with a clear face and a good expression. The face is sharp, the eyes are open, and the expression fits the title. Do not pick a blink, or a strange mouth in the middle of a word.
3. Crop a square around the head and the top of the shoulders, with the face in the middle:
```bash
ffmpeg -v error -y -ss <sec> -i "<video>" -frames:v 1 -vf "crop=<side>:<side>:<x>:<y>" "<OUT>/.work/thumb/thumb-3/assets/face.png"
```
4. Look at the crop. If the face is not in the middle, change `<x>` and `<y>` and crop again.
Do not remove the background. If the face answer is no, put a square picture (the same crop command on another frame) or a logo in the circle.
### 5. Plan the 3 thumbnails
For each thumbnail, choose:
- the template, from the table in "The 3 thumbnails"
- the picture, and for thumbnail 3 the face (or the square picture)
- for thumbnails 2 and 3, the words: 3 to 5 words, split into `{{words}}` and `{{mark}}`
- the palette
Then compare the plan with the rules. The words add to the title. The 3 layouts and the 3 palettes differ.
### 6. Fill and render each thumbnail
Load the `hyperframes-cli` skill before the first render. Do these steps for one thumbnail at a time. `N` is 1, 2, or 3.
1. Put the assets in `<OUT>/.work/thumb/thumb-N/assets/`.
2. Write the token values to `<OUT>/.work/thumb/thumb-N.json`. For example, for `words.html`:
```json
{
"logo": "assets/logo.png",
"picture": "assets/picture.png",
"words": "IT'S AN",
"mark": "ORCHESTRATOR",
"bg": "#7c3aed",
"glow": "#c4b5fd",
"text": "#ffffff",
"accent": "#facc15",
"accentText": "#0d0e14"
}
```
3. Copy the template to `thumb-N/index.html` and fill it. `<template>` is `no-text`, `words`, or `face-words`. Each token is also in the top comment, so this command replaces every copy of each token. If a `{{` is left, it stops with exit code 1 and writes no file:
```bash
node -e "const fs=require('fs');const [tpl,vals,out]=process.argv.slice(1);let html=fs.readFileSync(tpl,'utf8');for(const [k,v] of Object.entries(JSON.parse(fs.readFileSync(vals,'utf8'))))html=html.split('{{'+k+'}}').join(v);if(html.includes('{{')){console.error('not filled: '+html.match(/\{\{\w*\}*/g).join(' '));process.exit(1)}fs.writeFileSync(out,html);console.log('filled: '+out)" "<SKILL_DIR>/templates/<template>.html" "<OUT>/.work/thumb/thumb-N.json" "<OUT>/.work/thumb/thumb-N/index.html"
```
4. Render the thumbnail with the `snapshot` command:
```bash
npx hyperframes snapshot "<OUT>/.work/thumb/thumb-N" --at 0.5 --no-end --output "<OUT>/.work/thumb/thumb-N-out"
```
It writes `frame-00-at-0.5s.png` and a `contact-sheet.jpg` to the `--output` folder. Run `npx hyperframes` the way the `hyperframes-cli` skill says. With the HyperFrames skills installed, that is `node "<SKILLS>/hyperframes/scripts/plugin-cli.mjs" snapshot ...`, where `<SKILLS>` is the folder that holds the `hyperframes` skill folder.
5. Copy the PNG to the output folder:
```bash
cp "<OUT>/.work/thumb/thumb-N-out/frame-00-at-0.5s.png" "<OUT>/thumbnail-N.png"
```
Run each snapshot in the foreground. It starts a browser and closes it at the end. If a snapshot hangs, stop it and its browser before you start the next one.
### 7. Check the files
```bash
node "<SKILL_DIR>/scripts/check-thumb.mjs" "<OUT>/thumbnail-1.png" "<OUT>/thumbnail-2.png" "<OUT>/thumbnail-3.png"
```
It prints one `{ "file", "ok", "errors" }` entry for each file. If a file fails, it exits with code 1. It checks the PNG signature, the size of 1280x720, and the file size under 2 MB. If a file is 2 MB or bigger, use a picture with less fine detail (noise and small text make big PNG files). Then render again.
### 8. Look at each thumbnail
Look at each PNG at full size. Then make a 320x180 copy and look at that too:
```bash
ffmpeg -v error -y -i "<OUT>/thumbnail-N.png" -vf scale=320:180 "<OUT>/.work/thumb/small-N.png"
```
When one of these is true, fix the thumbnail and render it again:
- A word is cut at the edge, or it breaks in the middle.
- The big words are hard to read at 320x180. Small text inside a picture is fine.
- The logo or the face is too small, or not clear.
- The card hides the important part of the picture.
- 2 thumbnails look alike.
The usual fixes: shorter words, a word moved between `{{words}}` and `{{mark}}`, a different crop, different colors. After each fix, run step 7 again.
### 9. Report
Tell the user:
- the 3 pairs: title N with `thumbnail-N.png`
- the output folder
When the user runs this skill alone, also tell the user how to start the test. The user opens "Test & compare" in YouTube Studio and adds the 3 pairs. When `/produce-video` called this skill, continue its flow.