Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

teaser-screenshots

БесплатноБез исполняемых скриптовНе проверен

Reproducibly capture in-product UI screenshots (admin popovers, settings teasers, dashboard widgets) used as embedded images in premium upsell teasers. Use…

bonnyот bonny★ 315 звёзд на GitHub

Об этом скилле

In-product teaser screenshots

These screenshots are embedded inside the free version's UI (e.g. the user card teaser block) to show "this is what the same surface looks like with premium." Real screenshots beat blurred placeholders for honesty, conversion, and WP.org compliance (see freemium_upsell_strategy.md §5).

Captured screenshots

A single capture run produces five PNGs in assets/images/. The orchestrator (scripts/capture-teaser-screenshots.sh) toggles the premium plugin between the two passes and trap-restores it on exit.

File Mode Variant Used in
user-card-premium-details.png premium active premium rows only src/components/UserCard.jsx — PremiumTeaserBlurred embedded preview
user-card-with-premium.png premium active close-up Marketing / docs
user-card-with-premium-context.png premium active with event-row context Marketing / blog / docs
user-card-without-premium.png premium deactivated close-up Marketing / docs ("what free users see")
user-card-without-premium-context.png premium deactivated with event-row context Marketing / blog

Add a row whenever a new in-product screenshot is wired up.

Pre-flight

  1. Premium add-on must be installed on the stable WP install (the orchestrator handles activate/deactivate itself, but the plugin files need to exist). Verify:

    cd ../_docker-compose-to-run-on-system-boot   # or $SH_DOCKER_DIR
    docker compose run --rm wpcli_mariadb plugin list | grep simple-history-premium
    
  2. At least one user in the visible log needs real IP/UA history. On Pär's stable install this is user 1 (par) — that's the user the spec ends up clicking. If you wipe and reseed the log, use wp simple-history dev populate to repopulate.

  3. JS bundle must be current if you changed the PremiumTeaserBlurred component — npm run build first so the free-mode capture sees the latest teaser markup.

  4. Auth cache: delete tests/playwright/.auth/admin.json to force a fresh login (otherwise re-uses cached session). Usually fine to leave alone.

Capture command

npm run screenshots:teaser-user-card

Runs in ~30 seconds (two Playwright passes + plugin toggles). For each mode the spec iterates the first ~15 user-card triggers on the events page, picks the first whose popover meets the mode-specific ready condition — premium: the "From X · …" meta line; free: the embedded .sh-UserCard__teaserScreenshot figure — then captures two PNGs:

  • a tight clip of just the popover
  • a wider clip that includes the event row the trigger anchors to (so the screenshot shows where the popover lives on the page)

After capture, the orchestrator runs each PNG through pngquant (--quality=80-95 --strip --skip-if-larger) — typically shrinks files ~65–70% with no visible quality loss. If pngquant isn't installed (brew install pngquant), the step is skipped with a hint and the un-optimized PNGs still ship.

The orchestrator does not yet run the lossless second pass, so finish the job by hand before committing (see code.md):

oxipng -o max --strip safe assets/images/user-card-*.png

Run the orchestrator instead of invoking Playwright directly — the script handles the premium activate/deactivate dance, the optimization step, and trap-restores premium on exit even if a test fails. Manual single-mode runs are still possible via SH_TEASER_MODE=premium|free playwright test tests/playwright/screenshot-teaser-user-card.spec.js --project=teaser (but you'll need to run pngquant and oxipng yourself afterwards).

When to re-run

  • Any time the user card layout, styling, or copy changes — keep the embedded teaser in sync with reality
  • After updating premium card details (new field, removed field, reordered)
  • Before tagging a release that touches src/components/UserCard.jsx or the premium User_Card_Module
  • If a screenshot starts looking stale (old timestamps, mismatched palette)

Adding a new in-product screenshot pair

  1. Write a Playwright spec at tests/playwright/screenshot-teaser-<name>.spec.js. Pattern to follow: copy screenshot-teaser-user-card.spec.js. Key bits:
    • test.use({ viewport, deviceScaleFactor: 2 }) for retina output
    • Use the cached admin session (the teaser project in playwright.config.js handles auth through the `
Полный SKILL.md на GitHub

Установить teaser-screenshots в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Bash
Edit
Write

FAQ

Что делает скилл teaser-screenshots?

Reproducibly capture in-product UI screenshots (admin popovers, settings teasers, dashboard widgets) used as embedded images in premium upsell teasers. Use whenever a teaser image needs refreshing after the underlying UI changes.

Как установить скилл teaser-screenshots?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл teaser-screenshots запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить teaser-screenshots с