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/src/lib/style-lab.ts

View on GitHub
// Style Lab: generates complete looks for a deck (palette, type, layout rhythm
// and scene), keeps locked parts from the current deck, and applies a look as
// one undoable edit. Generation is seeded, so the same seed always produces
// the same four looks.
import { SCREENSHOT_FONTS, THEMES, supportsLandscape } from "./constants";
import { DEFAULT_SCENE, sameScene, sceneOf } from "./scene";
import type { Device, Look, ProjectState, Scene, ScreenshotFontId, Slide, SlideLayout } from "./types";

export type LockKey = "palette" | "type" | "layout" | "scene";
export type Locks = Record<LockKey, boolean>;
export const NO_LOCKS: Locks = { palette: false, type: false, layout: false, scene: false };

export const LOCK_LABEL: Record<LockKey, { name: string; hint: string }> = {
  palette: { name: "Colors", hint: "Theme and which screens are inverted" },
  type: { name: "Type", hint: "Font, headline weight, case, alignment and size" },
  layout: { name: "Layout", hint: "Device placement on each screen" },
  scene: { name: "Scene", hint: "Backdrop, decoration, shadow, glow and tilt" },
};

type Rng = () => number;

// mulberry32: tiny, fast and good enough for picking design options.
function rng(seed: number): Rng {
  let a = seed >>> 0;
  return () => {
    a = (a + 0x6d2b79f5) >>> 0;
    let t = a;
    t = Math.imul(t ^ (t >>> 15), t | 1);
    t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
  };
}

const pick = <T>(r: Rng, items: readonly T[]): T => items[Math.floor(r() * items.length) % items.length];
const between = (r: Rng, min: number, max: number) => Math.round(min + r() * (max - min));
const signed = (r: Rng, min: number, max: number) => (r() < 0.5 ? -1 : 1) * between(r, min, max);

type Direction = {
  id: string;
  name: string;
  themes: string[];
  fonts: ScreenshotFontId[];
  layouts: SlideLayout[][];
  inverted: boolean[][];
  headlineScale: [number, number];
  scene: (r: Rng) => Omit<Scene, "headlineScale">;
};

export const DIRECTIONS: Direction[] = [
  {
    id: "editorial",
    name: "Editorial",
    themes: ["warm-editorial", "magazine-cover-editorial", "bloom-roast", "quiet-japandi", "hand-drawn-editorial-tasks"],
    fonts: ["baskerville", "palatino", "template-serif"],
    layouts: [["device-bottom", "hero"], ["hero", "device-bottom", "device-top"]],
    inverted: [[false, false, true], [false]],
    headlineScale: [0.95, 1.1],
    scene: (r) => ({
      backdrop: pick(r, ["lines", "solid", "gradient"] as const),
      span: false,
      decoration: pick(r, ["none", "rings"] as const),
      shadow: between(r, 25, 45),
      glow: 0,
      tilt: 0,
      headlineWeight: pick(r, [500, 600]),
      headlineCase: "as-typed",
      captionAlign: "left",
    }),
  },
  {
    id: "playful",
    name: "Playful",
    themes: ["candy-pop-social", "toybox-primary", "paper-sticker-skeuomorphic", "retro-rubberhose-mascot", "dreamy-pastel-couples"],
    fonts: ["futura", "avenir-next", "template-default"],
    layouts: [["hero", "two-devices", "device-top"], ["device-bottom", "device-top"]],
    inverted: [[false], [false, true]],
    headlineScale: [1.05, 1.2],
    scene: (r) => ({
      backdrop: pick(r, ["dots", "gradient", "aurora"] as const),
      span: r() < 0.5,
      decoration: pick(r, ["sparkles", "blobs"] as const),
      shadow: between(r, 40, 60),
      glow: between(r, 10, 30),
      tilt: signed(r, 8, 16),
      headlineWeight: pick(r, [800, 900]),
      headlineCase: "as-typed",
      captionAlign: "center",
    }),
  },
  {
    id: "cinematic",
    name: "Cinematic",
    themes: ["midnight-glow-pro", "neon-athletic-night", "dark-bold", "moody-curated-dating", "glossy-3d-kbeauty-creator"],
    fonts: ["helvetica-neue", "system-sans", "avenir-next"],
    layouts: [["hero"], ["hero", "device-bottom"]],
    inverted: [[false]],
    headlineScale: [0.9, 1],
    scene: (r) => ({
      backdrop: pick(r, ["spotlight", "aurora"] as const),
      span: r() < 0.4,
      decoration: pick(r, ["none", "rings"] as const),
      shadow: between(r, 60, 85),
      glow: between(r, 45, 80),
      tilt: r() < 0.35 ? 0 : signed(r, 8, 18),
      headlineWeight: pick(r, [700, 800]),
      headlineCase: pick(r, ["upper", "as-typed"] as const),
      captionAlign: "center",
    }),
  },
  {
    id: "minimal",
    name: "Minimal",
    themes: ["clean-light", "quiet-japandi", "swiss-grid-bold", "ocean-fresh", "bento-keynote-grid"],
    fonts: ["helvetica-neue", "system-sans", "optima", "template-default"],
    layouts: [["device-bottom"], ["device-bottom", "device-top"]],
    inverted: [[false]],
    headlineScale: [0.9, 1],
    scene: (r) => ({
      backdrop: pick(r, ["solid", "grid"] as const),
      span: false,
      decoration: "none",
      shadow: between(r, 15, 30),
      glow: 0,
      tilt: 0,
      headlineWeight: pick(r, [600, 700]),
      headlineCase: "as-typed",
      captionAlign: pick(r, ["center", "left"] as const),
    }),
  },
  {
    id: "dreamy",
    name: "Dreamy",
    themes: ["dreamy-pastel-couples", "liquid-glass-aurora", "soft-clay-wellness", "ocean-fresh"],
    fonts: ["avenir-next", "optima", "palatino"],
    layouts: [["hero", "device-top"], ["hero"]],
    inverted: [[false]],
    headlineScale: [1, 1.1],
    scene: (r) => ({
      backdrop: "aurora",
      span: true,
      decoration: pick(r, ["blobs", "sparkles"] as const),
      shadow: between(r, 30, 50),
      glow: between(r, 30, 60),
      tilt: signed(r, 6, 12),
      headlineWeight: pick(r, [600, 700]),
      headlineCase: "as-typed",
      captionAlign: "center",
    }),
  },
  {
    id: "swiss",
    name: "Swiss Bold",
    themes: ["swiss-grid-bold", "bento-keynote-grid", "risograph-zine", "neon-athletic-night"],
    fonts: ["helvetica-neue", "futura"],
    layouts: [["device-bottom", "device-top"]],
    inverted: [[false, true], [false, false, true]],
    headlineScale: [0.85, 0.95],
    scene: (r) => ({
      backdrop: "grid",
      span: r() < 0.5,
      decoration: pick(r, ["none", "rings"] as const),
      shadow: between(r, 30, 50),
      glow: 0,
      tilt: r() < 0.5 ? 0 : signed(r, 8, 12),
      headlineWeight: 900,
      headlineCase: "upper",
      captionAlign: "left",
    }),
  },
  {
    id: "poster",
    name: "Vintage Poster",
    themes: ["vintage-travel-poster", "risograph-zine", "hand-drawn-editorial-tasks", "warm-editorial"],
    fonts: ["american-typewriter", "futura", "baskerville"],
    layouts: [["hero", "device-top"]],
    inverted: [[false, false, true]],
    headlineScale: [0.9, 1.05],
    scene: (r) => ({
      backdrop: pick(r, ["lines", "dots"] as const),
      span: false,
      decoration: pick(r, ["rings", "sparkles"] as const),
      shadow: between(r, 35, 55),
      glow: 0,
      tilt: r() < 0.5 ? 0 : signed(r, 4, 8),
      headlineWeight: pick(r, [700, 800]),
      headlineCase: "upper",
      captionAlign: "center",
    }),
  },
  {
    id: "panorama",
    name: "Panorama",
    themes: ["ocean-fresh", "liquid-glass-aurora", "midnight-glow-pro", "candy-pop-social", "bloom-roast"],
    fonts: ["system-sans", "avenir-next", "template-default"],
    layouts: [["hero", "device-bottom"], ["device-bottom", "hero", "device-top"]],
    inverted: [[false]],
    headlineScale: [1, 1.1],
    scene: (r) => ({
      backdrop: pick(r, ["aurora", "gradient"] as const),
      span: true,
      decoration: pick(r, ["blobs", "rings"] as const),
      shadow: between(r, 40, 60),
      glow: between(r, 15, 40),
      tilt: signed(r, 10, 20),
      headlineWeight: pick(r, [700, 800]),
      headlineCase: "as-typed",
      captionAlign: "center",
    }),
  },
];

/** The four directions a fresh Style Lab opens with: clearly different from each other. */
export const STARTER_DIRECTIONS = ["editorial", "playful", "cinematic", "minimal"];

export function directionName(id: string) {
  return DIRECTIONS.find((d) => d.id === id)?.name ?? "Custom";
}

/** One look from a direction, fully determined by the seed. */
export function generateLook(directionId: string, seed: number): Look {
  const direction = DIRECTIONS.find((d) => d.id === directionId) ?? DIRECTIONS[0];
  const r = rng(seed * 7919 + direction.id.length * 104729);
  const themeId = pick(r, direction.themes.filter((id) => !!THEMES[id]));
  const [lo, hi] = direction.headlineScale;
  return {
    id: `${direction.id}-${seed}`,
    name: `${direction.name} · ${THEMES[themeId]?.name ?? themeId}`,
    direction: direction.id,
    themeId,
    fontId: pick(r, direction.fonts.filter((id) => Object.hasOwn(SCREENSHOT_FONTS, id))),
    scene: { ...direction.scene(r), headlineScale: Math.round((lo + r() * (hi - lo)) * 20) / 20 },
    layouts: pick(r, direction.layouts),
    inverted: pick(r, direction.inverted),
  };
}

/** `count` different directions for one shuffle, starting with the starter set. */
export function pickDirections(seed: number, count = 4): string[] {
  if (seed === 0) return STARTER_DIRECTIONS.slice(0, count);
  const r = rng(seed * 31 + 7);
  const pool = DIRECTIONS.map((d) => d.id);
  for (let i = pool.length - 1; i > 0; i--) {
    const j = Math.floor(r() * (i + 1));
    [pool[i], pool[j]] = [pool[j], pool[i]];
  }
  return pool.slice(0, count);
}

/** The deck as it is now, expressed as a look. */
export function currentLook(state: ProjectState): Look {
  const slides = state.slidesByDevice[state.device] || [];
  return {
    id: "current",
    name: "Current",
    direction: "current",
    themeId: state.themeId,
    fontId: state.fontId ?? "template-default",
    scene: sceneOf(state.scene),
    layouts: slides.length ? slides.map((s) => s.layout) : ["hero"],
    inverted: slides.length ? slides.map((s) => !!s.inverted) : [false],
  };
}

const TYPE_SCENE_KEYS = ["headlineWeight", "headlineScale", "headlineCase", "captionAlign"] as const;

/** Replace every locked part of `look` with the same part of `base`. */
export function withLocks(look: Look, base: Look, locks: Locks): Look {
  const scene: Scene = { ...look.scene };
  if (locks.scene) {
    for (const key of Object.keys(DEFAULT_SCENE) as (keyof Scene)[]) {
      if (!(TYPE_SCENE_KEYS as readonly string[]).includes(key)) (scene as Record<string, unknown>)[key] = base.scene[key];
    }
  }
  if (locks.type) for (const key of TYPE_SCENE_KEYS) (scene as Record<string, unknown>)[key] = base.scene[key];
  return {
    ...look,
    themeId: locks.palette ? base.themeId : look.themeId,
    inverted: locks.palette ? base.inverted : look.inverted,
    fontId: locks.type ? base.fontId : look.fontId,
    layouts: locks.layout ? base.layouts : look.layouts,
    scene,
  };
}

// Phones and portrait tablets have the full set of portrait layouts. Landscape
// canvases, watches and the Play banner keep their own layouts.
export function canRearrange(device: Device, orientation: ProjectState["orientation"]) {
  if (device === "iphone" || device === "android" || device === "ipad") return true;
  // Both Duo displays in portrait take every portrait layout.
  if (device === "duo-outer" || device === "duo-inner") return true;
  if (device === "android-7" || device === "android-10") return orientation === "portrait" || !supportsLandscape(device);
  return false;
}

function restyleSlide(slide: Slide, index: number, look: Look, locks: Locks, rearrange: boolean): Slide {
  let next: Slide = { ...slide };
  if (!locks.palette) {
    next.inverted = look.inverted[index % look.inverted.length] || undefined;
    next.backgroundColor = undefined;
  }
  if (!locks.layout && rearrange && slide.layout !== "no-device" && slide.layout !== "feature-graphic") {
    let layout = look.layouts[index % look.layouts.length];
    // A back device without its own screenshot would just repeat the front one.
    if (layout === "two-devices" && !slide.screenshotSecondary) layout = "hero";
    if (layout === "no-device" || layout === "feature-graphic" || layout === "split-landscape") layout = slide.layout;
    // Fresh layout = fresh default placement, so the look reads as designed.
    const { caption: _c, device: _d, deviceSecondary: _s, callout: _m, ...kept } = slide.transforms || {};
    next = { ...next, layout, transforms: Object.keys(kept).length ? kept : undefined };
  }
  return next;
}

/** The project with `look` applied to the open deck. Locked parts stay as they are. */
export function applyLook(state: ProjectState, look: Look, locks: Locks = NO_LOCKS): ProjectState {
  const slides = state.slidesByDevice[state.device] || [];
  const rearrange = canRearrange(state.device, state.orientation);
  const base = currentLook(state);
  const merged = withLocks(look, base, locks);
  // An imported font only exists on the machine that imported it.
  const fontId = merged.fontId === "self-hosted" && !state.importedFont ? state.fontId : merged.fontId;
  const scene = merged.scene;
  return {
    ...state,
    themeId: merged.themeId,
    fontId,
    scene: sameScene(scene, DEFAULT_SCENE) ? undefined : scene,
    slidesByDevice: {
      ...state.slidesByDevice,
      [state.device]: slides.map((slide, i) => restyleSlide(slide, i, merged, locks, rearrange)),
    },
  };
}

/** Look id unique within the saved list. */
export function savedLookId(look: Look, saved: Look[]) {
  let id = look.id === "current" ? `look-${Date.now().toString(36)}` : look.id;
  while (saved.some((s) => s.id === id)) id = `${id}-${Math.floor(Math.random() * 1e4)}`;
  return id;
}
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