agentleFS
ohongohong/agent-skills/demo-video/SKILL.md

demo-video

Skill4 starsChanged 2 days agoMITView on GitHub

Create a narrated MP4 demo from browser screenshots, low-cost fal.ai text-to-speech, and ffmpeg. Use for still-image product walkthroughs synchronized to narration.

  • Installs packages

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use karpathy-coder, ai-act-readiness and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • csiddhant796-blipSkill

    karpathy-coder

    Use when writing, reviewing, or committing code to enforce Karpathy's 4 coding principles — surface assumptions before coding, keep it simple, make surgical changes, define verifiable goals. Triggers on "review my diff", "check complexity", "am I overcomplicating this", "karpathy check", "before I commit", or any code quality concern where the LLM might be overcoding.

    Also in 4 projects that use this

  • Hussain-ElfalahSkill

    ai-act-readiness

    Also in 3 projects that use this

  • Hussain-ElfalahSkill

    c-level-agents

    Also in 3 projects that use this

  • csiddhant796-blipSkill

    self-eval

    Honestly evaluate AI work quality using a two-axis scoring system. Use after completing a task, code review, or work session to get an unbiased assessment. Detects score inflation, forces devil's advocate reasoning, and persists scores across sessions.

    Also in 4 projects that use this

  • +8 more from Hussain-Elfalah

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use available browser controls to capture screenshots.

    line 14
  2. Very specific:

    Use FAL_KEY from the environment.

    line 16
  3. Very specific:

    Default to fal-ai/kokoro/american-english, voice af_heart, speed 1.

    line 23
  4. Distinctive:

    Use another model when the user needs a different language, voice, or higher expressiveness.

    line 25
  5. Very specific:

    Write one narration file per scene, such as scene01.txt, paired with scene01.png.

    line 31
  6. Very specific:

    Run this example from the chosen output directory.

    line 38
  7. Distinctive:

    Run for each scene, changing the three filenames together:

    line 87

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Demo Video

Capture browser scenes, write narration, generate speech with fal.ai, and combine still images with audio into an MP4.

Adapted from dctanner's demo-video gist.

Setup and voice choice

Use available browser controls to capture screenshots. Install ffmpeg if needed; both ffmpeg and ffprobe must be available.

Use FAL_KEY from the environment. Never print it or place it in the skill, narration, or output artifacts. For Python, install the client in an isolated environment:

python3 -m venv /tmp/demo-video-venv
/tmp/demo-video-venv/bin/python -m pip install fal-client

Default to fal-ai/kokoro/american-english, voice af_heart, speed 1. It is a fast, inexpensive choice for English narration. Its listed price was $0.02 per 1,000 characters on 2026-09-06: 5,000 characters cost about $0.10. Recheck pricing before estimating a new job. Latency depends on queue and request length.

Use another model when the user needs a different language, voice, or higher expressiveness. Check that model's current API schema; fields differ. Do not introduce voice cloning unless requested.

Prepare the scenes

  1. Choose an output directory such as tmp/video/, without overwriting unrelated files.
  2. Capture each scene at a consistent viewport. Prefer readable viewport captures over tall full-page screenshots.
  3. Write one narration file per scene, such as scene01.txt, paired with scene01.png. Keep narration tied to visible actions and results.
  4. Set the scene order and review the script before paid synthesis. Keep one voice and speed across scenes.

When subagents are available, delegate speech generation and rendering after the screenshots and script are ready. Use the environment's actual subagent tool, such as collaboration.spawn_agent. Give the worker ordered file paths, narration, output settings, and the requested destination. Keep review and final verification with the main agent. If delegation is unavailable, run the same workflow directly.

Generate speech

Run this example from the chosen output directory. It reads scene01.txt, saves the response for reuse, and downloads the returned WAV file. Use a separate response and audio file for each scene.

/tmp/demo-video-venv/bin/python - <<'PY'
import json
import os
from pathlib import Path
from urllib.request import urlretrieve

import fal_client

if not os.environ.get("FAL_KEY"):
    raise SystemExit("Set FAL_KEY before generating narration.")

text = Path("scene01.txt").read_text().strip()
if not text:
    raise SystemExit("scene01.txt is empty.")

response_path = Path("scene01.response.json")
if response_path.exists():
    result = json.loads(response_path.read_text())
else:
    result = fal_client.subscribe(
        "fal-ai/kokoro/american-english",
        arguments={"prompt": text, "voice": "af_heart", "speed": 1},
    )
    response_path.write_text(json.dumps(result, indent=2))

urlretrieve(result["audio"]["url"], "scene01.wav")
PY

See the Kokoro API documentation for current limits and voice options. The input field is prompt; the output is audio.url.

Reuse successful audio to avoid paying twice. The example assumes the text, voice, and speed have not changed when a response file exists. After editing them, use a new scene version or remove its stale response and audio deliberately. If a download fails, retry that download from the saved response. For API failures, inspect the error before retrying; stop repeated failures instead of submitting blindly. Do not assume provider-specific concurrency limits.

Validate each downloaded file by checking its audio stream and positive duration, then decoding it. File size alone does not establish validity:

ffprobe -v error -select_streams a:0 \
  -show_entries stream=codec_name,sample_rate,channels:format=duration \
  -of json scene01.wav
ffmpeg -v error -i scene01.wav -f null -

Render and combine

Render every scene with the same even dimensions, frame rate, pixel format, video codec, and audio settings. This example letterboxes to 1920×1080 at 30 fps; choose another shared size when the user requests it. Avoid stretching screenshots.

Run for each scene, changing the three filenames together:

duration=$(ffprobe -v error -show_entries format=duration \
  -of default=noprint_wrappers=1:nokey=1 scene01.wav)
ffmpeg -hide_banner -loglevel error -n \
  -loop 1 -framerate 30 -i scene01.png -i scene01.wav \
  -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,format=yuv420p" \
  -c:v libx264 -preset fast -tune stillimage -r 30 \
  -c:a aac -ar 48000 -ac 2 -b:a 128k -af apad \
  -t "$duration" -movflags +faststart scene01.mp4

Build the concat file in scene order. Use simple filenames without apostrophes:

cat > concat.txt <<'EOF'
file 'scene01.mp4'
file 'scene02.mp4'
file 'scene03.mp4'
EOF
ffmpeg -hide_banner -loglevel error -n -f concat -safe 0 \
  -i concat.txt -c copy -movflags +faststart demo.mp4

Adjust the list to the actual scene count. Inspect the final streams and duration with ffprobe, then decode the full video with ffmpeg -v error -i demo.mp4 -f null -. Compare its duration with the sum of scene audio durations, allowing frame and codec rounding.

Review sampled frames and listen to the narration, including scene boundaries. Confirm readable UI, correct order, complete speech, and no clipping or blank endings. Report listening as unverified if audio playback or inspection is unavailable.

Return the local MP4 as an absolute-path media embed or link. Publish only when the user requests it and supplies or identifies a destination. Do not assume an R2 bucket, public URL, or upload permission.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.