Skip to main content
Glama
marvkr

Better Design

Get a Design System Build Kit

get-design-system-kit
Destructive

Returns the correct build kit for a chosen design system across React, HTML, React Native, SwiftUI, Shopify, and design tokens, so agents can install components and tokens for the host's capabilities.

Instructions

Return the correct build kit for a design system through one capability-based entry point.

Use target: "react" whenever the host can write files and run a terminal. It returns the shadcn install command and real React components. Use target: "html" only for pure inline canvases or artifacts where npm and a build step are unavailable; it returns the framework-free token and component CSS kit. Use target: "react-native" for a React Native or Expo app and target: "swiftui" for an iOS app, never the react target: each returns this system's stored mobile kit, its own material on native primitives, plus the handoff to the matching guide. Use target: "shopify" when the user is styling a Shopify store or theme; it returns ready-to-write Liquid theme files (a CSS asset with this system's real tokens, snippets, and theme editor sections) plus the mandatory handoff to Better Design's get-shopify-guide MCP tool for documentation and validation.

For target: "html", the returned class contract is mandatory, including inside a host-provided visualization workflow: paste the kit CSS verbatim, keep class="ds" on the artifact root, and keep ds-* component classes on interactive controls. App-specific classes may sit alongside them for layout only; never rename or replace the ds-* classes. Before presenting, inspect the artifact source and revise it if either class="ds" or ds- is absent. Put hover-only CSS inside @media (hover: hover) and (pointer: fine) and never let hover move a control or override its selected/pressed styling.

Inline canvases also inject their own semantic-element colors. Replace APP_ROOT in hostIsolationCssTemplate with the artifact's real root selector and paste it after host/base CSS. Inspect rendered text against its computed background and fix anything below 4.5:1 contrast before presenting. Do not stretch cards to fill the canvas or turn every group into a card or pill.

Reuse the selected design system ID or generated projectId. If none is selected, obtain a design system ID from find-design-system first. A redesign does not authorize changing the selected system or its assigned icons.

For the React target, calling with a designSystemId returns ONE shadcn command that installs every component (globals + all UI primitives) into components/ui/ in one shot. Run that command before writing feature code so the agent has the full component library available.

Pass 'component' only when the user explicitly asks to inspect or customise a specific component's source code. In that mode the tool returns the requested components, a scoped install command, and their source code.

Base UI (@base-ui/react) is the default flavor. BEFORE installing, inspect the user's project: if package.json has any @radix-ui/* dependency (or components/ui already imports @radix-ui), pass 'library: "radix"' to match their existing setup; otherwise use the default Base UI. Both flavors install to the same components/ui/ paths.

Match the requested change

Classify the request as repair, polish, or redesign: restore behavior, refine layout, or rebuild layout and components. Follow the user's scope, not analytics-only tool context. Do not downgrade redesign to polish, expand repair, or turn token export/source inspection into a redesign.

Keep the selected design system and assigned icon family/variant unless the user requests a change. Use exact returned icon names/source, never substitute packs, emoji, or invented SVGs. Inventory sections, components, states and responsive layouts; map requested patterns to real system components and record missing primitives.

Plan structural changes and component adoption before redesigning. Rebuild the requested hierarchy, layout and interactions; token swaps and unused imports do not count. Preserve unrelated behavior, accessibility and production/control boundaries.

Preserve all supplied paragraphs, reviews, offer details, links and disclosures, including collapsed answers and inactive tabs, unless the user requests cuts or rewrites. Require a source-to-render content comparison; investigate every omission, not just section counts. A shortened fixture is not a completed page. Label partial prototypes and never treat their checks as full-page evidence.

Compare before/after renders of the same content and states at the same desktop and mobile widths. Show which planned structural changes and component adoption are visible; verify the selected icons, spacing, hierarchy, and working interactions. Copy and accessibility fixes alone do not complete a redesign. Tool calls, generated files, or a source-only review are not visual evidence. If a baseline or rendered check is unavailable, name the missing evidence and report the redesign as unverified. Keep all existing build, accessibility, hover, comprehension, and review gates.

Explain design trade-offs

Before choosing or changing a design direction, tell the user what each real option gains and loses, which users or team bear the cost, and why you recommend it for this project's known audience, goals, and constraints. Use a short line per option: "Gain: ...; lose: ...; affects: ...; fits because: ...". Load get-ux-principle with topic "tradeoffs" when deeper guidance is needed.

Use the current conversation and project evidence. Label assumptions and predicted effects. Do not invent research, conversion gains, metrics, or project facts. If the user has already chosen, explain the accepted trade-off without reopening the choice. Keep minor edits brief; this adds no approval step and never excuses an accessibility or safety failure.

