Skip to content

borghei/Claude-Skills / product-team/design-direction

design-direction

Verified

Turns a product brief into a design-system spec: style direction, contrast-checked palette, type pairing, tokens, UX rules and chart choices. Use when starting a new product's UI, picking a palette or fonts, or auditing a token file.

references/stacks.json

View on GitHub
{
  "version": 1,
  "note": "How the spec lands in each stack. platform says where the stack runs.",
  "stacks": [
    {"id": "css", "name": "Plain HTML + CSS", "platform": "web", "keywords": ["html", "css", "vanilla", "static site"], "notes": ["Emit colour roles as custom properties on :root and redefine them under @media (prefers-color-scheme: dark) and [data-theme=dark].", "Wrap non-essential transitions in @media (prefers-reduced-motion: no-preference) so reduced motion is the default.", "Use clamp() for display sizes only; keep body text at a fixed rem so user zoom works.", "Use logical properties (padding-inline, margin-block) so RTL mirrors for free.", "Set scroll-padding-top to the sticky header height so focused elements are not hidden."]},
    {"id": "tailwind", "name": "Tailwind CSS", "platform": "web", "keywords": ["tailwind", "utility css"], "notes": ["Map semantic roles to CSS variables and reference them in the theme (bg-bg, text-fg, bg-primary) instead of palette names like blue-600.", "Replace the default spacing and radius scales with the spec's values so off-scale classes are not available.", "Use the motion-safe: and motion-reduce: variants for every animation utility.", "Enable dark mode via a class or data attribute strategy so users can override the OS.", "Keep arbitrary values ([13px]) out of components; each one is a token that skipped review."]},
    {"id": "react", "name": "React (web)", "platform": "web", "keywords": ["react", "jsx", "vite"], "notes": ["Keep tokens in CSS variables, not in a JS theme object read at render, so theme switching needs no re-render.", "Read reduced motion once with matchMedia and pass it to animation libraries; most do not honour it automatically.", "Give every icon-only button an aria-label at the component API level so it cannot be omitted.", "Reserve space for async content with skeletons sized like the final layout to avoid CLS.", "Use a headless, accessible primitive library for dialogs, menus and comboboxes rather than hand-rolling focus traps."]},
    {"id": "nextjs", "name": "Next.js", "platform": "web", "keywords": ["next", "nextjs", "next.js", "app router"], "notes": ["Load fonts through the framework's font optimisation to self-host and avoid layout shift; limit to the spec's families.", "Set the theme attribute before hydration (inline script or cookie) to avoid a flash of the wrong mode.", "Use the image component with explicit sizes so responsive images do not overfetch.", "Keep design tokens in a shared CSS file imported in the root layout."]},
    {"id": "vue", "name": "Vue / Nuxt", "platform": "web", "keywords": ["vue", "nuxt"], "notes": ["Expose tokens as CSS variables and use them in scoped styles; avoid per-component hex values.", "Use a colour-mode composable that writes a class on html and persists the user's choice.", "Transition components should check reduced motion and fall back to an instant state change."]},
    {"id": "svelte", "name": "Svelte / SvelteKit", "platform": "web", "keywords": ["svelte", "sveltekit"], "notes": ["Built-in transitions ignore reduced motion; wrap them in a helper that returns zero duration when it is set.", "Define tokens once in app.css on :root; component styles use var() only.", "Server-render the theme attribute from a cookie to avoid a mode flash."]},
    {"id": "swiftui", "name": "SwiftUI", "platform": "mobile", "keywords": ["swiftui", "ios", "swift", "iphone", "ipad"], "notes": ["Define colour roles as asset-catalogue colours with Any/Dark appearances; reference them by role name.", "Use text styles (body, headline) so Dynamic Type scales the type ramp; avoid fixed point sizes.", "Minimum hit area 44x44pt; use contentShape or frame on small icons.", "Read accessibilityReduceMotion from the environment and swap movement for opacity.", "Prefer system materials over custom blur; they adapt to contrast settings."]},
    {"id": "compose", "name": "Jetpack Compose", "platform": "mobile", "keywords": ["compose", "jetpack", "android", "kotlin"], "notes": ["Map the spec's roles into a colour scheme for light and dark and provide it through the app theme.", "Use sp for text and keep the type scale in the typography object so font scaling applies.", "Minimum touch target 48x48dp; the minimum interactive size modifier enforces it.", "Check the animator duration scale (and reduce motion where the OS sets it to zero).", "Support dynamic colour only if the brand allows it; otherwise lock to the spec palette."]},
    {"id": "flutter", "name": "Flutter", "platform": "mobile", "keywords": ["flutter", "dart"], "notes": ["Build ThemeData for light and dark from the spec's roles; components read Theme.of(context), never literals.", "Respect the text scale factor; test at the largest accessibility setting.", "Check MediaQuery disableAnimations and shorten or remove transitions.", "Use the platform-adaptive widgets where navigation conventions differ between iOS and Android."]},
    {"id": "react-native", "name": "React Native", "platform": "mobile", "keywords": ["react native", "expo", "rn"], "notes": ["Keep a token module with light and dark role maps and pick one from the colour-scheme hook.", "Set accessibilityLabel and accessibilityRole on every touchable; icon-only touchables fail review without them.", "Use hitSlop to reach 44pt / 48dp without changing visual size.", "Read the reduce-motion setting from AccessibilityInfo and disable non-essential animations.", "Allow font scaling; cap it with a maximum multiplier only where layouts genuinely break."]},
    {"id": "shadcn", "name": "shadcn/ui on Radix + Tailwind", "platform": "web", "keywords": ["shadcn", "shadcn/ui", "radix"], "notes": ["Map the spec's colour roles onto the CSS variables the components read (background, foreground, primary, muted, border, ring) in :root and .dark; do not edit component files to change colour.", "Set the ring variable from the focus token so every primitive shows the same focus outline.", "The radius variable drives every component; pick the spec's md radius and let sm/lg derive from it.", "Copied components are your code now: re-check labels and contrast after each edit, the upstream defaults no longer protect you.", "Keep animation utilities behind motion-safe: so reduced motion is honoured."]},
    {"id": "angular", "name": "Angular", "platform": "web", "keywords": ["angular", "angular material", "cdk"], "notes": ["Define tokens as CSS custom properties in the global stylesheet; component styles read them through var(), even with view encapsulation.", "Use the CDK a11y module for focus trapping, live announcements and focus monitoring instead of custom directives.", "Disable animations when reduced motion is requested by checking matchMedia when the app starts and setting the animations-disabled flag.", "Keep route changes announcing the new page title for screen readers."]},
    {"id": "astro", "name": "Astro (content sites)", "platform": "web", "keywords": ["astro", "static site generator", "content site"], "notes": ["Ship the theme as a plain stylesheet; most pages need no client JavaScript at all.", "Hydrate only interactive islands, and give each a server-rendered state that works before hydration.", "Use the built-in image component to set width and height so images do not shift layout.", "Self-host the two webfonts and preload only the body weight."]},
    {"id": "nuxt", "name": "Nuxt / Vue SSR", "platform": "web", "keywords": ["nuxt", "nuxtjs", "nuxt ui"], "notes": ["Resolve the colour mode on the server from a cookie so the first paint is already in the right mode.", "Put tokens in a global CSS file and map them into the UI library's theme config rather than duplicating hex values.", "Use the head utilities to set lang and dir per locale so RTL pages mirror correctly.", "Lazy-load below-the-fold components and keep their space reserved."]}
  ]
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall