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/studio/ready.ts

View on GitHub
import type { Page } from '@playwright/test';
import { expect } from '@playwright/test';

/**
 * How a demo says "my app is on screen and finished loading".
 *
 * This is the seam that stops the studio being one app's demo folder. The
 * original hardcoded a calendar's own readiness — a grid visible, two
 * `data-loaded` attributes true, a measured height past 900px — and every one
 * of those four assertions was load-bearing for a reason that generalises even
 * though the selectors do not.
 *
 * Why it cannot just be "wait for load". Visible is not ready: the app painted
 * its shell and its data is still in flight, so a scene reaching for a row
 * races the read and fails a third of the time. Laid out is not ready either:
 * a grid that sizes itself from a `ResizeObserver` reports a height of nothing
 * for a frame or two, and a scene that measures a slot in that window aims at
 * the wrong pixel. Each predicate below exists because one of those produced a
 * flake that looked like a broken scene.
 *
 * Compose them with `all`. Keep them cheap: this runs before every clip.
 */

export type Ready = (page: Page) => Promise<void>;

/** On screen. The floor, and rarely enough on its own. */
export function visible(testId: string): Ready {
  return async (page) => {
    await expect(page.getByTestId(testId)).toBeVisible();
  };
}

/**
 * An attribute the app sets when it has finished something.
 *
 * The most reliable signal there is, because the app is telling you rather
 * than being guessed at. If the app has no such attribute, this is usually
 * worth adding to the app: one `data-loaded` is cheaper than a suite of
 * heuristics about when a fetch has landed.
 */
export function attribute(testId: string, name: string, value: string): Ready {
  return async (page) => {
    await expect(page.getByTestId(testId)).toHaveAttribute(name, value);
  };
}

/**
 * Settled geometry, polled rather than awaited.
 *
 * For anything that measures itself. The browser clamps and recomputes, so the
 * value that matters is the one it lands on, not the first one it reports.
 */
export function tallerThan(testId: string, px: number): Ready {
  return async (page) => {
    await expect
      .poll(
        async () => (await page.getByTestId(testId).boundingBox())?.height ?? 0
      )
      .toBeGreaterThan(px);
  };
}

export function widerThan(testId: string, px: number): Ready {
  return async (page) => {
    await expect
      .poll(
        async () => (await page.getByTestId(testId).boundingBox())?.width ?? 0
      )
      .toBeGreaterThan(px);
  };
}

/** Text inside a known element, for data that only arrives with a fetch. */
export function text(testId: string, pattern: string | RegExp): Ready {
  return async (page) => {
    await expect(page.getByTestId(testId)).toContainText(pattern);
  };
}

/**
 * The last resort, and genuinely useful for a page with no session.
 *
 * A credential-free public page has no app shell to interrogate and often no
 * attribute to wait on, so "the requests stopped" is the honest signal. Do not
 * reach for it on the signed-in app: it is slower and it goes quiet during a
 * long poll or an open event stream, which then reads as ready when it is not.
 */
export function networkIdle(): Ready {
  return async (page) => {
    await page.waitForLoadState('networkidle');
  };
}

/** Everything in order, which is how readiness is usually expressed. */
export function all(...checks: Ready[]): Ready {
  return async (page) => {
    for (const check of checks) {
      await check(page);
    }
  };
}

/** Nothing to wait for beyond the navigation itself. */
export const immediately: Ready = async () => {};
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