Put the explanation in the conversation or requested project handoff, not extra product UI copy. Before presenting the result, check that material gains and losses were communicated and report any changed trade-off.

Presentation builds use Open Slide

For any pitch deck, presentation, or slide system in a coding host with filesystem and terminal access, use Open Slide (@open-slide/core) with React slide components as the primary editable source. Do not substitute PowerPoint, Google Slides, Reveal, or a standalone static artifact unless the user explicitly requests a different primary format. Unless the user explicitly requests that format as primary, PPTX and PDF are secondary exports only. If Open Slide is unavailable, add and configure it before authoring the deck.

Pick the build target by capability, not by habit:

  • You can write files into a project and run a terminal (Claude Code, Cursor, Devin, Antigravity, an IDE agent, Claude Desktop with filesystem/shell tools, any checked-out repo): call get-design-system-kit with target: "react", run the shadcn install, and build real React components. This is the default for any actual project.

  • You are in a pure inline chat canvas with NO file writes and NO terminal (ChatGPT canvas, a Claude.ai chat artifact): call get-design-system-kit with target: "html" and build with the framework-free HTML/CSS kit.

Emitting a single standalone .html file as "the app" when you could run the React install is a bug: it can't import @/components/ui/*, drifts from the registry, and discards the real components.

Whichever target, keep the output tight: build the screens the user actually asked for (one, unless they asked for more) from the system's own components/tokens, don't pad them with bespoke decorative CSS, and keep prose brief. Allow a short gain/loss comparison per material design option; skip long write-ups and trailing follow-up questions.

Component fidelity is pass-fail. Before writing markup, inventory components/ui/* and map every visible pattern to an installed component. Use Sidebar for the primary app shell, Table and its row/cell exports for tabular records, and OnboardingStepper for a dependent flow with more than three steps when those components are installed. A raw <aside>, repeated <div> rows, or a custom progress rail is a failure when the matching component exists. Generated-registry dependency changes are part of the required component install. Treat newly added registry-owned packages as install artifacts, not edits to existing package versions. Preserve every pre-existing dependency version and keep required additions. If the install attempts to change an existing version, report that exact conflict and stop; never silently revert a required addition or replace its component.

Compose the installed Sidebar exports directly, including its header, content, items, groups, and footer when provided. Do not restyle a raw aside to resemble the Sidebar or override its surface, active-state, radius, and type treatment in feature code. A design-system import that is never used does not count.

Typography fidelity is pass-fail. Read the installed font tokens before editing globals.css; preserve their @font-face, @import, or framework font loader, and never leave a var(--font-*) reference undefined. In the rendered app, await document.fonts.ready, inspect the computed font-family on the page and a heading, and confirm the intended family loaded before presenting the screen.

Hierarchy is pass/fail, not polish. Give the first view one P0 task and at most one P1 summary; move P2 history, standings, detailed metadata, and empty-state chrome below it or behind a tab/disclosure. Unless the screen is a dense tool (traces, logs, tables and dashboards) or the user asked for density, fail and simplify any first view with more than three major regions, five immediately visible actions, or 25 visible text fragments. A dense tool keeps its summary stats, its records and the selected record's detail in one view: order them with hierarchy instead of cutting them. Do not make density look compact by shrinking everything: the primary display must be at least 1.5× base UI text, section anchors at least 1.2×, and bold must be reserved for the primary display, section anchors, and active values. Labels are a last resort; remove captions that restate obvious values.

Dashboard quality is pass-fail. Start with the domain page title, one supporting line, and one primary action in the same header group. Preserve this scan order: metrics → records → interpretation. Metric values must dominate their labels. Preserve an explicit overview title and supporting line verbatim when the request or fixture supplies them; an active navigation label is not a substitute for the page h1. Do not rename the overview around its primary action. Supplied interface copy takes precedence over generated-copy length targets; report a conflict instead of silently rewriting the supplied words. Every requested dashboard region must exist in source before rendered review begins. When interpretation prose is not supplied, derive a factual interpretation only from supplied counts and current values; do not infer movement, causation, or status. Keep action or selected-state color for actions and selection; use distinct status colors for positive, warning, destructive, and neutral meaning, always with text or an icon as a second cue. Use an installed Badge or StatCard semantic variant when one exists; never style every rate with text-primary. Never invent a trend or status claim to create color or context. Keep useful count, trend, status, record metadata, and explanatory context instead of flattening every row into the same neutral treatment. Do not show a workflow stepper on an overview or dashboard; the overview is not a workflow step. Start progress only after the user begins the dependent task, and keep it attached to the task screens. When a fixture lists its overview as the first item in a steps array, exclude that overview when counting workflow steps. With three or fewer dependent task screens, use no stepper or progress rail.

Composition is also pass/fail. Keep one visible identity block per level and size a short primary task to its content; a major surface fails when more than one-third of its height is unused after the action. Keep related input, derived value, and submit action together, with the input and button sharing a control height and bottom baseline. Decorative spatial cues stay behind the domain header, never behind controls. Paired flags or logos must be accurate and symmetric; otherwise omit every peer asset rather than drawing placeholders.

The UI copy inside the screen follows the same restraint: short headlines (about 6 words), supporting lines about 15 words and at most one per section, no filler adjectives, no exclamation marks, and no emoji as icons. Every visible text fragment needs one job: context, outcome, next action, real doubt, or legal/security. Do not add template footer, provenance, helper, or slogan copy. If deletion does not hurt meaning, action clarity, safety, compliance, or tone, keep it deleted. Never place an eyebrow, kicker, category, or status label immediately above an h1, h2, or h3; start with the title and put essential context in the supporting line or after the title. Avoid the template shapes (gradient hero with an uppercase eyebrow pill, centered three-card feature grid, left-border callout boxes) unless the user asks. After writing the UI, call get-review-rules. For dashboards, run review-dashboard-structure, check-comprehension, and inspect-spacing, deploy the exact source to a public HTTPS preview, then call finalize-dashboard-review with its URL, the exact source, installed component source, and unchanged fixture. Better Design captures the PNG, visible text, and measured DOM itself at 390, 1440, and 1728, then content-addresses the live deployment. A missing trusted capture, invalid deployment revision, invalid geometry, or hidden fixture field means incomplete. Only a VALID final receipt permits presentation; any later source or deployment edit voids it. For other UI, fix every critical or serious review, comprehension, and spacing finding before presenting. Screenshot desktop and mobile and squint-test each viewport; on a commerce or product page, only the product image, price, and primary CTA may dominate.

Input Schema

NameRequiredDescriptionDefault
screenNoreact-native and swiftui only: a few words naming the screen you are building, such as "habit tracker today" or "workout log". The kit then shows how shipped apps built it.
targetYesRequired build target. Use "react" for any host with filesystem + terminal; use "html" only for inline chat canvases/artifacts. Use "shopify" for Shopify stores and themes. Use "dtcg" to hand the tokens to a design tool: it returns a W3C Design Tokens document for Style Dictionary, Tokens Studio, Terrazzo, or a Figma plugin that creates variables. Use "store-screenshots" for App Store and Google Play screenshots in this system: it returns slide files and a render script that writes PNG files at the store sizes. Use "react-native" for a React Native or Expo app and "swiftui" for an iOS app: each returns this system's stored mobile kit, its own material on native primitives, plus the handoff to the matching guide.
contextNoOptional. One sentence on WHY you are calling this and what the user asked for (e.g. 'adding nav icons for the fintech dashboard'). Used only for usage analytics; does not change the result.
installNoSwiftUI and React Native: leave this out. The server then writes the kit's theme and component files into the app folder, and for SwiftUI also a ContentView.swift holding a finished home screen built from them, only when the folder has none. It never writes an App struct, an Xcode project or a package. The reply lists the files instead of repeating their source. Pass false only when the user said not to touch their files. React: true makes this server create a Vite + React + TypeScript + Tailwind v4 project in an empty folder and install the whole design system into it; it refuses an existing project, where you run the kit's install commands yourself.
libraryNoReact target only, default "base-ui". Pass "radix" when the project already uses Radix primitives.
componentNoReact target only. Pass only when the user asks to inspect specific component source code. Omit to scaffold the entire design system.
projectIdNoGenerated project ID from create-design-system / get-design-system-status. Supported with every target but react.
projectDirNoThe absolute path of the project or app folder. Defaults to the folder this server runs in, which is the folder the user opened.
designSystemIdNoCatalog design system ID from find-design-system. Required for target react; for every other target pass this or projectId.

Output Schema

NameRequiredDescriptionDefault
nameYesDisplay name of the design system or project.
stepNoCurrent generation step, while generating.
statusYescompleted | error | pending | generating | selected
shotUrlNoReal screenshot of the showcase page for the self-contained preview widget.
viewUrlNoOwner-facing Better Design page (the human 'Open' link). May require login.
tokensCssYesCSS custom-property stylesheet for the system's tokens.
previewUrlNoPublic, cookieless showcase URL used to generate preview assets. Falls back to viewUrl.
themeFilesNoShopify target only. Theme files to write verbatim at each path: the per-system CSS asset, the Liquid snippets, and the theme editor sections.
tokensJsonNoDTCG target only. The design tokens as a W3C Design Tokens (DTCG) document. Write it to tokens.json; every token tool reads this format, including Style Dictionary, Tokens Studio, Terrazzo, and the Figma plugins that create variables.
hoverPolicyNoHTML and Shopify targets. Mandatory pointer-safe hover contract to verify before presenting.
iconLibraryNoThe design system's existing icon family and variant. Reuse it; do not select another pack.
installNoteNoImportant install flavor or fallback note for clients that read only structuredContent.
installedToNoThe project folder this server installed the design system into. Build there; run no setup command.
nativeFilesNoReact Native and SwiftUI targets only. Write each file verbatim at its path: this system's stored theme and material, and the primitives that read it.
componentCssNoHTML target only. Paste this token-driven ds-* component stylesheet verbatim.
localInstallNoTrue when this server runs on the user's machine and installs the design system itself: call get-design-system-kit again with install: true.
customCssScopeNoHTML and Shopify targets. Custom classes may arrange layout but must not replace kit component styling.
installCommandNoshadcn install command, when complete.
installLibraryNoActual component library flavor installed by installCommand.
hierarchyPolicyNoHTML target only. Mandatory first-view hierarchy, progressive-disclosure, and information-budget contract.
screenshotFilesNoStore screenshots target only. Write each file verbatim at its path, then follow buildInstructions to capture screens, write the slides and render the PNG files.
textColorPolicyNoHTML and Shopify targets. Mandatory semantic foreground-token contract; surface tokens and opacity must not be used to mute text.
iconInstructionsNoInstructions for exact selected-icon lookup, or an explicit missing-selection warning.
buildInstructionsNoRequired design-choice guidance and any target-specific build/review steps for clients that read only structuredContent.
compositionPolicyNoHTML target only. Mandatory layout-density and container-restraint policy.
newProjectCommandNoCreates a Vite + React + TypeScript project with Tailwind v4, the @/* alias and components.json, for when there is no project yet. Run it, then run installCommand inside the new my-app folder.
unsupportedTokensNoReact Native and SwiftUI targets only. Tokens that need a browser to resolve, a calc(), a var(), or a relative oklch(), so they carry no native value. Set them by hand if the screen needs them. A token whose mode is dark matters more: the dark palette inherits the light value for any key it does not set, so a dropped dark override reads as the light colour on a dark screen.
iconMaterialStatusNoShopify stored glyph metadata is current, or legacy and unverified. This is not rendered review evidence.
iconSelectionStatusNoSelected means identity is known, not that rendered icon use was reviewed.
minimumTextContrastNoHTML and Shopify targets. Minimum contrast for normal visible text against its computed background.
componentExampleHtmlNoHTML target only. Starter markup that demonstrates the required .ds wrapper and ds-* component classes.
componentMaterialCssNoHTML target only. Paste this design-system-specific material override after componentCss.
requiredWrapperClassNoHTML and Shopify targets. The artifact or snippet root must retain this class exactly.
hostIsolationCssTemplateNoHTML target only. Replace APP_ROOT with the artifact root selector and paste after host/base CSS so semantic text cannot inherit the host's light/dark colors.
supportedInstallationScopeNoShopify full kit is not page-scoped. Withhold installation for a page-only task until isolated files and styles exist.
requiredComponentClassPrefixNoHTML and Shopify targets. Interactive components must retain classes with this prefix; never rename it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare destructiveHint=true, openWorldHint=true, readOnlyHint=false, and idempotentHint=false, and the description corroborates those traits by explaining that the tool writes kit files, can create a Vite project, refuses existing projects, and performs installs. It adds substantial behavioral context beyond the annotations, including file-writing behavior, install refusal conditions, and mandatory handoffs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is massively overlong, with large sections on general UI quality, dashboard review, presentation tooling, typography, and copy rules that are not necessary to select or invoke this tool correctly. The target guidance is front-loaded and well structured, but the bulk of the text does not earn its place in a tool definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, nine parameters, 100% schema coverage, and the presence of an output schema, the description is complete enough for an agent to invoke the correct target and interpret the tool's side effects. The extensive behavioral and prerequisite guidance leaves little ambiguity about what the tool does or what is required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful guidance beyond the schema for target selection, component inspection, library selection, install behavior, and projectId/designSystemId reuse. It explains when to pass component, when to pass library: "radix", and how target choice depends on host capabilities.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource: return the correct build kit for a design system through one capability-based entry point. The subsequent target-by-target guidance clearly distinguishes what each target returns, so an agent can identify the tool's purpose without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use react, html, react-native, swiftui, and shopify targets, including capability-based conditions such as filesystem and terminal access. It also names alternatives and prerequisites, such as using find-design-system first and using get-shopify-guide for Shopify documentation and validation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.