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/components/editor/toolbar.tsx

View on GitHub
"use client";
import * as React from "react";
import { AlertTriangle, Check, Cloud, Download, FlaskConical, Redo2, RotateCcw, Undo2, UnfoldHorizontal, Upload } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectSeparator,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
  DEVICE_LABEL,
  IMPORTED_FONT_FAMILY,
  PLATFORM_DEVICES,
  SCREENSHOT_FONTS,
  ORIENTATION_PAIRS,
  THEMES,
  deviceForOrientation,
  orientationOf,
  supportsLandscape,
  themeById,
} from "@/lib/constants";
import { detectPlatform } from "@/lib/defaults";
import type { Device, ImportedFont, Orientation, Platform, Scene, ScreenshotFontId, Theme } from "@/lib/types";
import { FontImporter, type FontImporterHandle } from "./font-importer";
import { ScenePlayground } from "./scene-playground";

const IMPORT_FONT_ACTION = "__import-font__";

type Props = {
  appName: string;
  setAppName: (v: string) => void;
  themeId: string;
  setThemeId: (v: string) => void;
  connectedCanvas: boolean;
  setConnectedCanvas: (v: boolean) => void;
  scene: Scene | undefined;
  setScene: (scene: Scene | undefined) => void;
  onOpenStyleLab: () => void;
  fontId: ScreenshotFontId;
  setFontId: (v: ScreenshotFontId) => void;
  importedFont?: ImportedFont;
  setImportedFont: (font: ImportedFont) => void;
  locale: string;
  setLocale: (v: string) => void;
  locales: string[];
  device: Device;
  setDevice: (v: Device) => void;
  orientation: Orientation;
  setOrientation: (v: Orientation) => void;
  onExport: () => void;
  onResetAll: () => void;
  onResetDevice: () => void;
  onUndo: () => void;
  onRedo: () => void;
  canUndo: boolean;
  canRedo: boolean;
  exporting: string | null;
  savedAt: number | null;
  saveError: string | null;
  onRetrySave?: () => void;
  busy: boolean;
};

export function Toolbar(props: Props) {
  const platform = detectPlatform(props.device);
  const hasLandscape = supportsLandscape(props.device);
  const [resetOpen, setResetOpen] = React.useState(false);

  // Track last device per platform so the platform tabs preserve the user's choice.
  const lastByPlatform = React.useRef<Record<Platform, Device>>({
    ios: platform === "ios" ? props.device : "iphone",
    macos: platform === "macos" ? props.device : "mac",
    android: platform === "android" ? props.device : "android",
  });
  React.useEffect(() => {
    lastByPlatform.current[platform] = props.device;
  }, [platform, props.device]);

  const showLocale = props.locales.length > 1;

  const deviceLabel = DEVICE_LABEL[props.device];
  // Paired orientations share one picker entry; the Orientation menu switches.
  const pickerDevice = deviceForOrientation(props.device, "portrait");
  const platformDevices = PLATFORM_DEVICES[platform].filter((d) => deviceForOrientation(d, "portrait") === d);
  const orientation = orientationOf(props.device, props.orientation);
  const activeTheme = themeById(props.themeId);

  const fontImporter = React.useRef<FontImporterHandle>(null);
  const [importingFont, setImportingFont] = React.useState(false);
  // "Imported font" is only a choice once a file has actually been imported.
  const fontIds = (Object.keys(SCREENSHOT_FONTS) as ScreenshotFontId[]).filter(
    (id) => id !== "self-hosted" || !!props.importedFont,
  );
  const fontLabel = (id: ScreenshotFontId) =>
    id === "self-hosted" && props.importedFont?.name ? props.importedFont.name : SCREENSHOT_FONTS[id].name;
  const fontPreviewFamily = (id: ScreenshotFontId) =>
    id === "self-hosted" ? `"${IMPORTED_FONT_FAMILY}", sans-serif` : SCREENSHOT_FONTS[id].family;

  return (
    <div className="flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b bg-card/40 px-4 py-2">
      <Input
        value={props.appName}
        onChange={(e) => props.setAppName(e.target.value)}
        className="h-8 w-36 border-dashed text-sm font-semibold focus-visible:border-input focus-visible:border-solid focus-visible:bg-background"
        placeholder="App name"
        aria-label="App name"
        title="App name (click to edit)"
        disabled={props.busy}
      />

      <span aria-hidden className="mx-1 h-5 w-px bg-border" />

      <Button
        type="button"
        variant={props.connectedCanvas ? "secondary" : "outline"}
        size="sm"
        className="h-8 gap-1.5 px-2 text-xs"
        onClick={() => props.setConnectedCanvas(!props.connectedCanvas)}
        aria-pressed={props.connectedCanvas}
        title={
          props.connectedCanvas
            ? "Connected canvas enabled"
            : "Isolated screens; turn on to let elements cross screen edges"
        }
        disabled={props.busy}
      >
        <UnfoldHorizontal className="h-3.5 w-3.5" />
        {props.connectedCanvas ? "Connected" : "Isolated"}
      </Button>

      <Button
        type="button"
        variant="outline"
        size="sm"
        className="h-8 gap-1.5 px-2 text-xs"
        onClick={props.onOpenStyleLab}
        disabled={props.busy}
        title="Style Lab: try complete looks for this deck side by side"
      >
        <FlaskConical className="h-3.5 w-3.5" />
        Style Lab
      </Button>
      <ScenePlayground scene={props.scene} theme={activeTheme} disabled={props.busy} straightDevices={props.device.startsWith("duo-")} onChange={props.setScene} />

      <Select value={activeTheme.id} onValueChange={props.setThemeId} disabled={props.busy}>
        <SelectTrigger className="h-8 w-40 text-xs" title="Theme" aria-label="Theme">
          <SelectValue>
            <ThemeOption theme={activeTheme} />
          </SelectValue>
        </SelectTrigger>
        <SelectContent>
          {Object.values(THEMES).map((theme) => (
            <SelectItem key={theme.id} value={theme.id}>
              <ThemeOption theme={theme} />
            </SelectItem>
          ))}
        </SelectContent>
      </Select>

      <Select
        value={props.fontId}
        onValueChange={(fontId) => {
          if (fontId === IMPORT_FONT_ACTION) fontImporter.current?.open();
          else props.setFontId(fontId as ScreenshotFontId);
        }}
        disabled={props.busy || importingFont}
      >
        <SelectTrigger className="h-8 w-36 text-xs" title="Screenshot font" aria-label="Screenshot font">
          <SelectValue placeholder="Font">
            <span className="truncate">{importingFont ? "Importing font…" : fontLabel(props.fontId)}</span>
          </SelectValue>
        </SelectTrigger>
        <SelectContent>
          {fontIds.map((id) => (
            <SelectItem key={id} value={id}>
              <span style={{ fontFamily: fontPreviewFamily(id) }}>{fontLabel(id)}</span>
            </SelectItem>
          ))}
          <SelectSeparator />
          <SelectItem value={IMPORT_FONT_ACTION}>
            <span className="flex items-center gap-1.5">
              <Upload className="h-3.5 w-3.5" />
              {props.importedFont ? "Replace imported font…" : "Import font…"}
            </span>
          </SelectItem>
        </SelectContent>
      </Select>
      <FontImporter ref={fontImporter} onImported={props.setImportedFont} onUploadingChange={setImportingFont} />

      <span aria-hidden className="mx-1 h-5 w-px bg-border" />

      <Tabs
        value={platform}
        onValueChange={(p) => {
          if (props.busy) return;
          const next = lastByPlatform.current[p as Platform];
          props.setDevice(next);
        }}
      >
        <TabsList className="h-8 p-0.5">
          <TabsTrigger value="ios" className="h-7 px-3 text-xs" disabled={props.busy}>
            iOS
          </TabsTrigger>
          <TabsTrigger value="macos" className="h-7 px-3 text-xs" disabled={props.busy}>
            Mac
          </TabsTrigger>
          <TabsTrigger value="android" className="h-7 px-3 text-xs" disabled={props.busy}>
            Android
          </TabsTrigger>
        </TabsList>
      </Tabs>

      {/* Mac has a single device, so the tab alone says which deck is open. */}
      {platformDevices.length > 1 && (
        <Select
          value={pickerDevice}
          onValueChange={(v) => {
            // Moving between Duo displays keeps the orientation you're working in.
            const keep = ORIENTATION_PAIRS[props.device] ? orientation : "portrait";
            props.setDevice(deviceForOrientation(v as Device, keep));
          }}
          disabled={props.busy}
        >
          <SelectTrigger className="h-8 w-36 text-xs" aria-label="Device" title="Device">
            <SelectValue placeholder="Device">{DEVICE_LABEL[pickerDevice]}</SelectValue>
          </SelectTrigger>
          <SelectContent>
            {platformDevices.map((d) => (
              <SelectItem key={d} value={d}>{DEVICE_LABEL[d]}</SelectItem>
            ))}
          </SelectContent>
        </Select>
      )}

      {hasLandscape && (
        <Select
          value={orientation}
          onValueChange={(v) => props.setOrientation(v as Orientation)}
          disabled={props.busy}
        >
          <SelectTrigger className="h-8 w-28 text-xs" aria-label="Orientation">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            <SelectItem value="portrait">Portrait</SelectItem>
            <SelectItem value="landscape">Landscape</SelectItem>
          </SelectContent>
        </Select>
      )}

      {showLocale && (
        <Select value={props.locale} onValueChange={props.setLocale} disabled={props.busy}>
          <SelectTrigger className="h-8 w-20 text-xs" aria-label="Locale">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            {props.locales.map((l) => (
              <SelectItem key={l} value={l}>
                {l.toUpperCase()}
              </SelectItem>
            ))}
          </SelectContent>
        </Select>
      )}

      <div className="ml-auto flex shrink-0 items-center gap-2">
        <SaveStatus savedAt={props.savedAt} saveError={props.saveError} />
        {props.saveError && props.onRetrySave && (
          <Button variant="ghost" size="sm" disabled={props.busy} onClick={props.onRetrySave}>Retry save</Button>
        )}
        <span aria-hidden className="h-5 w-px bg-border" />
        <Button
          type="button"
          variant="ghost"
          size="icon"
          className="h-8 w-8"
          onClick={props.onUndo}
          title="Undo (⌘Z)"
          aria-label="Undo"
          disabled={props.busy || !props.canUndo}
        >
          <Undo2 className="h-4 w-4" />
        </Button>
        <Button
          type="button"
          variant="ghost"
          size="icon"
          className="h-8 w-8"
          onClick={props.onRedo}
          title="Redo (⌘⇧Z)"
          aria-label="Redo"
          disabled={props.busy || !props.canRedo}
        >
          <Redo2 className="h-4 w-4" />
        </Button>
        <Button
          variant="ghost"
          size="icon"
          className="h-8 w-8"
          onClick={() => setResetOpen(true)}
          title="Reset screens to defaults"
          aria-label="Reset"
          disabled={props.busy}
        >
          <RotateCcw className="h-4 w-4" />
        </Button>
        <Button
          onClick={props.onExport}
          disabled={!!props.exporting || importingFont}
          size="sm"
          className="h-8"
          title="Export every size × locale for this device as a zip"
        >
          <Download className="h-4 w-4" />
          {props.exporting ? `Exporting ${props.exporting}` : "Export bundle"}
        </Button>
      </div>

      <Dialog open={resetOpen} onOpenChange={setResetOpen}>
        <DialogContent className="max-w-md">
          <DialogHeader>
            <DialogTitle>Reset to defaults?</DialogTitle>
            <DialogDescription>
              Choose whether to reset just <span className="font-medium">{deviceLabel}</span> or every device deck. Your canvas edits, uploaded screenshots, and copy will be lost.
            </DialogDescription>
          </DialogHeader>
          <div className="flex flex-wrap justify-end gap-2">
            <Button variant="ghost" size="sm" onClick={() => setResetOpen(false)}>
              Cancel
            </Button>
            <Button
              variant="outline"
              size="sm"
              onClick={() => {
                setResetOpen(false);
                props.onResetDevice();
              }}
            >
              Reset {deviceLabel} only
            </Button>
            <Button
              variant="destructive"
              size="sm"
              onClick={() => {
                setResetOpen(false);
                props.onResetAll();
              }}
            >
              Reset all devices
            </Button>
          </div>
        </DialogContent>
      </Dialog>
    </div>
  );
}

function ThemeOption({ theme }: { theme: Theme }) {
  return (
    <span className="flex min-w-0 items-center gap-2">
      <span
        aria-hidden
        className="flex h-4 w-7 shrink-0 overflow-hidden rounded-sm ring-1 ring-black/10"
      >
        <span className="flex-1" style={{ background: theme.bg }} />
        <span className="flex-1" style={{ background: theme.bgAlt }} />
        <span className="w-1.5" style={{ background: theme.accent }} />
      </span>
      <span className="truncate">{theme.name}</span>
    </span>
  );
}

function SaveStatus({ savedAt, saveError }: { savedAt: number | null; saveError: string | null }) {
  const [, setTick] = React.useState(0);
  React.useEffect(() => {
    const t = setInterval(() => setTick((x) => x + 1), 60_000);
    return () => clearInterval(t);
  }, []);

  if (saveError) {
    return (
      <span
        className="flex items-center gap-1 text-xs text-destructive"
        title={saveError}
      >
        <AlertTriangle className="h-3.5 w-3.5" /> save failed
      </span>
    );
  }

  if (!savedAt) {
    return (
      <span className="flex items-center gap-1 text-xs text-muted-foreground" title="Not saved yet">
        <Cloud className="h-3.5 w-3.5" /> <span className="hidden 2xl:inline">not saved yet</span>
      </span>
    );
  }
  const seconds = Math.max(0, Math.round((Date.now() - savedAt) / 1000));
  const label =
    seconds < 5
      ? "saved"
      : seconds < 60
        ? `saved ${seconds}s ago`
        : seconds < 3600
          ? `saved ${Math.round(seconds / 60)}m ago`
          : `saved ${Math.round(seconds / 3600)}h ago`;
  return (
    <span className="flex items-center gap-1 text-xs text-muted-foreground" title={`Project ${label}`}>
      <Check className="h-3.5 w-3.5 text-green-500" /> <span className="hidden 2xl:inline">{label}</span>
    </span>
  );
}
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: 197kUpdated 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