Przejdź do treści
Biblioteka skilli
Marketing i treści · Budowanie i kod

promo-video-generator

/promo-video-generator

Generuje stronę promocyjną wiernie odwzorowującą interfejs aplikacji na telefon i komputer oraz nagrywa filmy WebM przez Playwright.

Repozytorium
ai-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
04.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 04.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Generuje stronę promocyjną wiernie odwzorowującą interfejs aplikacji na telefon i komputer oraz nagrywa filmy WebM przez Playwright.

Wyzwalacze z opisu

promo sitepromo videopromo websiteUI to HTMLfeature showcaserecord promo
Oryginalny opis (EN)

Generate a pixel-perfect promo website that mirrors any app's UI (Android Compose, iOS SwiftUI, Web React/Flutter, etc.) for phone and tablet/desktop, with user-defined or auto-detected feature showcase scenes, and record Playwright WebM videos. Use when user says 'promo site', 'promo video', 'promo website', 'UI to HTML', 'feature showcase', 'record promo', or wants a marketing site in a new subfolder matching the app's actual UI exactly.

Jak działa

  1. When to use
  2. Preconditions
  3. Workflow
  4. Output
  5. Anti-patterns (never do)
Sekcje z nagłówków SKILL.md, w oryginale · 291 linii, 2 368 słów
Podgląd SKILL.md
---
name: promo-video-generator
description: Generate a pixel-perfect promo website that mirrors any app's UI (Android Compose, iOS SwiftUI, Web React/Flutter, etc.) for phone and tablet/desktop, with user-defined or auto-detected feature showcase scenes, and record Playwright WebM videos. Use when user says 'promo site', 'promo video', 'promo website', 'UI to HTML', 'feature showcase', 'record promo', or wants a marketing site in a new subfolder matching the app's actual UI exactly.
license: MIT
compatibility: Requires Node 18+ and Playwright (chromium browser cache) for the Node recorder, or your agent's own Playwright integration for recording. Fonts must be self-hosted (downloaded once at setup time), network access needed only then. Recording targets any app with readable UI source code (Android, iOS, Web, Desktop, cross-platform).
metadata:
  version: "1.0.0"
---

# Promo Video Generator — Universal App UI to Promo Site + Recording

Generate a promo marketing website that **exactly mirrors** the current app's UI for both **phone (1080×1920)** and **tablet/desktop (1920×1080)** layouts, driven by user-chosen or auto-detected features, and record showcase videos via Playwright — all inside a **new subfolder** of the current project.

Works for **any platform**: Android (Compose/Views), iOS (SwiftUI/UIKit), Web (React/Vue/Svelte/Flutter), Desktop (Electron/Tauri), Cross-platform (Flutter, KMP, React Native).

## When to use

Use ONLY when user wants a promo/marketing site that looks like the app, a feature-showcase site, or to re-generate/record promo videos. Trigger keywords: `promo site`, `promo video`, `promo website`, `UI to HTML`, `feature showcase`, `record promo`, `marketing site from app`.

## Preconditions

- Project has identifiable UI source code (any framework).
- Playwright chromium must be installed — run `npx playwright install chromium` once. The browser cache lives at `~/.cache/ms-playwright` on Linux/macOS and `%LOCALAPPDATA%\ms-playwright` on Windows (the recorder auto-detects both).
- **Recorder dependency** — `record.mjs` imports `playwright-core`, which is NOT installed by the browser cache. Install it once in the folder you run the script from (typically the output folder): `npm init -y && npm install playwright-core`. Alternatively, use your agent's own Playwright integration instead of the Node script — it needs no extra install and uses the same browser cache.
- **Node 18+** — required only for the **Node recording method**; optional if recording through your agent's own Playwright integration.

## Workflow

### 1) Clarify intent (ask 4 questions)

Ask the user before scaffolding (use your agent's ask-question tool if it has one — multiple-choice UI — otherwise ask in chat):

1. **Features to showcase** — `Auto-detect major features` vs `User-defined list` (prompt for names/keys).
2. **Output folder** — default `marketing/promo-<appname>` or user-specified — **always new subfolder**, never overwrite.
3. **Video config** — quick (27s), extended, or per-scene timings; WebM only or also MP4 (requires external ffmpeg).
4. **Recording method** — `Node script (record.mjs)` vs your agent's **Playwright integration** (if it exposes a run-code tool) — both produce identical WebM; node is better for CI, the integration is faster for ad-hoc runs.

### 2) Discover the app's UI source of truth

**Auto-detect framework + read actual UI source:**

| Platform | Detection | Key Files to Read |
|----------|-----------|-------------------|
| Android Compose | `build.gradle.kts` + `compose-ui` dep | `feature/*/Screen.kt`, `*Header.kt`, `*Preview.kt`, `*Timeline.kt`, `*Tool*.kt`, `Theme.kt`, `Color.kt`, `AdaptiveLayout.kt` |
| Android Views | `build.gradle.kts` + `appcompat` | `res/layout/*.xml`, `*Activity.kt`, `*Fragment.kt`, `styles.xml` |
| iOS SwiftUI | `Package.swift`/`xcodeproj` + `SwiftUI` | `*View.swift`, `*Screen.swift`, `Theme.swift`, `Color.swift` |
| iOS UIKit | `xcodeproj` + `UIKit` | `*ViewController.swift`, `*View.swift`, `storyboard/xib` |
| React/Vite/Next | `package.json` + `react`/`vite` | `src/components/**/*.tsx`, `src/pages/*.tsx`, `tailwind.config.js`, `theme/*` |
| Flutter | `pubspec.yaml` + `flutter` | `lib/**/*.dart`, `theme.dart`, `widgets/*` |
| Desktop/Electron | `package.json` + `electron` | `src/renderer/**`, `preload.js` |

**For each screen to showcase:** Read the actual component file fully — extract:
- Layout structure (column/row/grid, weights, spacings)
- Color palette (exact hex from theme)
- Typography (font families, sizes, weights)
- Icon names/paths (copy exact from source)
- Component tree (nested structure)
- Adaptive breakpoints (phone vs tablet logic)
- Interactive states (hover, focus, pressed) — record only static frames

**Do NOT invent** — copy strings, colors, dimensions, icons directly from source.

### 3) Scaffold HTML promo site in new subfolder

Create `<output>/index_phone.html` (1080×1920) and `<output>/index_widescreen.html` (1920×1080) sharing one `<style>` block.

**Stage setup (same for all):**
```html
html,body{width:100vw;height:100vh;overflow:hidden;background:#000;display:flex;align-items:center;justify-content:center}
#stage-wrap{position:relative;transform-origin:center center}
<script>
const W = 1080, H = 1920; // for index_phone.html (use W=1920, H=1080 for index_widescreen.html)
function adjustScale(){const s=Math.min(innerWidth/W,innerHeight/H);document.getElementById('stage-wrap').style.transform='scale('+s+')'}addEventListener('resize',adjustScale);adjustScale();
</script>
```
- Phone: `W=1080 H=1920` → `#stage-wrap{width:1080;height:1920}`
- Widescreen: `W=1920 H=1080` → `#stage-wrap{width:1920;height:1080}`

**Device frames (responsive to detected form factors):**

| Target | Frame dimensions | Style notes |
|--------|------------------|-------------|
| Phone | Detect from app (e.g. 375×812 iOS, 360×780 Android) → scale to stage | Rounded ~42-56px, notch/cam cutout if app has one, shadow layers |
| Tablet | Detect from app (e.g. 768×1024 iPad, 800×1280 Android) | Rounded ~20-28px, no cam, thinner bezel |
| Desktop | App's desktop breakpoint or 1280×720 | Window chrome if app has one |

**Layout translation (per platform's adaptive pattern):**

| Platform | Phone pattern | Tablet/Desktop pattern |
|----------|---------------|------------------------|
| Compose | `Column` single-pane | `Row` two-pane (`weight(1.1) | divider | weight(1.0)`) via `rememberIsTwoPane()` |
| SwiftUI | `NavigationStack` + `NavigationView` | `NavigationSplitView` (sidebar/detail) |
| React/Flutter | Single-column `Column` | `Row`/`Grid` with sidebar, `MediaQuery` breakpoints |
| Desktop | Windowed | Native window chrome |

**Translate app's adaptive logic to CSS:**
```css
/* Phone single-pane */
.phone-screen { display:flex; flex-direction:column; }
/* Tablet two-pane */
.tablet-screen { display:flex; }
.tablet-screen .left { flex:1.1; border-right:1px solid var(--divider); }
.tablet-screen .right { flex:1; overflow-y:auto; }
```

**Stage scaling:** `adjustScale() { scale = min(w/W, h/H); stage.style.transform = 'scale('+scale+')' }` — ensures `scale=1` when viewport matches stage.

**Fonts — self-host them, never a CDN (recording breaks silently otherwise):**
- Download the app's font families/weights as woff2 (latin subset is enough) into `<output>/fonts/` and declare local `@font-face { ... font-display: block; src: url('fonts/<family>-<weight>.woff2') }`. **Never `@import` Google Fonts or any CDN in a recorded page** — if the network is down/blocked/slow during a recording run, the page still starts and the video is captured in a much wider system fallback font. The page (viewed online) looks fine, the video looks wrong — a mismatch that is hard to diagnose later.
- **Check the font license before self-hosting.** Only commit or redistribute woff2 files you're allowed to embed (OFL / Apache-2.0 / Google Fonts, or an app-bundled font whose license permits embedding). If the app uses a paid font that forbids redistribution, keep the files out of version control (download at setup time, add `fonts/` to `.gitignore`) — or substitute a close open font.
- Emoji/symbol glyphs (🚀 ✨ • —) may stay on system fonts; they render from fontconfig, not the CDN.

**Composition — the device must fill the frame:**
- Browser viewing hides bad proportions: the stage scales-to-fit any window over a dark page background, so dead space blends in. The recorded video shows the stage's true proportions — a small device with large empty bands reads as "too much space around it".
- Size the device mockup to dominate: **~50-60% of frame width on widescreen/tablet stages, ~70-80% on phone portrait stages**, with ≤ ~200px breathing room on any side. Scale the device via `transform: scale(n)` on the mockup element (all inner overlays scale together; nothing reflows), and scale its glow/backdrop by the same factor.
- Rebalance the device's anchor point after scaling (e.g. shift center down on portrait stages) so leftover space is split evenly around the caption side; keep **≥ ~150px gap** between device edge and captions, and ≥ ~180px between device edge and frame edge.
- Verify framing per scene at **exact stage resolution** (jump-to-scene helper or timeline-aligned screenshots at `W×H` viewport) — never by eyeballing the page in a browser window.

**Captions outside device:** Position at `top:50% translateY(-50%)` left/right of device, `width:380-420px`, gap `~180px` symmetric. Use JS `setOffset('left'|'right')` to shift device `translateX(±180px)` away from active caption side (verified `gap ~248px`, `overlap:false`).

**Outro:** Centered (`inset:0 flex center`), device fades out (`opacity:0` transition) not slide — no glitch.

**Hide scrollbars globally:** `* {scrollbar-width:none} ::-webkit-scrollbar{display:none}` — prevents flash during crossfade.

**Hide control dock by default:**
```css
#showcaseControls{display:none!important}
body.show-controls #showcaseControls{display:flex}
```
```js
if(!navigator.webdriver) document.body.classList.add('show-controls');
```

### 4) Recording hooks (deterministic, no cut-off)

In each HTML `<script>` — **works for both the Node recorder and hosted Playwright integrations** (both set `navigator.webdriver=true`):

```js
// Hide dock in ALL recordings (node + integrations both use Playwright → webdriver=true)
if(!navigator.webdriver) document.body.classList.add('show-controls');

// Font gate — verify faces ACTUALLY loaded, never swallow failures.
// fonts.load() resolves with the loaded FontFace array; require length > 0.
// Do NOT trust document.fonts.check() alone: it returns true vacuously when
// no @font-face exists (e.g. the CSS failed to download).
window.SHOWCASE_FONTS_OK = Promise.all([
  document.fonts.load("800 40px 'AppFont'"),   // families/weights from app theme
  document.fonts.load("700 16px 'AppMono'")
]).then(loaded => loaded.every(faces => faces.length > 0)).catch(() => false);

// Asset gate + start (only after fonts verified; log loudly on failure)
SHOWCASE_FONTS_OK.then(ok => {
  if (!ok) console.error('[promo] webfonts failed to load — text will render in a fallback font');
  return Promise.all(Array.from(document.images).map(i=>i.decode().catch(()=>{})));
}).then(() => start(0));

// Expose completion promise
window.SHOWCASE_DONE = new Promise(r => window.__resolveShowcaseDone = r);

// Deterministic timeline cue-runner pattern:
function start(offsetMs = 0) {
  const cues = [
    { at: 0,     fn: () => setScene('intro') },
    { at: 3500,  fn: () => setScene('feature1') },
    { at: 8000,  fn: () => setScene('feature2') },
    { at: 13000, fn: () => setScene('feature3') },
    { at: 18000, fn: () => setScene('outro') },
    { at: 22000, fn: () => window.__resolveShowcaseDone(true) } // TOTAL
  ];
  cues.forEach(cue => {
    const delay = cue.at - offsetMs;
    if (delay >= 0) setTimeout(cue.fn, delay);
  });
}
```

**CSS (both files):** Dock hidden by default, only visible when `show-controls` class added:
```css
#showcaseControls{display:none!important}
body.show-controls #showcaseControls{display:flex}
```

**Timeline:** `TOTAL` = last cue + 1500ms tail. Schedule in ms: `intro→home→editor→gif→converters→outro`. Extended intro = +1000ms on intro cues.

### 5) Record — two equivalent options

**Option A — Node script** (`record.mjs` in output folder, best for CI):
```js
import {chromium} from 'playwright-core';
import {homedir, platform} from 'os';
import {join,readdirSync,existsSync,renameSync,mkdirSync} from 'fs';
import {pathToFileURL} from 'url';
// Playwright's default launch() already resolves the browser cache per platform
// (~/.cache/ms-playwright on Linux/macOS, %LOCALAPPDATA%\ms-playwright on Windows).
// Only fall back to manual discovery if it fails.
const win = platform() === 'win32';
const cacheDirs = win ? [join(process.env.LOCALAPPDATA ?? '', 'ms-playwright')] : [join(homedir(),'.cache','ms-playwright')];
const execRel = win ? ['chrome-win64/chrome.exe','chrome-win/chrome.exe']
  : platform() === 'darwin' ? ['chrome-mac/Chromium.app/Contents/MacOS/Chromium','chrome-mac-arm64/Chromium.app/Contents/MacOS/Chromium']
  : ['chrome-linux64/chrome','chrome-linux/chrome'];
function findChromium(){
  for (const cache of cacheDirs) {
    if (!existsSync(cache)) continue;
    for (const d of readdirSync(cache).filter(d=>d.startsWith('chromium-')).sort().reverse()) {
      const exec = execRel.map(p=>join(cache,d,p)).find(existsSync);
      if (exec) return exec;
    }
  }
  return null;
}
async function launch(){
  try { return await chromium.launch({headless: true}); }
  catch {
    const exec = findChromium();
    if (!exec) throw new Error('chromium not found — run: npx playwright install chromium');
    return chromium.launch({executablePath: exec, headless: true});
  }
}
const browser = await launch();
async function rec(w,h,file,name){
  const dir=join(process.cwd(),'out','.tmp'); mkdirSync(dir,{recursive:true});
  const ctx=await browser.newContext({viewport:{width:w,height:h},deviceScaleFactor:1,recordVideo:{dir,size:{width:w,height:h}}});
  const p=await ctx.newPage();
  await p.goto(pathToFileURL(join(process.cwd(),file)).href,{waitUntil:'load'});
  // Refuse to record a fallback-font video
  const fontsOk = await p.evaluate(()=>Promise.resolve(window.SHOWCASE_FONTS_OK).then(v=>v===true,()=>false));
  if(!fontsOk) throw new Error(file+': webfonts failed to load; not recording');
  await p.evaluate(async()=>Promise.all([...document.images].map(i=>i.decode().catch(()=>{}))));
  await Promise.race([p.evaluate(()=>window.SHOWCASE_DONE),p.waitForTimeout(33000)]);
  await p.waitForTimeout(1200);
  const v=p.video(); await p.close(); await ctx.close();
  renameSync(await v.path(), join(process.cwd(),'out',name+'.webm'));
}
await rec(1080,1920,'index_phone.html','promo_phone');
await rec(1920,1080,'index_widescreen.html','promo_widescreen');
await browser.close();
```
Run: `node record.mjs`

**Option B — your agent's Playwright integration** (fast for ad-hoc; exact tool name depends on your harness, e.g. a `browser_run_code`-style tool). The code below is harness-agnostic Playwright — if your harness exposes a run-code tool, give it this function (adapt the exact tool call shape to your harness). Video dir is `./out/.tmp-record` — create it first or point at any writable directory on your OS:
```js
async (page) => {
  const browser = page.context().browser();
  const outputDir = '/absolute/path/to/project/marketing/promo-<appname>'; // set to output directory
  async function rec(w,h,file){
    const dir = `${outputDir}/out/.tmp-record`; // create it first: mkdir -p ./out/.tmp-record
    const ctx = await browser.newContext({viewport:{width:w,height:h},deviceScaleFactor:1,recordVideo:{dir,size:{width:w,height:h}}});
    const p = await ctx.newPage();
    await p.goto(`file://${outputDir}/${file}`,{waitUntil:'load'});
    const fontsOk = await p.evaluate(()=>Promise.resolve(window.SHOWCASE_FONTS_OK).then(v=>v===true,()=>false));
    if(!fontsOk) throw new Error(file+': webfonts failed to load; not recording');
    await p.evaluate(async()=>Promise.all([...document.images].map(i=>i.decode().catch(()=>{}))));
    await Promise.race([p.evaluate(()=>window.SHOWCASE_DONE),p.waitForTimeout(33000)]);
    await p.waitForTimeout(1200);
    const v=p.video(); await p.close(); await ctx.close();
    return await v.path();
  }
  const phone = await rec(1080,1920,'index_phone.html');
  const wide = await rec(1920,1080,'index_widescreen.html');
  return 'phone:'+phone+' wide:'+wide;
}
```

**Both use `navigator.webdriver=true` → dock hidden automatically.** Copy results to `out/*.webm`. MP4 requires external ffmpeg with libx264.

### 6) Verify

- If `ffmpeg`/`ffprobe` is missing, install it first (`brew install ffmpeg` / `winget install ffmpeg` / `sudo apt install ffmpeg`) — the dimension checks below and MP4 output both need it. Without it, you can still view `./out/*.webm` in a player and compare visually against the page.

- `grep -Ec 'bnav|gestbar' <output>/*.html` returns `0` when the source app has no bottom navigation (no invented nav bar)
- `ffprobe -v error -show_format out/*.webm` → `Duration ~27.5s`, `1080x1920` / `1920x1080`
- `ffmpeg -ss 5 -i out/*.webm -frames:v 1 ./out/frame.png` → PNG IHDR = exact stage dims
- `capGap` symmetric `~248px`, `outro phoneOpacity 0`
- **Fonts actually render (video vs page):** extract a frame with text (`ffmpeg -ss <t> -i out/x.webm -frames:v 1 ./out/frame.png`), measure a known text run's pixel width (threshold-scan the caption region in the PNG), and compare against the same measurement on a page screenshot at stage resolution. A mismatch means a fallback font got recorded. Also spot-check with the network blocked (Playwright context `offline:true`) — fonts and framing must be identical, and the recorder must abort.
- **Composition per scene, before recording:** screenshot every scene at the exact stage viewport (jump-to-scene helper, or auto-run + capture at schedule times) and check: device ≥ ~50% (widescreen) / ~70% (phone) of frame width; no empty band > ~200px on any side; no caption/device overlap; nothing clipped at frame edges. A browser window hides all of this — the raw video frame is the truth.

## Output

All files under **new subfolder** (e.g. `marketing/promo-<appname>/`):
- `index_phone.html` (1080×1920)
- `index_widescreen.html` (1920×1080)
- `fonts/` — self-hosted woff2 files for the app's font families/weights
- `record.mjs`
- `out/*.webm`
- `README.md` with usage

## Anti-patterns (never do)

- Invent UI — always read actual source components.
- Leave bottom nav if app has none.
- Hide dock only via `body.rec` — use `display:none` default + `show-controls` opt-in.
- `recordVideo` without explicit `size` → `800x800` letterbox.
- Overlap captions/device — verify `overlap:false`, symmetric gap.
- Hardcode colors/strings — extract from theme files.
- Load fonts from Google Fonts/any CDN in a recorded page — self-host woff2; a network hiccup silently records a fallback-font video that looks "spaced out" vs the page.
- Gate the timeline on fonts with `.catch(()=>{})` or trust `document.fonts.check()` alone — it returns `true` vacuously when no `@font-face` exists; require `fonts.load()` to return loaded faces and expose the verdict for the recorder to assert.
- Let the recorder proceed when fonts failed — assert `SHOWCASE_FONTS_OK === true` before capturing; abort with a clear error instead.
- Ship a stage where the device is small with big empty margins — browsers hide it (scale-to-fit over a dark page), the video doesn't. Scale the mockup to ~50-60% (widescreen) / ~70-80% (phone) of frame width and verify every scene's framing at exact stage resolution before recording.

Wersje

W bazie nie ma innych skilli o nazwie promo-video-generator.

Migawka bazy z 13.11.2026 · wersja paczki 73dc5fade0be (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90app-promo-video
    Tworzy krótkie filmy promocyjne aplikacji z kilku zrzutów ekranu, z lektorem AI, napisami i muzyką w czterech proporcjach.
  • 100record-promo
    Nagrywa autonomicznie wideo promocyjne gry w 50 klatkach na sekundę do mediów społecznościowych, bez testowania rozgrywki.
  • 90framezero
    Tworzy pionowe filmy promocyjne aplikacji dla TikToka, Reels i Shorts jako sceny HTML, renderowane do MP4 w 4K60 z muzyką generowaną kodem.
  • 90website-to-hyperframes
    Przechwytuje stronę internetową i tworzy z niej wideo HyperFrames: reklamę społecznościową, wycieczkę po produkcie lub promo na podstawie podanego adresu URL.
  • 90website-to-hyperframes
    Przechwytuje stronę internetową i tworzy z niej wideo HyperFrames: reklamę społecznościową, wycieczkę po produkcie lub promo na podstawie podanego adresu URL.
  • 100promo-video
    Nagrywa autonomicznie wideo promocyjne gry Phaser z wysoką liczbą klatek przez pomocnik protokołu Chrome DevTools.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.