teaser-screenshots
БесплатноБез исполняемых скриптовНе проверенReproducibly capture in-product UI screenshots (admin popovers, settings teasers, dashboard widgets) used as embedded images in premium upsell teasers. Use…
от 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
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-premiumAt 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 populateto repopulate.JS bundle must be current if you changed the
PremiumTeaserBlurredcomponent —npm run buildfirst so the free-mode capture sees the latest teaser markup.Auth cache: delete
tests/playwright/.auth/admin.jsonto 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.jsxor the premiumUser_Card_Module - If a screenshot starts looking stale (old timestamps, mismatched palette)
Adding a new in-product screenshot pair
- Write a Playwright spec at
tests/playwright/screenshot-teaser-<name>.spec.js. Pattern to follow: copyscreenshot-teaser-user-card.spec.js. Key bits:test.use({ viewport, deviceScaleFactor: 2 })for retina output- Use the cached admin session (the
teaserproject inplaywright.config.jshandles auth through the `
Установить teaser-screenshots в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadBashEditWriteFAQ
Что делает скилл 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), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic