Skills

The design system, written for the agents that build with it. A skill is the instructions an agent loads on demand; these are the ones that keep its colour, layout and prototypes the way this site describes them.

How it works

Each skill is a folder in the repository with a SKILL.md: a description an agent always sees, and a body it reads only when the description matches the task. Claude Code finds them in .claude/skills. This page reads the same files, so what you read here is word for word what the agent is told.

cute-design-system

.claude/skills/cute-design-system/SKILL.md

Cüte design system

One palette

packages/ui-web/styles/colors.css is Cüte's only palette: eleven steps per family (50 nearly white to 950 nearly black, oklch), the brand anchors (--color-brand-*), the deck's fields (--color-deck-*), and four roles (--color-brand-primary, -soft, -muted, -deep). globals.css maps the semantic tokens onto the roles and steps, once for :root and once for .dark. Every value lives in those two files.

Four places copy the palette as hex because they cannot read CSS variables: packages/email/tailwind.config.ts, packages/ui-mobile/tokens.ts, packages/seo/og/templates/instagram/slides.tsx, and the milestone sweep's shader palette (green-300 to green-700) in apps/web/app/[locale]/_components/glimm-sweep.tsx. A step changed in colors.css changes there in the same commit. The logo's dot green (#188d33) is an asset, not the primary.

Name the token

Components name what a colour does: bg-primary, text-muted-foreground, border-border, and the status quartets (bg-success under text-success-foreground; bg-success-soft under text-success-accent; the same for warning, info, destructive). The token carries both modes, so dark: colour overrides are a smell.

A ramp step (bg-green-700) is right only for colour that is categorical rather than semantic: file-type marks, chart series, the rating star, and specimens that show the palette itself.

Pairs are graded

Every pair read together is listed in packages/ui-web/lib/color-tokens.ts with its floor (4.5:1 text, 3:1 a control's edge), and lib/color-tokens.test.ts resolves each one from the CSS in both modes and grades it against WCAG, measured in sRGB the way a checker reads the screen. A new token that is read against another gets its row there. When a pair goes red, move the step to the darkest of its hue and chroma that clears the floor; the floor stays. Green means:

sh
pnpm --filter @repo/ui-web exec vitest run lib/color-tokens.test.ts

Modes and light islands

The web app ships light only; admin follows the system; the brand site is dark by default. A .scheme-light element is a light island: it redeclares the :root tokens and stops dark: at its edge, so the product inside reads exactly as it ships. It repaints only what sets its own colour, so the island carries bg-background text-foreground. A .dark element is the reverse island.

The brand site

apps/brand shows the product on light islands over its dark page: MediaPanel (components/guideline-page.tsx), ShowcaseCard, and the registry preview frame. A guideline page is built from guideline-page.tsx, after the eBay Playbook's anatomy: PageHeader, OnThisPage, PageSections, MediaPanel, DoDont, ResourceCard, PrevNext. Page text takes the semantic inks; fixed steps belong inside a specimen's own surface.

The colour pages paint steps through var(--color-…) in inline styles, which Tailwind cannot see, so apps/brand/styles/styles.css safelists every family and step with @source inline; a family added to the palette is added there. The Tokens page draws TOKEN_GROUPS and grades each pair live with ContrastChip, from the same list the test reads.

cute-design-grid

.claude/skills/cute-design-grid/SKILL.md

Cüte design grid

The project uses on top of Tailwind v4. Grid behavior is driven by packages/ui-web/frontend.config.json (canonical source) wired through packages/ui-web/tailwind.config.js. The Setup plugin emits responsive :root CSS variables (--grid-columns, --inner-gutter, --outer-gutter, --breakpoint, --env) per breakpoint.

Breakpoints + design columns:

BreakpointWidthDesign columns
xs<640px4
sm640px4
md768px8
lg1024px12
xl1280px12
2xl1536px12
3xl1792px12

The container is fluid (auto) up to 3xl, then locks at 1792px with gutters inside, as IKEA's 112rem content container does.

Plugins enabled

Setup, Container, Spacing, GridGap, GridLayout, DevTools — see packages/ui-web/tailwind.config.js. Layout (the w-cols-N plugin) is not enabled — don't reach for it without first asking.

Core utilities

Container (a17 Container plugin)

  • .container — main centered region with outer gutters; uses mainColWidths from frontend.config.json. Disable Tailwind's core container with corePlugins.container: false (already done).
  • .breakout — breaks out of a .container to make an element 100vw wide
  • .container-reset / .breakout-reset — undo
  • A @utility container { max-width: 100% } override is intentionally kept in globals.css so the v4 default .container width tokens don't fight the a17 selector.

GridLayout

  • .grid-layout — display: grid with grid-template-columns: repeat(var(--grid-columns), 1fr) and gap: var(--inner-gutter). The grid auto-adapts to the design column count at each breakpoint.
  • .grid-col-span-N — child spans N columns. With responsive variants: grid-col-span-4 lg:grid-col-span-8 etc.
  • .grid-col-start-N / .grid-col-end-N — explicit column placement.

Spacing tokens

Responsive spacing from frontend.config.json spacing.groups:

Tokenxs (mobile)lg+ (desktop)
space-116px32px
space-220px40px
space-332px56px
pad-116px20px
pad-220px28px
pad-332px48px
gutter16px16px (lg) → 24px (xl+), Shopify's
outer-gutter1.375rem3rem (lg) → 4rem (2xl)

These already shift per breakpoint via CSS variables. Do NOT write gap-space-1 lg:gap-space-2 — that bypasses the responsive curve and gives 16px → 40px (skipping past 32px). Pick one token; it adapts.

PageLayout sizes

packages/ui-web/components/layout/page-layout.tsx:

SizeClassWhen to use
smcontainer max-w-2xl py-space-2Centered narrow content (forms, legal, prose). Reading width, not on grid.
mdcontainer max-w-4xl py-space-2Wider centered prose (help, pricing).
gridcontainer grid-layout py-space-2When you need explicit grid-col-span-N placement on children.
fullflex w-full flex-colFull-bleed marketing pages.
(no size)flex flex-col gap-space-1 pt-space-2Non-container vertical stack with default top padding.

max-w-* is fine for "centered reading width" pages. It's not on the design grid, but reading comfort isn't a grid concern. Don't switch sm/md to grid-layout globally — it breaks all consumers (HelpProsePage etc.) that don't apply col-span on children.

PageLayout accepts className — passes through to the outer wrapper. Use it to add pb-36 or similar without needing extra wrapper divs.

When to use which

You want centered, reading-width content (forms, legal, articles): → <PageLayout size="sm"> or size="md". Children render naturally inside max-w-*.

You want a piece of content placed precisely on the design grid: → <PageLayout size="grid"> AND apply grid-col-span-N lg:grid-col-span-M lg:grid-col-start-K directly to each top-level child.

You want a multi-column section inside a marketing page: → Wrap in <div className="grid-layout"> and put grid-col-span-N md:grid-col-span-M lg:grid-col-span-K on each card/column. Don't use grid grid-cols-3 gap-6 — that's not on the design grid.

Pitfalls — read before "fixing" a layout

1. className must reach the actual grid child

CSS Grid only places direct children of the display: grid element. If a component's className is forwarded to a deeply nested element instead of its outermost wrapping div, your grid-col-span-* classes don't take effect.

Pattern: any component used as a grid child must apply className to its outermost rendered element. Verify by reading the component source before debugging "why isn't lg:grid-col-span-X applying."

Examples in this project:

  • PageTitle — fixed to apply className to outer <div> (was on <h1>).
  • ListingForm — accepts className, applies to the <form> (which is the grid child).

2. Don't insert wrapper divs between grid-layout and its intended children

If PageLayout size="grid" renders <div class="grid-layout"><div class="pb-36">{children}</div></div>, the pb-36 div is the only grid child. All children inside it are grandchildren — col-span on them does nothing.

Fix: push the extra class onto PageLayout via className, not via a wrapper:

tsx
<PageLayout size="grid" className="pb-36">  {children}</PageLayout>

3. Don't use [&>*] selectors to bake col-span into PageLayout

Tempting:

ts
sm: "container grid-layout py-space-2 [&>*]:grid-col-span-4 lg:[&>*]:grid-col-span-8 lg:[&>*]:grid-col-start-3";

This is rejected. Consumers should declare grid placement explicitly on their children — that's the readable pattern. Use size="grid" and let consumers apply col-spans.

4. Don't replace max-w-2xl / max-w-4xl with grid-layout globally

Reading-width content (forms, legal text, help articles) doesn't need grid alignment. max-w-2xl (672px) and max-w-4xl (896px) are correct tools for "comfortable line length." Switching the existing size="sm"/size="md" consumers (8 callsites: item-form, onboarding, checkout, order success, orders detail, pricing, help layout, legal layout) to grid-layout breaks them — they don't apply col-span on children.

If a specific page wants grid placement, switch that one to size="grid" and update its children. Leave the rest on max-w.

5. --container-*: initial reset breaks max-w-Nxl

In v4, max-w-2xl, max-w-md, etc. resolve via --container-* tokens. The codebase uses ~200 of these. Do NOT reset --container-* in @theme. The Setup plugin's container math reads from mainColWidths (a separate theme key), not --container-*. No conflict to resolve.

6. --breakpoint-*: initial reset IS required

Tailwind v4 ships default --breakpoint-* tokens that get merged into theme.screens and confuse the a17 Setup plugin (it iterates theme('screens') which gains a synthetic 7th object-shaped entry → @media (width >= [object Object])). The reset is in globals.css:

css
@theme {  --breakpoint-*: initial;}

theme.screens from @config "../tailwind.config.js" provides the project's breakpoints, so nothing is lost.

7. Order in globals.css matters (shadcn convention)

:root { --background: oklch(...) } → .dark { --background: oklch(...) } → @theme inline { --color-background: var(--background) }. Raw vars first, then dark overrides, then Tailwind tokens that consume them.

8. gap-gutter and grid-layout's gap

GridGap plugin emits .gap-gutter (gap: var(--inner-gutter)). The theme.extend.spacing.gutter token also produces gap-gutter (because Tailwind auto-generates utilities from spacing tokens). Both ship; this is the canonical a17 v4 setup. Don't remove GridGap thinking it's redundant — keep it, it's documented.

grid-layout already includes gap: var(--inner-gutter). Don't add gap-gutter redundantly. To override (e.g., to gap-6 for a 24px card gap) just append gap-6.

9. DevTools indicator

packages/ui-web/components/debug/tailwind-indicator.tsx renders the a17 DevTools markup (.dev-tools + .dev-tools-toggle + .dev-tools-grid). Shows breakpoint + env at bottom-left in non-production. Cmd/Ctrl+G toggles the column grid overlay (uses react-hotkeys-hook). Useful for verifying col-span placement visually.

Workflow when refactoring a layout to use the grid

  1. Read the consuming code first. Identify what's currently constraining width (max-w-*, flex-1, custom CSS) and what would translate cleanly to grid columns.
  2. Trace className forwarding. For each component you want to make a grid child, verify its className lands on the outer DOM element. Fix the component if not.
  3. Pick the right PageLayout size. If it's reading-width content, leave on sm/md. If it needs grid placement, switch the layout to size="grid" and update that page's children.
  4. Apply col-span explicitly on each direct child of grid-layout. Don't wrap in extra divs.
  5. Verify in browser with the column grid overlay (Cmd+G). The col-span should match where you want content to land at xs / md / lg.
  6. Check consumers of any shared component you changed. If you fixed className forwarding on a component used in many places, see if any callers were relying on the old (broken) behavior.

Code references

  • packages/ui-web/frontend.config.json — design tokens (canonical)
  • packages/ui-web/tailwind.config.js — plugin wiring
  • packages/ui-web/styles/globals.css — @config, --breakpoint-*: initial, @theme inline, theme order
  • packages/ui-web/components/layout/page-layout.tsx — PageLayout and sizeClasses
  • packages/ui-web/components/ui/page-title.tsx — className lands on outer div
  • packages/ui-web/components/debug/tailwind-indicator.tsx — DevTools indicator + Cmd+G hotkey
  • apps/web/app/[locale]/(site)/(distraction-free)/(item-form)/items/new/page.tsx — reference for size="grid" + explicit col-span
  • packages/ui-web/components/layout/footer-layout.tsx — example of grid-layout with grid-col-span-3 xl:grid-col-span-2
  • packages/ui-web/blocks/contact-1/index.tsx — example of grid-layout for a 3-card section

cute-prototypes

.claude/skills/cute-prototypes/SKILL.md

Cüte prototypes

The playground lives at /prototypes and is admin-only in every environment (layout.tsx gates on session.user.role !== "admin" and calls notFound()). Its job: put several variants of the same page side by side, switchable with number keys, so a design question gets answered by looking rather than arguing. Nothing here touches the live product.

The word is variant, in code, comments, the dock and replies: never "direction" or "variation".

Root: apps/web/app/[locale]/(site)/(distraction-free)/prototypes/

prototypes/├── page.tsx                  index: cards grouped by section, wireframe + blurb├── [slug]/page.tsx           renders one prototype through PrototypePicker├── layout.tsx                admin gate + Suspense(PrototypeSkeleton)├── registry.tsx              the ONE list: every PrototypeDefinition, in index order├── _components/│   ├── prototype-definition.ts   PrototypeDefinition / PrototypeVariant / stepsOf│   ├── prototype-view.tsx        the preview, and the dock's provider: ?v= and ?s=│   ├── prototype-skeleton.tsx    the shape shown while the gate resolves│   ├── prototype-wireframe.tsx   slug → wireframe component map│   └── wireframes/<slug>.tsx     one hand-drawn SVG per prototype, for the index card└── _prototypes/<slug>/    ├── prototype.tsx             the PrototypeDefinition (the only file registry imports)    ├── <variant>/index.tsx       one variant (single page)    ├── <flow-variant>/screen-<name>.tsx   one step of a flow    └── shared/                   parts.tsx, preview.tsx, data.ts reused across variants

The two shapes

PrototypeVariant is a union — a variant is either a single page or a flow, never both:

ts
type PrototypeVariant =  | { name: string; preview: ReactNode; steps?: never }  | {      name: string;      steps: { name: string; preview: ReactNode }[];      preview?: never;    };
  • Single page (preview) — comparing looks for one screen. Wallet, footer, my-profile. The dock shows one row; ←/→ walk the variants.
  • Flow (steps) — a journey across screens. Community marketplace. The dock grows a second row of steps; ←/→ walk the steps and the number keys still jump variants.

stepsOf(variant) normalises both: a single page is a flow of one. Use it instead of branching on steps.

One prototype can mix both — a variants array may hold single-page variants next to flow variants.

Dock behaviour (free, don't rebuild it)

The dock lives in packages/ui-web/components/dock/, one small part per file (Dock, DockBar, DockBreadcrumb, DockLists, DockLegend, DockReplay, DockStep, DockHide, DockDrawer, DockKeys, …) reading one DockContext (state, actions, meta; state.variants and state.variant). PrototypeView is the provider and composes the parts. Every prototype gets: a breadcrumb back to the index, 1–9 to pick a variant, ←/→ (and the bar's ‹ ›, at every size) to walk, [/] to jump prototypes, r to replay (it remounts the preview, so entry animations re-run), h to hide the dock, and ?v= / ?s= in the URL so a variant is linkable. Picking a variant keeps the page of the same name when it has one.

Archive is how a long prototype stays walkable: an archived variant keeps its number and its ?v= link, but the drawer and the dock's row fold it under "Archived · N" and ←/→ walk past it. Ignacio archives from the drawer (Variants › Edit, a box per variant, All / None), from the switch on the dock's tray ("Archive this variant", DockArchiveTray), or with a on the one he is looking at. Each change saves at once to _components/prototype-archive.json (variant names per slug) through prototype-archive.action.ts, which only a local dev server runs, the phone reaching it through the tunnel; commit the JSON with the work. A renamed variant leaves the archive, since names are its keys.

The dock's palette is its own tokens in dock.css: change a token there, never a class on one part. layout: "footer" pins the dock to the top and lets the preview fill the page — use it when the thing being judged sits at the bottom of the viewport.

Adding a prototype

  1. _prototypes/<slug>/ with one folder per variant. Single page → <variant>/index.tsx exporting a PascalCase component. Flow → <variant>/screen-<name>.tsx per step.
  2. Anything two variants share goes in <slug>/shared/ (parts.tsx for components, data.ts for fixtures, preview.tsx for a wrapper or a single parameterised layout driven by a layout prop).
  3. One prototype per live route. Find the prototype whose route already names the page (the index shows it under each title, and its search matches routes). A new variant of that page joins it; never a second prototype for the same route. Its first variant is a "Live today" baseline of what the route ships now.
  4. _prototypes/<slug>/prototype.tsx exports a const <camelSlug>: PrototypeDefinition with slug, section, route (the live page it would replace, "/orders/bought · /orders/sold", or null when nothing ships there yet), title, summary, variants.
  5. _components/wireframes/<slug>.tsx — a small SVG (viewBox="0 0 320 224", aria-hidden, a <title>, greys #e4e4e7 / #8f8f98) sketching the page. Register it in prototype-wireframe.tsx.
  6. Add the import and the entry to registry.tsx, in the position you want it on the index.

section must be one of prototypeSections: Admin, Community, Listings, Account, Help, Site. There is no notice: the playground is admin-only and fake by rule, so nobody needs telling.

Rules

  • Fake everything. No queries, no server actions, no @repo/db, no Supabase. Fixtures are local const arrays; interactions are useState and a role="status" line saying it stayed in the preview.
  • No i18n. Prototype copy is English literals, not getTranslations. These screens are disposable; a dictionary key is not.
  • Variants differ in layout and UX, not skin. What a prototype tests is where things sit, what shows without scrolling, how many steps a flow takes, inline versus sheet versus dialog, how a state changes the page's structure and next action. The skin is Cüte's. A small deviation from a component (a button, a chip) is fine when it serves the question, but it stays Cüte everywhere else: Cüte's fonts (never a serif, never a new family), Cüte's colour tokens, at most one extra accent. One to three deviations per variant, each named in a Tests: … comment on the variant's root. Never a reskin and never another brand's style (Airbnb, IKEA, Uber, DoorDash). Never "fix" a variant by swapping its deviation for the live product's component (its buttons, its green, ButtonFavoriteHeart). Build on @repo/ui-web primitives for behaviour and accessibility, restyled where the deviation needs it. Tabler icons, cn(), and the Link from @repo/internationalization/navigation. What a review may correct is content and behaviour: domain facts, states, copy, accessibility, fake data. Only a baseline variant ("Vinted baseline", "Live today") copies an existing look, because it is the comparison.
  • Sentence case in every label, as everywhere else.
  • "use client" on the variant, not on prototype.tsx — the definition is a server module holding JSX elements, and the registry is imported by a server page.
  • Accessibility still applies. Ultracite lints these files: labelled controls, aria-pressed on toggles, type="button", aria-hidden on decorative icons, min-h-11 touch targets.
  • Nothing outside prototypes/ may import from _prototypes/. The traffic runs one way; when a variant wins, it is rebuilt in packages/features/<slice>/, not imported.
  • Delete a prototype once its question is answered — remove the folder, its wireframe, both registry entries and its line in prototype-archive.json. No "keep it around" folders. Prototypes the team still compares stay; the rest go. A variant that loses is archived, not deleted, while its prototype is still open; when Ignacio asks to clear the archive, delete the archived variants' code and empty their list.
  • A prototype is its page in isolation. routeChrome gives every /prototypes/<slug> no site header and no tab bar at any size (the index browses), so a variant starts at the window's top: sticky offsets start at top-0, heights are svh/dvh whole. --header-height, --header-height-compact and --spacing-below-header still subtract a header that is not there, so a stage never reads them. Where the live route draws its own bar (MobilePageBar, PageBar), the variant mounts that real bar unless the bar is its deviation.
  • The live layout, never a copy of it. Everything a variant is not testing is the live component fed fixtures: the page's layout (SidebarLayout, PageLayout), its bars, its rows (Item, SubjectRow), ListingCard, UserName, OrderStepBar. A live part that fetches or calls an action gets a preview seam in its own package rather than a hand-drawn twin: the chat's is ChatPreviewProvider (the real ChatMessages, bubbles, order card and ChatInput on local state) under ChatThreadPanel, and Thread header's stage (_prototypes/thread-header/shared/thread.tsx) is the reference. Live links inside it go through a click catcher (PreviewLinks) so they open the preview's panels instead of leaving it.

Cases: one state across every variant

When every variant must be judged in the same states (an item for sale, sold, your own), declare cases: { label, options: [{ id, name }] } on the definition and read the pick with usePrototypeCase() (_components/prototype-case.ts), usually in the frame. The dock shows it as a "Preview as" select in its bar, C cycles it, ?c= keeps it across variants, and a new case remounts the frame. A case is a state, never a variant or a page, and never a switcher drawn on the page. Listing detail is the reference.

Adding a variant to an existing prototype

New folder under _prototypes/<slug>/, new entry in the variants array. Pull what it shares with its siblings into shared/ rather than copying it; when three variants differ only in arrangement, one shared/preview.tsx taking a layout prop beats three near-identical files (see groups/shared/preview.tsx). Keep the variant names short — they are dock buttons.