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/define.ts

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

import type { Ready } from './ready.ts';

/**
 * The whole of what the studio is allowed to know about an app.
 *
 * `demo.config.ts` is the only file that names anything of yours — every
 * module under `studio/` reads the resolved value of this type (`demo`, in
 * `config.ts`) and nothing else. `defineDemo` returns its argument unchanged;
 * it exists only so the config file gets inference without writing out this
 * type by hand.
 */

export type Theme = 'light' | 'dark';

/** What `mock` is told, so it can answer the way the entry being filmed needs. */
export type MockContext = {
  reference: Date;
  entry: string;
  signedIn: boolean;
};

/**
 * One surface a scene can open — the signed-in app, a public page, anything
 * else the product has. There is no special case for "no session": a
 * credential-free page is an entry like any other, with `signedIn: false` and
 * a `ready` that does not wait on an app shell.
 */
export type Entry = {
  path: string;
  /** Nothing is filmed before this resolves. Compose predicates from `ready.ts`. */
  ready: Ready;
  /** Default true. Told to `mock` as `ctx.signedIn`, for routes like `auth/me`. */
  signedIn?: boolean;
};

export type DemoConfig<Server = unknown> = {
  /** Shows up in the manifest and in a run's own output. */
  name: string;
  /**
   * A URL that is already live, filmed as it stands. The other half of
   * `build`, and exactly one of the two is required.
   *
   * This is the mode for a site you did not build here: a marketing page, a
   * public app, a deploy preview. There is nothing to compile and nothing to
   * serve, so `build`, `mock` and `clock` all become unnecessary and the
   * engine will not ask for them.
   *
   * It costs the two guarantees the build mode exists to give, and they are
   * worth naming before you choose it. The film is of whatever the site
   * happens to be that minute, so a corpus is no longer reproducible: the
   * same command next month makes a different video, and a scene pointing at
   * a button somebody renamed fails. And nothing intercepts the network, so
   * anything the page shows a signed-in visitor is filmed, including real
   * names and addresses. Public pages, then, or a staging URL with invented
   * data behind it.
   */
  site?: string;
  build?: {
    /** Whatever the repo already runs for a production build. Run from `APP_ROOT`. */
    command: string;
    /** Where the build writes, relative to `APP_ROOT`. */
    output: string;
    /**
     * Strings or patterns the built bundle must not contain, checked before
     * anything is filmed. A real API host baked in by a stray build is the
     * failure this catches: every request then goes cross-origin, the mocks
     * never see it, and the app sits on its login screen while scene after
     * scene fails looking for content. Default none.
     */
    forbid?: (string | RegExp)[];
  };
  /** Default `{ width: 1920, height: 1080 }`. */
  stage?: { width: number; height: number };
  /**
   * Required with `build`, where a fixed instant is what makes a corpus
   * reproducible. Optional with `site`: pinning a live page's clock can break
   * it (a build fetching relative to a date it cannot have, hydration
   * disagreeing with the server), so the page is left on the real one unless
   * this says otherwise. `timezone` and `locale` still apply either way.
   */
  clock?: { anchor?: string; timezone: string; locale?: string };
  /** Default `['dark']`. */
  themes?: Theme[];
  /**
   * localStorage entries written before first paint, already serialized.
   *
   * `overrides` is whatever a scene passed as its own `preferences`, in your
   * app's shape rather than the engine's — the engine cannot know that a
   * scene asking for a different starting time zone means one field inside a
   * JSON blob under one key. Fold them in wherever they belong and the
   * serialization stays yours:
   *
   *     storage: (theme, overrides) => ({
   *       'myapp:preferences': JSON.stringify({ theme, ...overrides }),
   *     })
   *
   * Default none, in which case a scene that passes `preferences` is an
   * error rather than a silent no-op.
   */
  storage?: (
    theme: Theme,
    overrides?: Record<string, unknown>
  ) => Record<string, string>;
  /** `app` is the entry a scene opens when it does not say otherwise. */
  entries: Record<string, Entry> & { app: Entry };
  /**
   * The whole server, for the length of a scene. Called before every
   * navigation, for every entry — a public page is mocked exactly like the
   * app is; it simply asks for `signedIn: false` in its own entry.
   *
   * Reach it with a dynamic `import('./mock.ts')` inside the arrow rather than
   * a static import at the top of `demo.config.ts`: this config is loaded by
   * plain Node too, and that resolver cannot follow an extensionless specifier
   * the way the test runner's can. The template's own stub shows the shape.
   *
   * Required in `build` mode and pointless in `site` mode, where the site
   * answers for itself. Left out of a build-mode config, the app would reach
   * a real network from a filmed browser, which is the thing this engine
   * exists to prevent.
   */
  mock?: (page: Page, ctx: MockContext) => Promise<Server>;
  voice?: { name?: string; speed?: number; saidAs?: [RegExp, string][] };
  /**
   * The order scenes appear in the manifest and the stitched tour.
   *
   * Editorial, which is why it lives in config rather than being derived.
   * Left out, scenes sort by name, and a tour that opens on `assistant` and
   * `blocking` before anyone has seen `week` shows the roof before the walls.
   * Names not listed here fall to the end, so adding a scene does not require
   * touching this.
   *
   * Whether to build the tour file at all is a run-time concern, not an
   * editorial one: `DEMO_TOUR=0`.
   */
  tour?: string[];
};

export function defineDemo<Server = unknown>(
  config: DemoConfig<Server>
): DemoConfig<Server> {
  return config;
}
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