Generate polished explainer videos from a topic or URL. Given a subject, this skill autonomously researches content, builds a pedagogy-aware outline and narration script, captures screenshots and generates context-relevant visuals, then produces a video with slide-like framing, transitions, and optional AI talking-head presenter. Supports general and SEO audit modes.
Produce a polished explainer video from a topic string or URL. The video prioritizes clarity and information density over generic filler.
| Parameter | Default | Description |
|---|---|---|
topic_or_url | required | A topic string ("How DNS works") or a URL to explain |
duration_seconds | 60 | Target video length in seconds |
mode | general | general — what/why/how/tradeoffs; seo_audit — what's right, what's wrong, top 3 fixes |
Parse the user's message to extract these. If ambiguous, ask once.
A JSON object saved to tmp/explainer_output.json:
{
"video_url": "tmp/explainer_video.mp4",
"status": "complete",
"outline": [ { "section": "...", "duration_s": 12, "key_points": ["..."] } ],
"script": "Full narration script text...",
"key_visuals": [
{ "file": "tmp/slides/slide_01.png", "caption": "DNS resolution flow diagram" },
{ "file": "tmp/screenshots/hero.png", "caption": "Homepage above the fold" }
],
"metadata": {
"renderer": "cli-ffmpeg",
"duration_seconds": 60,
"source_urls": ["https://..."],
"mode": "general",
"generated_at": "2026-03-27T..."
}
}
tmp/explainer/, tmp/slides/, tmp/screenshots/Goal: Gather enough material to write an authoritative 60-second explanation.
If input is a URL:
scripts/capture_screenshots.py:
If input is a topic:
Research output: Save tmp/explainer/research.md with:
Goal: Structure content for maximum clarity within the time budget.
Pedagogy framework — every video answers:
SEO audit mode replaces the framework with:
Steps:
tmp/explainer/outline.jsontmp/explainer/script.txtGoal: Create or collect every visual needed. Avoid generic stock imagery — every visual must be context-relevant.
Visual types (choose based on content):
| Type | When to use | How to create |
|---|---|---|
| Screenshot | URL input, showing real UI | Browser tools or scripts/capture_screenshots.py |
| Diagram | Architecture, flow, process | Generate with Pillow via scripts/render_slides.py using type: diagram |
| Code snippet | Technical topics | Render as styled code block on slide |
| Chart/data | Statistics, comparisons | Render as bar/pie chart on slide |
| Annotated screenshot | Highlighting specific UI elements | Screenshot + overlay highlights |
| Key metric | Single important number | Large-font centered slide |
Steps:
scripts/capture_screenshots.py --highlight to add bounding box overlaysGoal: Generate polished slide images for every section of the video.
Use scripts/render_slides.py to generate slide PNGs from a JSON specification:
python3 scripts/render_slides.py tmp/explainer/slides_spec.json tmp/slides/
Slide spec format (tmp/explainer/slides_spec.json):
{
"settings": {
"width": 1920,
"height": 1080,
"background_color": "#1a1a2e",
"accent_color": "#e94560",
"text_color": "#ffffff",
"font_heading": "Helvetica-Bold",
"font_body": "Helvetica"
},
"slides": [
{
"type": "title",
"title": "How DNS Works",
"subtitle": "The Internet's Phone Book",
"section_label": "EXPLAINER"
},
{
"type": "bullets",
"title": "Why DNS Matters",
"bullets": ["Every web request starts with DNS", "Misconfiguration = downtime"],
"image_path": "tmp/screenshots/dns_flow.png"
},
{
"type": "code",
"title": "DNS Lookup Example",
"code": "$ dig example.com\n;; ANSWER SECTION:\nexample.com. 300 IN A 93.184.216.34",
"language": "bash"
},
{
"type": "diagram",
"title": "Resolution Flow",
"nodes": ["Browser", "Resolver", "Root NS", "TLD NS", "Auth NS"],
"edges": [[0,1], [1,2], [2,3], [3,4], [4,1]],
"edge_labels": ["query", "recurse", ".com?", "ns.example.com", "93.184.216.34"]
},
{
"type": "key_metric",
"metric": "4.3 billion",
"label": "DNS queries per day on Cloudflare alone",
"source": "Cloudflare 2024 Report"
},
{
"type": "image_full",
"title": "Homepage Analysis",
"image_path": "tmp/screenshots/hero.png",
"caption": "Above-the-fold layout"
},
{
"type": "comparison",
"title": "Tradeoffs",
"left_title": "Recursive DNS",
"left_items": ["Simple for clients", "Caching benefits"],
"right_title": "Iterative DNS",
"right_items": ["Less load on resolver", "More control"]
},
{
"type": "takeaway",
"title": "Key Takeaway",
"text": "DNS is the invisible backbone of the internet. Understanding it helps you debug faster and build more resilient systems."
}
]
}
Supported slide types: title, bullets, code, diagram, key_metric, image_full, comparison, takeaway, terminology, seo_scorecard
Terminology slide type — for defining key terms the viewer needs to internalize:
{
"type": "terminology",
"title": "Key Terms",
"terms": [
{ "term": "DNS Resolver", "definition": "Server that receives queries from clients and tracks down the answer through recursive lookups" },
{ "term": "TTL", "definition": "Time To Live — how long a DNS record is cached before re-querying" },
{ "term": "Authoritative NS", "definition": "The server that holds the actual DNS records for a domain" }
]
}
SEO-specific slide type:
{
"type": "seo_scorecard",
"title": "SEO Audit Summary",
"scores": { "Performance": 72, "SEO": 85, "Accessibility": 64 },
"issues": ["Missing meta descriptions on 12 pages", "No structured data"],
"fixes": ["Add unique meta descriptions", "Implement JSON-LD schema", "Fix image alt text"]
}
Goal: Assemble slides into a polished video with transitions.
Use scripts/compose_video.py:
python3 scripts/compose_video.py \
--slides-dir tmp/slides/ \
--output tmp/explainer_video.mp4 \
--duration 60 \
--transition crossfade \
--transition-duration 0.5
The script:
Optional audio: If a TTS audio file is provided:
python3 scripts/compose_video.py \
--slides-dir tmp/slides/ \
--output tmp/explainer_video.mp4 \
--duration 60 \
--audio tmp/explainer/narration.mp3
If the user has configured a video API backend, use it instead of the CLI pipeline. Check for environment variables:
SYNTHESIA_API_KEY — Use Synthesia API for AI avatar presenterHEYGEN_API_KEY — Use HeyGen API for AI avatar presenterCANVA_API_KEY — Use Canva API for polished templatesWhen an API key is available, read references/api_backends.md for integration details. The API renderer replaces Phases 4-5 but uses the same outline and script from Phases 2-3.
Fallback order: Synthesia → HeyGen → Canva → CLI (ffmpeg)
tmp/explainer_output.json| Category | Primary | Accent | Background |
|---|---|---|---|
| Technical/Engineering | #0f3460 | #e94560 | #1a1a2e |
| Business/Marketing | #2d3436 | #00b894 | #ffffff |
| Science/Education | #2c3e50 | #f39c12 | #ecf0f1 |
| SEO/Web | #1e272e | #0be881 | #f5f6fa |
| Finance | #2d3436 | #6c5ce7 | #dfe6e9 |
| Healthcare | #2d3436 | #00cec9 | #f0f0f0 |
Choose palette based on topic. Override if user specifies brand colors.
| Duration | Slides | Words | Sections |
|---|---|---|---|
| 30s | 4-5 | ~75 | 3 |
| 60s | 6-8 | ~150 | 4 |
| 90s | 9-12 | ~225 | 5 |
| 120s | 12-16 | ~300 | 6 |
Required (verify before starting):
pip install Pillow)pip install playwright && playwright install chromium) — for screenshotsOptional: