thumbnail-skill
Machine interface: thumbnail run - --json with a {"tool": "thumbnail/<name>", "params": {...}}
document on stdin; exactly one response document on stdout. thumbnail skill --json prints the
contract, thumbnail doctor --json the environment (fonts, ffmpeg-skill, path policy).
Tools: thumbnail/validate (structural check only), thumbnail/render (canvas + assets + elements
-> PNG/JPEG), thumbnail/extract_frame (one video timestamp -> one frame, nothing else),
thumbnail/render_batch (one template per output.preset plus a CSV or inline rows -> one thumbnail
per row and target; {{column}} placeholders; text_fit shrinks a name down to min_font_size,
never cuts it; nothing is written until every row is checked), thumbnail/render_variants
(thumbnail render req.json --variants N: N documented variants, each checked at 320 px wide for text
height and, through qc-skill, contrast; a failing variant is flagged and kept), thumbnail/render_layers
(thumbnail render req.json --layers DIR: every composed layer as a PNG with alpha plus layers.json,
verified to rebuild the thumbnail pixel for pixel), thumbnail/choose_frame (ranks a
detection-skill detections@1 face document's frames by eyes open, sharpness, exposure, angle and
size; closed eyes rank last; detects nothing itself), thumbnail/place_text (moves one text
element to the first position clear of every face; refuses rather than cover one), and the
optional thumbnail/generate_background (one AI background image from a caller-written prompt and
seed, FLUX.2 [klein] 4B, only when thumbnail doctor --json -> checks.background_providers says
available; otherwise it is refused with TOOL_ERROR / provider_unavailable, and nothing else
changes). Use its output as an ordinary image asset; report its provenance (engine, licence).
A brand kit (options.kit / --kit: a Velisa kit@1 file or an ffmpeg-skill brand.json) fills the
text colour, band and stroke colours, canvas background, font_id and a kit-logo element that a
render's document leaves out; the document's own values win, and response.kit lists what was used
and every kit key that was not (unmapped, unused).
Rules for a calling agent:
- Decide everything about content before calling this skill: which still image, or which exact
video timestamp (
asset.timestamp, seconds); what the text says (with literal\nfor line breaks — this skill never wraps or reflows text); where every element sits (position,size,z_index). This skill renders exactly what it is given and searches for nothing. - Reference fonts by
font_idfrom the registry (thumbnail skill --json->fonts.font_ids, orthumbnail doctor --jsonfor what actually resolves on this machine). A request never carries a font path; an unresolvablefont_idfailsMISSING_INPUT, never a silent substitution. - Never send
command,argv,shell,filter/filter_complex/vf/af,executable,env, or HTML/CSS/JS: the request is rejected withINVALID_REQUESTwherever such a key appears. - Keep outputs inside the workspace (
--workspace/options.workspace), never at an input path; setoverwrite: truedeliberately. Restrict inputs withoptions.allowed_input_rootswhen the caller's own inputs come from an untrusted or shared location. - Read
output,sha256,width/height,reusedandprovenancefrom the response; the exit code is 0 only whenokis true. For a platform target, setoutput.preset(youtube,youtube-shorts,tiktok,instagram-reels,instagram-feed,x; limits inthumbnail skill --json->platform_presets): it supplies the canvas size unless you give bothwidthandheight, and an output over the preset's limits failsVALIDATION_ERROR(preset_limit_exceeded). Avideo_frameasset needs ffmpeg-skill reachable (env varTHUMBNAIL_SKILL_FFMPEG_SKILL_DIRor--ffmpeg-skill); a still-image-only document never needs it.
See README.md for the ThumbnailDocument schema, element/font/output tables, error codes, security boundary and the responsibility split with video-production-agent and the other media skills.