Skip to content

datit309/supergraph / plugins/supergraph/skills/video-demo

video-demo

Flagged

Films a web app as narrated, zooming, cursor-driven demo videos with retina screenshots, either from a repo it builds and mocks or from a live URL as it is served. Use when the user asks for a demo video, product video, walkthrough, screencast, screen recording of an app or of a URL, hero or landing-page footage, app screenshots for a website, "show off this feature", "record a demo of <url>", or wants to add, re-film, re-narrate or fix a demo scene.

FileKindSize
LICENSEother1.0 KB
README.mdmarkdown1.6 KB
SKILL.mdskill md8.9 KB
engine/pin-build.mjsexecutablescript4.0 KB
engine/playwright.demo.tsscript4.8 KB
engine/run.mjsexecutablescript5.1 KB
engine/serve.mjsexecutablescript3.7 KB
engine/studio/actor.tsscript23.5 KB
engine/studio/config.tsscript13.4 KB
engine/studio/define.tsscript5.9 KB
engine/studio/overlay.tsscript12.0 KB
engine/studio/preview.tsscript7.0 KB
engine/studio/ready.tsscript3.6 KB
engine/studio/recorder.tsscript23.1 KB
engine/studio/run-id.tsscript1.8 KB
engine/studio/scene.tsscript6.0 KB
engine/studio/stage.tsscript5.4 KB
engine/studio/stitch.tsscript11.0 KB
engine/studio/voice.tsscript17.3 KB
examples/roadmap-search-poster.pngbinary187.3 KB
package-lock.jsonmanifest2.2 KB
package.jsonmanifest407 B
references/capture.mdmarkdown10.7 KB
references/config.mdmarkdown14.3 KB
references/mocking.mdmarkdown8.8 KB
references/narration.mdmarkdown8.1 KB
references/runs.mdmarkdown14.7 KB
references/scenes.mdmarkdown10.4 KB
references/troubleshooting.mdmarkdown20.3 KB
scripts/demoexecutablescript303 B
scripts/doctor.shexecutablescript4.6 KB
scripts/gaps.mjsexecutablescript5.7 KB
scripts/install-voice.shexecutablescript2.1 KB
scripts/install.shexecutablescript3.9 KB
scripts/probe-fps.mjsexecutablescript8.7 KB
scripts/say.shexecutablescript4.1 KB
scripts/scaffold.mjsexecutablescript11.4 KB
template/demo/demo.config.tsscript6.0 KB
template/demo/mock.tsscript4.1 KB
template/demo/scenes/smoke.scene.tsscript1.9 KB
template/demo/ui.tsscript1.1 KB

scripts/install.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

# Everything that has to happen once, on this machine, before anything can be
# filmed. Run it after cloning, and again after `git pull` if the engine's
# dependency changed.
#
SKILL="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$SKILL"

# Node is checked and never installed. Not squeamishness: it cannot be missing
# (nothing here could have been fetched without it) so the only real case is a
# version too old, and upgrading it is a decision about somebody's toolchain.
# A machine whose node comes from nvm, fnm, volta or asdf would be actively
# damaged by `brew upgrade node`, and a script cannot know which is in charge
# from the outside. So it says what to run and stops.
if ! command -v node >/dev/null 2>&1; then
  printf 'install: node not found. Install Node 22.18 or newer, then run this again.\n'
  exit 1
fi

node_version="$(node --version | sed 's/^v//')"
node_major="${node_version%%.*}"
node_minor="$(printf '%s' "$node_version" | cut -d. -f2)"

if [ "$node_major" -lt 22 ] || { [ "$node_major" -eq 22 ] && [ "$node_minor" -lt 18 ]; }; then
  printf 'install: node %s is too old; the engine needs 22.18 or newer.\n' "$node_version"
  if [ -n "${NVM_DIR:-}" ] || [ -d "$HOME/.nvm" ]; then
    printf '  nvm install 22 && nvm alias default 22\n'
  elif command -v fnm >/dev/null 2>&1; then
    printf '  fnm install 22 && fnm default 22\n'
  elif command -v volta >/dev/null 2>&1; then
    printf '  volta install node@22\n'
  elif command -v asdf >/dev/null 2>&1; then
    printf '  asdf install nodejs latest:22\n'
  elif command -v brew >/dev/null 2>&1; then
    printf '  brew upgrade node\n'
  else
    printf '  see https://nodejs.org\n'
  fi
  exit 1
fi

# ffmpeg is installed here, because it is a leaf dependency with one obvious
# package name and no opinion about the rest of the machine. The one thing this
# will not do is ask for a password: a script run by an agent cannot answer a
# sudo prompt, so where root is needed and not already held, it prints the
# command instead of hanging on it.
install_ffmpeg() {
  if command -v brew >/dev/null 2>&1; then
    printf 'install: ffmpeg, via homebrew\n'
    brew install ffmpeg
    return $?
  fi

  as_root=''
  if [ "$(id -u)" = '0' ]; then
    as_root='env'
  elif sudo -n true 2>/dev/null; then
    as_root='sudo'
  fi

  for manager in apt-get dnf pacman zypper; do
    command -v "$manager" >/dev/null 2>&1 || continue

    case "$manager" in
      apt-get) args='install -y ffmpeg'; refresh='update' ;;
      dnf) args='install -y ffmpeg'; refresh='' ;;
      pacman) args='-S --noconfirm ffmpeg'; refresh='' ;;
      zypper) args='install -y ffmpeg'; refresh='' ;;
    esac

    if [ -z "$as_root" ]; then
      printf 'install: ffmpeg needs root here. Run:\n  sudo %s %s\n' "$manager" "$args"
      return 1
    fi

    printf 'install: ffmpeg, via %s\n' "$manager"
    [ -n "$refresh" ] && $as_root "$manager" $refresh
    $as_root "$manager" $args
    return $?
  done

  printf 'install: no package manager found for ffmpeg. Install it from\n'
  printf '  https://ffmpeg.org/download.html\n'
  return 1
}

if command -v ffmpeg >/dev/null 2>&1; then
  printf 'install: ffmpeg already here\n'
else
  install_ffmpeg || printf 'install: carrying on without ffmpeg; nothing can be encoded until it is there\n'
fi

printf 'install: the engine (about 100MB)\n'
if [ -f package-lock.json ]; then
  npm ci
else
  npm install
fi

# How a workspace resolves `video-demo/scene` and friends: its own
# `node_modules` symlink points here, and this points back at the skill root,
# where the `exports` map turns those specifiers into engine paths. One link,
# and nothing has to be installed into anybody's project.
mkdir -p node_modules
ln -sfn .. node_modules/video-demo

printf '\ninstall: chromium (about 150MB)\n'
if [ "$(uname -s)" = "Linux" ]; then
  npx playwright install --with-deps chromium
else
  npx playwright install chromium
fi

printf '\n'
exec "$SKILL/scripts/doctor.sh"
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall