Skip to content

oberconcejo/VS-CODE / .agents/skills/app-store-screenshots

app-store-screenshots

Flagged

Use when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS, macOS, and/or Android apps, or scaffolding a screenshot editor with Next.js. Triggers on app store, mac app store, play store, screenshots, marketing assets, html-to-image, phone mockup, mac mockup, android screenshots, feature graphic.

FileKindSize
SKILL.mdskill md63.5 KB
copy-ideas.mdmarkdown8.9 KB
iphone-duo.mdmarkdown13.8 KB
mockup.pngbinary92.8 KB
scripts/capture-iphone-duo.shscript7.0 KB
style-prompts.mdmarkdown10.2 KB
style-prompts/01-retro-rubberhose-mascot.mdmarkdown24.7 KB
style-prompts/02-moody-curated-dating.mdmarkdown27.0 KB
style-prompts/03-paper-sticker-skeuomorphic.mdmarkdown28.3 KB
style-prompts/04-dreamy-pastel-couples.mdmarkdown24.7 KB
style-prompts/05-hand-drawn-editorial-tasks.mdmarkdown23.5 KB
style-prompts/06-glossy-3d-kbeauty-creator.mdmarkdown21.1 KB
style-prompts/07-liquid-glass-aurora.mdmarkdown19.8 KB
style-prompts/08-swiss-grid-bold.mdmarkdown20.0 KB
style-prompts/09-neon-athletic-night.mdmarkdown22.3 KB
style-prompts/10-magazine-cover-editorial.mdmarkdown25.2 KB
style-prompts/11-candy-pop-social.mdmarkdown19.9 KB
style-prompts/12-soft-clay-wellness.mdmarkdown20.6 KB
style-prompts/13-midnight-glow-pro.mdmarkdown33.7 KB
style-prompts/14-risograph-zine.mdmarkdown35.0 KB
style-prompts/15-bento-keynote-grid.mdmarkdown31.3 KB
style-prompts/16-toybox-primary.mdmarkdown35.2 KB
style-prompts/17-quiet-japandi.mdmarkdown30.0 KB
style-prompts/18-vintage-travel-poster.mdmarkdown37.6 KB
style-prompts/_QUALITY_BAR.mdmarkdown13.6 KB
template/.github/workflows/e2e.ymlconfig783 B
template/.gitignoreother470 B
template/README.mdmarkdown24.1 KB
template/app-store-screenshots.jsonconfig8.3 KB
template/bun.lockother71.9 KB
template/components.jsonconfig449 B
template/docs/testing/e2e.mdmarkdown23.5 KB
template/e2e-army/chrome-provider.tsscript1.7 KB
template/e2e-army/server.cjsscript1.6 KB
template/e2e.config.tsscript824 B
template/next.config.mjsscript294 B
template/package.jsonmanifest1.6 KB
template/postcss.config.mjsscript81 B
template/public/fonts/imported/.gitkeepother1 B
template/public/frames/.gitkeepother0 B
template/public/frames/duo-inner-landscape.pngbinary777.3 KB
template/public/frames/duo-inner-portrait.pngbinary802.5 KB
template/public/frames/duo-outer-landscape.pngbinary371.9 KB
template/public/frames/duo-outer-portrait.pngbinary446.3 KB
template/public/frames/ipad-portrait.pngbinary307.1 KB
template/public/frames/iphone-portrait.pngbinary478.4 KB
template/public/frames/mac.pngbinary660.7 KB
template/public/frames/tv.pngbinary833.9 KB
template/public/frames/watch.pngbinary234.3 KB
template/public/mockup.pngbinary92.8 KB
template/public/screenshots/android/phone/en/.gitkeepother0 B
template/public/screenshots/apple/ipad/en/.gitkeepother0 B
template/public/screenshots/apple/iphone/en/.gitkeepother0 B
template/src/app/api/frames/route.tsscript1.5 KB
template/src/app/api/project/route.tsscript3.4 KB
template/src/app/api/upload-font/route.tsscript4.5 KB
template/src/app/api/upload/route.tsscript3.2 KB
template/src/app/fonts/imported/[filename]/route.tsscript359 B
template/src/app/frames/[filename]/route.tsscript1.3 KB
template/src/app/globals.cssother3.2 KB
template/src/app/layout.tsxother487 B
template/src/app/page.tsxother141 B
template/src/app/screenshots/uploaded/[filename]/route.tsscript328 B
template/src/components/editor/background-controls.tsxother2.9 KB
template/src/components/editor/callout-controls.tsxother7.9 KB
template/src/components/editor/create-image-mask.tsscript586 B
template/src/components/editor/device-frames.tsxother20.9 KB
template/src/components/editor/font-importer.tsxother3.0 KB
template/src/components/editor/image-element-canvas.tsxother1.4 KB
template/src/components/editor/inspector.tsxother40.9 KB
template/src/components/editor/preview-stage.tsxother10.4 KB
template/src/components/editor/scene-layers.tsxother14.3 KB
template/src/components/editor/scene-playground.tsxother10.5 KB
template/src/components/editor/screenshot-editor.tsxother37.6 KB
template/src/components/editor/screenshot-picker.tsxother7.2 KB
template/src/components/editor/sidebar.tsxother4.3 KB
template/src/components/editor/slide-canvas.tsxother54.9 KB
template/src/components/editor/slide-thumb.tsxother5.9 KB
template/src/components/editor/style-lab.tsxother17.4 KB
template/src/components/editor/toolbar.tsxother14.7 KB
template/src/components/ui/button.tsxother1.8 KB
template/src/components/ui/card.tsxother1.2 KB
template/src/components/ui/dialog.tsxother3.1 KB
template/src/components/ui/dropdown-menu.tsxother3.7 KB
template/src/components/ui/input.tsxother717 B
template/src/components/ui/label.tsxother714 B
template/src/components/ui/popover.tsxother1.0 KB
template/src/components/ui/select.tsxother3.7 KB
template/src/components/ui/tabs.tsxother1.9 KB
template/src/components/ui/textarea.tsxother644 B
template/src/components/ui/tooltip.tsxother898 B
template/src/lib/clean-hex-color.tsscript225 B
template/src/lib/clean-imported-font.tsscript990 B
template/src/lib/constants.tsscript21.9 KB
template/src/lib/contrast.tsscript3.0 KB
template/src/lib/copy-ideas.tsscript2.9 KB
template/src/lib/defaults.tsscript9.2 KB
template/src/lib/elements.tsscript1.3 KB
template/src/lib/export-assets.tsscript1.3 KB
template/src/lib/export-render.tsscript8.9 KB
template/src/lib/frame-assets.tsscript7.7 KB
template/src/lib/image-cache.tsscript3.0 KB
template/src/lib/locale.tsscript1.9 KB
template/src/lib/measure-frame.tsscript3.6 KB
template/src/lib/png-encode.tsscript2.9 KB
template/src/lib/png-rgb.tsscript5.4 KB
template/src/lib/png-worker.tsscript545 B
template/src/lib/project-validation.tsscript4.9 KB
template/src/lib/request-body.tsscript1.7 KB
template/src/lib/request-guard.tsscript2.0 KB
template/src/lib/scene.tsscript4.7 KB
template/src/lib/serve-asset.tsscript1.0 KB
template/src/lib/storage.tsscript16.5 KB
template/src/lib/style-lab.tsscript13.1 KB
template/src/lib/types.tsscript7.4 KB
template/src/lib/typography.tsscript2.0 KB
template/src/lib/utils.tsscript169 B
template/src/lib/write-asset.tsscript448 B
template/tailwind.config.tsscript2.0 KB
template/tests/editor.e2e.tsscript12.5 KB
template/tests/harness/api-bug-bash.cjsscript9.5 KB
template/tests/harness/bug-bash.cjsscript34.9 KB
template/tests/harness/migration-fixture.cjsscript7.4 KB
template/tests/harness/run.cjsscript466 B
template/tests/harness/ui-bug-bash.cjsscript14.9 KB
template/tests/regression.e2e.tsscript1.5 KB
template/tests/scene-style-lab.e2e.tsscript14.7 KB
template/tests/targets.e2e.tsscript12.5 KB
template/tsconfig.jsonconfig594 B

template/tests/targets.e2e.ts

View on GitHub
import { test } from '@e2e-dev/web';
import type { Browser } from '@e2e-dev/web';
import { expect } from 'e2e';
import { readFile, readdir, stat } from 'node:fs/promises';
import JSZip from 'jszip';
import sharp from 'sharp';

// iPhone Duo and App Store creative targets, plus the issue 41 export regression.

type State = Record<string, any>;
const slide = (id: string, layout = 'no-device', extra: State = {}) => ({ id, layout, screenshot: '', label: { en: 'FEATURE' }, headline: { en: id }, ...extra });
const project = (device: string, slidesByDevice: State, extra: State = {}): State => ({
  schemaVersion: 3, appName: 'Target Army', themeId: 'clean-light', connectedCanvas: true, locales: ['en'], locale: 'en',
  device, orientation: device.endsWith('-landscape') ? 'landscape' : 'portrait', slidesByDevice, ...extra,
});

async function mock(browser: Browser, initial: State) {
  const store = { state: initial };
  await browser.route('**/api/project', async route => {
    if (route.request.method === 'POST') store.state = JSON.parse(route.request.postData!);
    await route.fulfill({ json: { ok: true, state: store.state }, headers: { etag: '"mock"' } });
  });
  return store;
}

async function eventually(check: () => unknown | Promise<unknown>, timeout = 10_000) {
  const deadline = Date.now() + timeout;
  for (;;) {
    try { await check(); return; } catch (error) {
      if (Date.now() > deadline) throw error;
      await new Promise(resolve => setTimeout(resolve, 200));
    }
  }
}

// Downloads in the same minute share a name across tests; take the newest.
async function zipFrom(path: string) {
  const matches = (await readdir('.e2e/artifacts', { recursive: true })).filter(file => file.endsWith(path));
  await expect(matches.length).toBeGreaterThan(0);
  const dated = await Promise.all(matches.map(async file => ({ file, at: (await stat(`.e2e/artifacts/${file}`)).mtimeMs })));
  dated.sort((a, b) => b.at - a.at);
  return JSZip.loadAsync(await readFile(`.e2e/artifacts/${dated[0].file}`));
}

const EXACT: Record<string, [number, number][]> = {
  'duo-outer': [[1398, 2034]],
  'duo-outer-landscape': [[2034, 1398]],
  'duo-inner': [[2007, 2853]],
  'duo-inner-landscape': [[2853, 2007]],
  'creative-universal': [[5244, 2950]],
  'creative-header': [[3840, 1646]],
  'creative-search': [[3840, 2560], [1920, 1280]],
};

for (const [device, sizes] of Object.entries(EXACT)) {
  test(`${device} exports exact opaque RGB PNGs`, { timeout: 240_000 }, async ({ app, browser, screen }) => {
    await mock(browser, project(device, { [device]: [slide('One', 'hero'), slide('Two')] }));
    await app.open('/');
    await expect(screen.getByRole('textbox', 'Headline')).toHaveValue('One');
    const download = await browser.waitForDownload(() => screen.getByRole('button', 'Export bundle', { exact: true }).tap(), { timeout: 200_000 });
    const zip = await zipFrom(download.path);
    const pngs = Object.values(zip.files).filter(file => file.name.endsWith('.png'));
    await expect(pngs).toHaveLength(sizes.length * 2);
    for (const file of pngs) {
      const match = file.name.match(new RegExp(`^ios/${device}/(\\d+)x(\\d+)/en/0[12]-(hero|no-device)\\.png$`))!;
      await expect(match).toBeTruthy();
      const bytes = await file.async('nodebuffer');
      const [w, h] = [bytes.readUInt32BE(16), bytes.readUInt32BE(20)];
      await expect(sizes.some(([sw, sh]) => sw === w && sh === h)).toBe(true);
      await expect([Number(match[1]), Number(match[2])]).toEqual([w, h]);
      // Colour type 2: 24-bit RGB, no alpha channel.
      await expect(bytes[25]).toBe(2);
      await expect((await sharp(bytes).metadata()).hasAlpha).toBe(false);
    }
  });
}

test('duo orientations keep independent decks and placements', async ({ app, browser, screen }) => {
  const placed = { device: { x: 120, y: 900, width: 700, height: 1000, rotation: 4 } };
  const store = await mock(browser, project('duo-outer', {
    'duo-outer': [slide('Portrait copy', 'hero', { transforms: placed })],
    'duo-outer-landscape': [slide('Landscape copy', 'split-landscape')],
    'duo-inner': [slide('Inner copy', 'hero')],
  }));
  await app.open('/');
  const headline = screen.getByRole('textbox', 'Headline');
  await expect(headline).toHaveValue('Portrait copy');
  await expect(screen.getByRole('combobox', 'Device')).toContainText('iPhone Duo outer');

  await screen.getByRole('combobox', 'Orientation').tap();
  await screen.getByRole('option', 'Landscape', { exact: true }).tap();
  await expect(headline).toHaveValue('Landscape copy');
  await headline.fill('Landscape edited');

  // Changing display keeps the orientation being worked in.
  await screen.getByRole('combobox', 'Device').tap();
  await screen.getByRole('option', 'iPhone Duo inner', { exact: true }).tap();
  await expect(screen.getByRole('combobox', 'Orientation')).toContainText('Landscape');
  await screen.getByRole('combobox', 'Orientation').tap();
  await screen.getByRole('option', 'Portrait', { exact: true }).tap();
  await expect(headline).toHaveValue('Inner copy');

  await screen.getByRole('combobox', 'Device').tap();
  await screen.getByRole('option', 'iPhone Duo outer', { exact: true }).tap();
  await expect(headline).toHaveValue('Portrait copy');
  await eventually(async () => {
    await expect(store.state.device).toBe('duo-outer');
    await expect(store.state.orientation).toBe('portrait');
    await expect(store.state.slidesByDevice['duo-outer-landscape'][0].headline.en).toBe('Landscape edited');
    await expect(store.state.slidesByDevice['duo-outer'][0].transforms).toEqual(placed);
    await expect(store.state.slidesByDevice['duo-outer'][0].headline.en).toBe('Portrait copy');
  });

  // Reload restores the same deck and orientation from the saved project.
  await browser.reload();
  await expect(screen.getByRole('textbox', 'Headline')).toHaveValue('Portrait copy');
  await expect(screen.getByRole('combobox', 'Orientation')).toContainText('Portrait');
});

test('legacy v2 projects gain the new decks without changing existing ones', async ({ app, browser, screen }) => {
  const legacy: State = { ...project('iphone', { iphone: [slide('Legacy', 'hero', { transforms: { caption: { x: 10, y: 20, width: 900, height: 400 } } })] }), schemaVersion: 2 };
  const store = await mock(browser, legacy);
  await app.open('/');
  await expect(screen.getByRole('textbox', 'Headline')).toHaveValue('Legacy');
  await screen.getByRole('textbox', 'App name').fill('Legacy migrated');
  await eventually(async () => {
    await expect(store.state.schemaVersion).toBe(3);
    const [kept] = store.state.slidesByDevice.iphone;
    await expect([kept.id, kept.layout, kept.headline, kept.transforms]).toEqual(['Legacy', 'hero', { en: 'Legacy' }, legacy.slidesByDevice.iphone[0].transforms]);
    for (const device of Object.keys(EXACT)) await expect(store.state.slidesByDevice[device].length).toBeGreaterThan(0);
  });
});

test('universal creative shows safe area guides and placement previews that never export', async ({ app, browser, screen }) => {
  await mock(browser, project('creative-universal', { 'creative-universal': [slide('Brand line', 'split-landscape')] }));
  await app.open('/');
  await expect(browser.locator('main [data-creative-guide]')).toHaveCount(1);
  await expect(screen.getByText('Art safe area', { exact: true })).toBeVisible();
  await expect(browser.locator('[aria-label="Placement previews"] figure')).toHaveCount(2);
  // Only the editable canvas has guides: not the export canvas, thumbnails or previews.
  await expect(await browser.evaluate(() => document.querySelectorAll('[data-creative-guide]').length)).toBe(1);
});

// Issue 41: clearing a label or headline exported the editor hints ("LABEL",
// "Headline goes here") into the PNG. Exported empty copy must match copy that
// renders nothing, while the editable canvas still shows the hints.
test('cleared copy exports empty while the canvas keeps its editing hints', { timeout: 240_000 }, async ({ app, browser, screen }) => {
  const plain = { backdrop: 'solid', span: false, decoration: 'none', shadow: 0, glow: 0, tilt: 0, headlineWeight: 700, headlineScale: 1, headlineCase: 'as-typed', captionAlign: 'auto' };
  // A zero-width space is not :empty, so it renders as genuinely blank copy.
  await mock(browser, project('watchos', {
    watchos: [
      slide('Cleared', 'no-device', { label: {}, headline: {} }),
      slide('Blank', 'no-device', { label: { en: '​' }, headline: { en: '​' } }),
    ],
  }, { scene: plain, connectedCanvas: false }));
  await app.open('/');
  await expect(browser.locator('main [contenteditable="plaintext-only"]').first()).toBeVisible();
  const hint = await browser.evaluate(() => {
    const fields = [...document.querySelectorAll('main [contenteditable="plaintext-only"]')].slice(0, 2);
    return fields.map(el => getComputedStyle(el, '::before').content);
  });
  await expect(hint).toEqual(['"LABEL"', '"Headline goes here"']);

  const download = await browser.waitForDownload(() => screen.getByRole('button', 'Export bundle', { exact: true }).tap(), { timeout: 200_000 });
  const zip = await zipFrom(download.path);
  const raw = async (name: string) => sharp(await zip.file(name)!.async('nodebuffer')).raw().toBuffer();
  const cleared = await raw('ios/watchos/422x514/en/01-no-device.png');
  const blank = await raw('ios/watchos/422x514/en/02-no-device.png');
  let differing = 0;
  for (let i = 0; i < cleared.length; i++) if (Math.abs(cleared[i] - blank[i]) > 24) differing++;
  await expect(differing).toBeLessThan(cleared.length * 0.001);
});

// On iPhone Duo, "Two devices" is the same phone folded and open: the back
// device is the other display, so it never borrows the front display's capture.
test('duo folded + open pairs the other display and never reuses the front capture', { timeout: 240_000 }, async ({ app, browser, screen }) => {
  // Routes fulfil text only, so the inner-display capture is an SVG of that size.
  const front = '<svg xmlns="http://www.w3.org/2000/svg" width="2853" height="2007"><rect width="2853" height="2007" fill="#4f46e5"/></svg>';
  await browser.route('**/screenshots/duo/front.svg', route => route.fulfill({ body: front, headers: { 'content-type': 'image/svg+xml' } }));
  await mock(browser, project('duo-inner-landscape', {
    'duo-inner-landscape': [slide('Pair', 'two-devices', { screenshot: '/screenshots/duo/front.svg', screenshotSecondary: '' })],
  }));
  await app.open('/');
  await expect(screen.getByRole('textbox', 'Headline')).toHaveValue('Pair');
  await expect(screen.getByRole('combobox', 'Layout')).toContainText('Folded + open');
  await expect(screen.getByText('iPhone Duo outer screenshot', { exact: true })).toBeVisible();
  // The front device shows its capture; only the closed phone waits for one.
  await eventually(async () => {
    await expect(await browser.evaluate(() => [...document.querySelectorAll('main')].map(m => m.textContent!.split('Drop a screenshot here').length - 1)[0])).toBe(1);
  });

  await screen.getByRole('button', 'Export bundle', { exact: true }).tap();
  await expect(screen.getByText('Export includes placeholder screenshots', { exact: true })).toBeVisible();
  await expect(browser.locator('[data-sonner-toast]').first()).toContainText('1 screen will export with an empty device.');
});

// The two Duo displays differ in shape by only 2.35 %, so an outer capture on the
// inner deck must still be flagged (and letterboxed), whether it is served from a
// URL or saved inline in the project, where its size is only known after decoding.
const outerCapture = '<svg xmlns="http://www.w3.org/2000/svg" width="1398" height="2034"><rect width="1398" height="2034" fill="#0ea5e9"/></svg>';
for (const [how, screenshot] of [
  ['served', '/screenshots/duo/outer.svg'],
  ['inline', `data:image/svg+xml;base64,${Buffer.from(outerCapture).toString('base64')}`],
] as const) {
  test(`an outer-display capture on the inner deck is flagged (${how})`, async ({ app, browser, screen }) => {
    await browser.route('**/screenshots/duo/outer.svg', route => route.fulfill({ body: outerCapture, headers: { 'content-type': 'image/svg+xml' } }));
    await mock(browser, project('duo-inner', { 'duo-inner': [slide('Wrong display', 'hero', { screenshot })] }));
    await app.open('/');
    await expect(screen.getByRole('textbox', 'Headline')).toHaveValue('Wrong display');
    await expect(screen.getByText(/isn't 2007 × 2853/)).toBeVisible();
    // Letterboxed, never cropped.
    await eventually(async () => {
      const fits = await browser.evaluate(() => [...document.querySelectorAll('main img')].map(i => getComputedStyle(i).objectFit));
      await expect(fits).toContain('contain');
    });
  });
}
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