Skip to content

gabelul/stitch-kit / skills/stitch-design-system

stitch-design-system

Verified

Extracts a Stitch design and generates production code artifacts — CSS custom properties with dark mode tokens, a Tailwind v4 @theme block, and a semantic design system document. Run this before framework conversion skills.

FileKindSize
SKILL.mdskill md18.4 KB
resources/tokens-template.cssother7.6 KB

resources/tokens-template.css

View on GitHub
/* =============================================================
   Design Tokens — Template
   Copy this file, fill in the values from your Stitch design,
   and save as design-tokens.css in your project root.

   Usage:
     Next.js:   @import '../design-tokens.css'; in app/globals.css
     SvelteKit: @import '$lib/design-tokens.css'; in src/app.css
   ============================================================= */

/* ---- Google Fonts (update to match your Stitch design) ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- Light mode (default) ---- */
:root {
  /* ── Colors ── */

  /* Backgrounds */
  --color-background:       ;  /* Page/app background */
  --color-surface:          ;  /* Card, panel, input backgrounds */
  --color-surface-elevated: ;  /* Tooltip, popover, dropdown */

  /* Brand */
  --color-primary:          ;  /* Main CTA, links, key actions */
  --color-primary-hover:    ;  /* Primary at :hover */
  --color-primary-active:   ;  /* Primary at :active */
  --color-primary-fg:       ;  /* Text/icon on primary background */

  --color-secondary:        ;  /* Secondary actions, tags, accents */
  --color-secondary-hover:  ;
  --color-secondary-fg:     ;  /* Text/icon on secondary background */

  /* Text */
  --color-text:             ;  /* Default body text */
  --color-text-muted:       ;  /* Captions, helper text, placeholders */
  --color-text-disabled:    ;  /* Disabled state text */
  --color-text-inverse:     ;  /* Text on dark backgrounds */

  /* Borders */
  --color-border:           ;  /* Default dividers, input borders */
  --color-border-strong:    ;  /* Emphasized separators */
  --color-border-focus:     ;  /* Focus ring color */

  /* Status */
  --color-error:            ;
  --color-error-bg:         ;  /* Error message background */
  --color-success:          ;
  --color-success-bg:       ;  /* Success message background */
  --color-warning:          ;
  --color-warning-bg:       ;  /* Warning message background */
  --color-info:             ;

  /* ── Typography ── */
  --font-sans:   'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:   var(--font-sans);    /* Often same as sans; separate if design uses different body font */
  --font-mono:   ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;

  /* Type scale */
  --text-xs:   0.75rem;     /* 12px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1rem;        /* 16px — body default */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.25rem;     /* 20px */
  --text-2xl:  1.5rem;      /* 24px */
  --text-3xl:  1.875rem;    /* 30px */
  --text-4xl:  2.25rem;     /* 36px */
  --text-5xl:  3rem;        /* 48px */

  /* Font weights */
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* Line heights */
  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;

  /* ── Spacing ── */
  /* Base unit: 4px. Scale: 1=4px, 2=8px, 3=12px, 4=16px, 6=24px, 8=32px, 12=48px, 16=64px */
  --space-px:  1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1:   0.25rem;   /* 4px */
  --space-2:   0.5rem;    /* 8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* ── Geometry ── */
  --radius-none: 0;
  --radius-sm:   ;    /* e.g. 4px — small elements */
  --radius-md:   ;    /* e.g. 8px — buttons, inputs */
  --radius-lg:   ;    /* e.g. 12px — cards */
  --radius-xl:   ;    /* e.g. 16px — modals, sheets */
  --radius-2xl:  ;    /* e.g. 24px — large panels */
  --radius-full: 9999px;  /* Pills, circles */

  /* ── Shadows (Elevation) ── */
  --shadow-none:  none;
  --shadow-sm:    0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md:    0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* ── Motion ── */
  --motion-duration-instant: 0ms;
  --motion-duration-fast:    150ms;   /* Hovers, toggles, micro interactions */
  --motion-duration-base:    250ms;   /* Standard UI transitions */
  --motion-duration-slow:    400ms;   /* Page elements, larger panels */
  --motion-duration-slower:  600ms;   /* Significant page transitions */

  --motion-ease-linear:  linear;
  --motion-ease-default: cubic-bezier(0.4, 0, 0.2, 1);   /* Standard — most interactions */
  --motion-ease-in:      cubic-bezier(0.4, 0, 1, 1);      /* Exits — element leaving */
  --motion-ease-out:     cubic-bezier(0, 0, 0.2, 1);      /* Entries — element appearing */
  --motion-ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1); /* Playful bounce */

  /* ── Z-Index ── */
  --z-base:    0;
  --z-raised:  10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}

/* ---- Dark mode ---- */
/* Applied via:
   - .dark class on <html> (Next.js + next-themes)
   - [data-theme="dark"] on <html> (Svelte)
   Only override color tokens — spacing, typography, motion stay the same. */
.dark,
[data-theme="dark"] {
  /* Backgrounds */
  --color-background:       ;
  --color-surface:          ;
  --color-surface-elevated: ;

  /* Brand — typically same hue, adjusted lightness for dark bg */
  --color-primary:          ;
  --color-primary-hover:    ;
  --color-primary-active:   ;
  --color-primary-fg:       ;

  --color-secondary:        ;
  --color-secondary-hover:  ;
  --color-secondary-fg:     ;

  /* Text */
  --color-text:             ;
  --color-text-muted:       ;
  --color-text-disabled:    ;
  --color-text-inverse:     ;

  /* Borders */
  --color-border:           ;
  --color-border-strong:    ;
  --color-border-focus:     ;

  /* Status — may need adjusted for dark bg visibility */
  --color-error:            ;
  --color-error-bg:         ;
  --color-success:          ;
  --color-success-bg:       ;
  --color-warning:          ;
  --color-warning-bg:       ;
  --color-info:             ;
}

/* ---- Accessibility utilities ---- */

/* Visually hidden but readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip navigation link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-primary-fg);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  z-index: var(--z-tooltip);
}

/* ---- Global focus ring ---- */
/* Visible on keyboard focus only — not mouse click */
*:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies 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 colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall