How to build Mastra frontend interfaces with the @mastra/playground-ui design system. This skill should be used when creating or modifying any application UI — pages, components, styling, or tokens — in this repo or in an external consumer of the design system. The docs site has its own styling and is out of scope.
npx skills add https://github.com/mastra-ai/mastra --skill mastra-frontend
Every Mastra application UI is assembled from the @mastra/playground-ui design system. Building a screen is composition work: pick existing components, arrange them with layout utilities, and let the design system provide the look. Writing colors, font sizes, shadows, or radii by hand means you have left the happy path. Changing the design system itself (tokens, ds/ components, variants) is a separate, explicitly-approved task. For Tailwind v4 mechanics (renames, dynamic utilities, CSS-first APIs), read the tailwind-v4 skill.
gap-*, margins, size constraints (w-*, max-w-*, min-h-*, shrink-0) — belongs to the consumer, through Tailwind utilities on your own wrappers and, when needed, directly on DS components.className on a DS component is fine for layout (<DialogContent className="max-w-100">) and forbidden for look (<Button className="bg-red-500 text-xs">). If a component's look doesn't fit, use its variants and props; if none fit, escalate for a new variant instead of overriding.
packages/playground-ui/src/ds/components/ (primitives) and src/domains/ (feature components). Check the exports and existing usage before building anything new.@theme block in packages/playground-ui/theme.css. The namespace tells you the generated utility: --color-x → bg-x/text-x/border-x, --spacing-x → p-x/gap-x/h-x, --text-x → text-x, --shadow-x → shadow-x, --radius-x → rounded-x. Token names drift — confirm them in the file, never use them from memory.Pick the highest rung that fits; each step down needs a reason:
theme.css.min-w-100, size-6, grid-cols-15).bg-(--row-bg), text-(color:--agent-color-fg)).max-h-[calc(100dvh-3rem)]).theme.css variables are API: adding one generates utilities for every consumer. Never modify theme.css or packages/playground-ui/src/ds/tokens/*.ts without explicit approval. To request a token: document the use case, explain why a local CSS custom property is not enough, and wait for the design team.bg-(--var) — not a new @theme token.var(--color-surface4), getComputedStyle) — never resolveConfig or JS token imports for styling.packages/playground-ui/src/index.css imports Tailwind and theme.css, and declares the dark variant: @custom-variant dark (&:is(.dark *)).:root; html.light flips the semantic variables. Theming is automatic through semantic tokens — never write dark: color overrides on semantic tokens; reserve dark: for rare structural differences.cn() — exported from @mastra/playground-ui for consumers, src/lib/utils.ts inside the package. Its twMerge is extended with the DS scales (src/lib/tw-merge-config.ts), so DS utilities like text-ui-md merge correctly; importing twMerge from tailwind-merge directly mis-merges them.packages/playground-ui outside ds/ (for example src/domains/) is itself a consumer of the ds/ primitives — all of these rules apply there too.bg-*, text color or size, border color, rounded-*, shadow-*, or padding via classNameds/ or domains/ componentbg-[#hex], text-[15px], p-[13px] — a token or scale value existstheme.css (guessed from memory)bg-[var(--x)] — use bg-(--x)min-w-[400px] and friends that divide cleanly by 4px — use the scale (min-w-100) bg-${tone}-500 ) — map props to complete strings--color-* or --animate-* token added for one component's local statedark: color overrides on semantic tokens — the palette already flips via html.lighttwMerge imported from tailwind-merge or manual string concatenation instead of cn()motion-safe:/motion-reduce:Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
Applies 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.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Guidance 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.
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.
Take mastra-ai/mastra-frontend from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.