extract-style-from-reference
Take a reference video and produce a reusable archetype — video-theme.json valid against schemas/video-theme.schema.json. Lets the Storyboarder grow its template library beyond the 22 imported archetypes.
This skill is the vault-internal version of the source repo's creative-theme-extract-videos.md. Read that file for the full procedure — this is a wrapper.
Pre-flight
referenceresolves to a video file OR is a YouTube URL.- Read References/video-storyboarding/claude-projects/creative-theme-extract-videos.md — the canonical procedure. Follow it.
- Read schemas/video-theme.schema.json — output MUST validate.
Procedure
Phase 0: Check for similar existing archetypes
Per the canonical procedure, glob templates/*/video-theme.json and compare new candidate against existing on:
visual_style_categorystructure_pattern- audio profile
If a near-duplicate exists, surface to Adam: "This is ~80% similar to {existing-archetype}. Extend it or create new?"
Phase 1: Acquire the reference
- Local file path: ensure file exists; note duration/resolution/fps.
- YouTube URL: use
.venv/bin/yt-dlp --print "%(id)s|%(title)s|%(duration)s" "{reference}"to get metadata. Don't download the actual video — analyze visually-described inputs from the user OR ask them to drop a local copy inBrands/{slug}/Marketing/storyboards/_reference/.
Phase 2-N: Follow the canonical procedure
The source creative-theme-extract-videos.md has detailed phases for visual analysis (color palette, lighting, camera, focus), narrative analysis (structure beats, scene archetypes), audio analysis (VO style, music, SFX), and generation directives (model recommendations, prompt scaffolds). Follow it section-by-section.
Output
Path:
- Global:
References/video-storyboarding/templates/{archetype_name}/video-theme.json - Brand-scoped:
Brands/{brand_slug}/Marketing/themes/{archetype_name}/video-theme.json
Schema-valid against video-theme.schema.json. Required top-level fields: name, schema_version, type, description, created_at, source, visual_analysis, narrative_analysis, audio_analysis, generation_directives.
Append Log entry
Hard rules
- Schema strictness. Output MUST validate.
- Don't duplicate. If a near-match archetype exists, extend or merge — don't fork.
- Cite the reference in the
sourcefield of the JSON (origin, brand observed, source video filename, duration). - No actual video download for YouTube URLs (use yt-dlp metadata-only mode); user provides local copy if visual inspection is needed.
Failure modes
- YouTube URL unreachable / region-blocked — surface; ask for local file copy.
- Schema validation error — fix and re-write.
- Reference is too short / too noisy to extract a coherent archetype — surface; suggest using a longer reference or a different one.