Setting your AI coding tool up to use your design system

Luke Murphy
Written by Luke Murphy
May 12, 2026

AI coding tools will happily invent your design system. Wrong component names, made-up props, hex codes instead of tokens, variants that don't exist. The fix isn't complicated. AI coding tools need two sources of information about your design system, and a lot of folks only give them one.

The package: the "what"

Install your design system package into the repo you're working in. This sounds obvious, but a surprising number of teams skip it and then wonder why the AI keeps inventing things.

With the package in node_modules, the AI can read your real types, your actual props, and the tokens you've actually shipped. It can import { Button } from '@your-org/ds' and know it exists. It can pull --space-md and know that resolves to 8px on web or 16dp on native.

This is the only way you get platform-correct output. Working on iOS? It needs the iOS tokens. Working on web? It needs the CSS variables. The package is how the AI gets these right.

The MCP: the "why" and "when"

The package tells the AI what exists, but it doesn't tell it when to use a Card vs a Panel, why your spacing scale jumps from 16 to 24, or what your composition rules are for stacking components together.

That's what a documentation MCP is for. For example, connect zeroheight's MCP and the AI can pull your usage guidance, your do/don't examples, your UX patterns, and your accessibility notes, as well as whatever else is in there. With this layer, it has a better chance of actually using your design system as you intended, rather than creating more prototypes or proof-of-concepts that drift.

A useful way to think about it: the package is the vocabulary, the MCP is the grammar. Vocabulary is useful, but you need both to write coherent sentences.

Skills: the workflow layer

On top of both, skills (or rules, or instruction files, depending on your tool) encode workflows. "When building a form, check the form patterns in the MCP first." "Never use raw hex codes; always pull from the tokens package." "If a component you need doesn't exist, flag it rather than invent it." Skills are where you bake in the team's way of working; the stuff that's obvious to you and invisible to a generic AI.

Tool by tool: How you encode skills

Repo-native tools

Claude Code. Native MCP and skills (SKILL.md, project or global). Reads your installed package directly from node_modules, as long as it's included in the project you're working in. To avoid long skills files, you can also create smaller reference files (in /references) that work with edge cases.

Cursor. MCP via .cursor/mcp.json, rules via .cursor/rules/, and skills via .cursor/skills/ (rolled out in 2026). Strong codebase indexing picks up your installed package well, especially if you're working directly in your design system project, or a project that has the design system added via a package.

GitHub Copilot (in VSCode). Agent mode supports MCP. Repo-level guidance via .github/copilot-instructions.md, path-specific via .github/instructions/, plus Agent Skills. Best fit if you're already deep in GitHub workflows.

Sandbox tools

Figma Make. Used to be the weak link. Now Make Kits let you bring your production React design system in as a package (public npm or Figma's private registry) with guidelines you write to teach Make how to use it. Also supports verified-partner and custom MCP connectors (including zeroheight). Requires React 18+ and a Vite-compatible build.

Lovable. Connect a project as a Design System (Enterprise) so other projects in the workspace inherit it. Supports public and private npm packages. Prebuilt personal connectors for tools like Atlassian and Linear on all plans; custom MCP on Business and Enterprise.

v0. Defaults to shadcn/ui — that's the path of least resistance. For your own system, publish a shadcn-style registry (Vercel's registry-starter is the canonical template). Each component gets an "Open in v0" deep link with the right context attached.

Repo-native tools (the first four) let you give the AI both the package and the MCP directly. Sandbox tools are catching up fast — Make Kits and Lovable Design Systems specifically address bringing your real package in — but each has its own conventions you need to follow.

