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

engine/playwright.demo.ts

View on GitHub
import { join } from 'node:path';

import { defineConfig, devices } from '@playwright/test';

import {
  ENGINE_DIR,
  PROJECT,
  BASE_URL,
  LOCALE,
  PORT,
  SITE,
  STAGE,
  STILL_SCALE,
  THEMES,
  TZ,
  VIDEO_SCALE,
  WORKERS,
} from './studio/config.ts';

/**
 * The studio's own runner, deliberately not the e2e one.
 *
 * The suite next door is tuned for throughput — four workers, a retry, its own
 * artifacts on failure. Filming wants the opposite of all three. Two workers,
 * because a screencast at this resolution competes with the compositor for the
 * same thread and a third browser is what turns a 60fps capture into a 40fps
 * one. No trace and no video, because Playwright's own recording is the thing
 * `studio/recorder.ts` exists to replace. And `--forbid-only` off, because
 * filming one scene while iterating on it is the normal way to work here.
 *
 * `reducedMotion` is left at its default on purpose and set per page instead:
 * a demo with animations disabled is a demo of a different application.
 */
process.env.TZ = TZ;

export default defineConfig({
  /**
   * The scenes belong to the project being filmed, not to the engine, so this
   * is an absolute path into the workspace rather than a path beside this
   * config. One clone of the skill films every project on the machine.
   */
  testDir: join(PROJECT, 'scenes'),
  testMatch: '**/*.scene.ts',
  fullyParallel: true,
  /** `WORKERS` in `studio/config.ts` carries the reasoning: resolution, not taste. */
  workers: WORKERS,
  retries: 0,
  timeout: 4 * 60_000,
  expect: { timeout: 15_000 },
  reporter: [['list']],
  use: {
    baseURL: BASE_URL,
    timezoneId: TZ,
    locale: LOCALE,
    trace: 'off',
    video: 'off',
    screenshot: 'off',
    viewport: { width: STAGE.width, height: STAGE.height },
    deviceScaleFactor: STILL_SCALE,
    launchOptions: {
      args: [
        /**
         * This sets the *video's* resolution, and it is not the same thing as
         * the context's `deviceScaleFactor` above, which sets the stills'.
         *
         * CDP's screencast hands back frames at the CSS viewport size and
         * ignores an emulated scale factor entirely, so only the browser's
         * real one changes what is captured. That is what makes the split
         * possible: 1x here for video the compositor can actually paint at
         * 60fps, 2x in the context for retina screenshots, and the corpus
         * stops having to choose. See `VIDEO_SCALE` in `studio/config.ts` for
         * the measurements behind picking 1.
         */
        `--force-device-scale-factor=${VIDEO_SCALE}`,
        // Lifts Chrome's own 60fps compositor cap so a paint is never held
        // back waiting for a vsync the headless browser does not have.
        '--disable-gpu-vsync',
        '--disable-frame-rate-limit',
        '--force-color-profile=srgb',
        '--font-render-hinting=none',
        '--hide-scrollbars',
      ],
    },
  },
  /**
   * `deviceScaleFactor` is repeated after the device spread deliberately:
   * `devices['Desktop Chrome']` carries its own `1`, project `use` beats
   * top-level `use`, and the result is a corpus of 1x screenshots that look
   * soft on every display sold in the last decade. It has to be restated
   * here, downstream of the spread, to survive.
   */
  projects: THEMES.map((theme) => ({
    name: theme,
    use: {
      ...devices['Desktop Chrome'],
      colorScheme: theme,
      viewport: { width: STAGE.width, height: STAGE.height },
      deviceScaleFactor: STILL_SCALE,
    },
  })),
  globalSetup: './studio/run-id.ts',
  globalTeardown: './studio/stitch.ts',
  /**
   * Only when there is something of ours to serve. Filming a live URL means
   * the site is the server, and a `webServer` block would stand up a static
   * host for a directory that was never built.
   */
  webServer: SITE
    ? undefined
    : {
        command: `node ${join(ENGINE_DIR, 'serve.mjs')} ${join(PROJECT, '.build')} ${PORT}`,
        url: BASE_URL,
        cwd: PROJECT,
        /**
         * Never reused, and never a dev server.
         *
         * A corpus run died mid-flight to a dev server whose module graph belongs
         * to whoever is editing the source: one run when another session touched
         * the app's own source, one when an install rewrote `node_modules`
         * underneath the bundler. Both times the scenes that failed looked broken
         * and were not. `demo/serve.mjs` serves the pinned build
         * (`demo/.build`), which a keystroke cannot invalidate, and
         * `demo/pin-build.mjs` builds fresh before every run so the corpus is
         * always of the code in the tree. It is also the production bundle, which
         * is what anybody actually ships.
         */
        reuseExistingServer: false,
        stdout: 'ignore',
        stderr: 'pipe',
        timeout: 60_000,
      },
});
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: 198kUpdated 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