The setup, in order

  1. Install your design system package in the project you're working in.
  2. Connect your documentation MCP (zeroheight's, or whatever yours is).
  3. Add skills, rules, or instructions that tell the AI to actually use them.

That's the whole thing. The AI now has the components, the guidance, and the rules of engagement. Most of the "AI doesn't understand our design system" problem disappears the moment all three are in place.

As a bonus, if you're using Claude Code with your zeroheight MCP, here are the two skills files I use to direct Claude in the right way. The first is a skills.md file that tells Claude where to look for what...

skills.md
---
name: zeroheight-design-system-routing
description: Route design system queries when a zeroheight-style MCP is connected. Use for questions about components, tokens, props, variants, or usage; for building UI, prototypes, or new design system components; or for auditing code against design system standards. Routes "what exists" to the installed npm package and "how / when / why" to the zeroheight MCP. Triggers on phrases like "what components do we have", "which button should I use", "build me a [screen/component]", "add a [component] to the design system", "audit this for compliance".
---

# Zeroheight design system routing

Routes design system questions to the right source. Does not fetch or synthesise — it directs Claude where to look.

## Core principle

- **The installed npm package** is the source of truth for *what exists*: components, props, types, tokens, variants, exports. It matches the version installed in the project.
- **The zeroheight MCP** is the source of truth for *how, when, and why*: which component to use, when each variant applies, accessibility, composition, design principles.

Default to the package for lookups, the MCP for guidance. Don't cross over.

## Detection

1. **Find the design system package** in `package.json` (common shapes: `@<org>/design-system`, `@<org>/ui`, `<org>-ds`). If unclear, ask the user — don't guess.
2. **Identify the zeroheight MCP** by what it exposes (component guidance, design principles, token docs). Its name varies per styleguide, so don't match on a literal string.
3. **If a source is missing**, say so and use what's there. If neither is available, fall back to general best practices — never invent component or token names.

When the package and MCP disagree, the package wins on existence and API shape; the MCP wins on usage and intent. Surface the disagreement rather than picking silently.

## Scenarios

Identify the scenario first, then route.

### 1. Looking up an artefact

*"What button variants do we have?"*, *"What props does `<Modal>` take?"*, *"Is there a `spacing.lg` token?"*

→ Read the **package**. Faster, version-accurate. Use the MCP only for the follow-up *"which one should I use?"*.

### 2. Building a UI, prototype, or screen

*"Build a settings page"*, *"Create a checkout flow"*, *"Make a delete-confirmation modal"*.

→ **MCP first**, then package. MCP picks components and plans composition. Package implements — real imports, real prop names, real token names.

### 3. Building a new design system component

*"Add a `<Stepper>` component"*, *"Build a date picker following our patterns"*.

→ **Structure from the package** (read sibling components for layout, naming, prop patterns, tests, stories). **Principles from the MCP** (expected variants, a11y, spacing/typography rules). Works the same whether the user is inside the DS repo or contributing from outside.

### 4. Auditing or testing

*"Audit this page for compliance"*, *"Are we using the right tokens?"*, *"Is this accessible per our standards?"*

→ **MCP first** — auditing is applying guidance. Use the package only to confirm what's actually exported or what version is installed.

## Edge cases

For changelogs, deprecations, and MCP-duplicated API tables, see `references/exceptions.md`.

The second is the exceptions.md file that lives in references/

exceptions.md
Edge cases for zeroheight routing
Cases where the default rule (package for what, MCP for how/when/why) inverts or needs both sources. Read this only when one of these situations comes up.
Changelogs and release notes
Usually live in the styleguide (MCP), not the package, even though they describe what changed. If the user asks "what's new in our design system recently" or "when did <X> change", start with the MCP.
Deprecations
Described narratively in the MCP — "don't use <OldButton>, use <Button variant="…">" — but often also annotated in the package's types as @deprecated. Check both:

The package tells you whether something is still exported and whether it's marked deprecated in code.
The MCP tells you the migration path and rationale.

Prop or token tables surfaced through the MCP
Some styleguides duplicate API tables in the MCP for convenience. Treat them as secondary — the installed package is canonical, because the styleguide may document a different version than the one pinned in the project. If the MCP says a prop exists and the package doesn't export it, the package wins.

Happy vibing!

Luke Murphy
Luke Murphy
Luke (they/them) is Lead Design Advocate @ zeroheight. When they’re not enthusing about DesignOps, they are playing in bands, drawing silly things or writing academic articles about Josie and the Pussycats.
Try zeroheight
The design systems platform that keeps teams and agents in sync
Start for free
Share this post