1 Generate your token file

Generate your token file

Head to the designtoken.md generator and configure your design system:

Open the generator →
2 Place it in your project

Place it in your project root

Drop the file at the root of your project so Claude Code picks it up as context:

your-project/
├── designtoken.md    ← place it here
├── src/
├── package.json
└── ...

Claude Code reads files in your project root as context automatically. By placing designtoken.md at the top level, it becomes part of the context Claude sees when generating code for your project.

3 Use with Claude Code

Start building with tokens

Claude Code reads project files as context automatically. Once designtoken.md is in your project root, Claude will discover it and apply the token values when writing UI code.

You can reference it explicitly in your prompts for even stronger results:

"Build a settings page using the tokens from designtoken.md for all styling."

"Create a card component. Use the color, spacing, and radius tokens from designtoken.md."

Claude Code will read the full file and apply the color scales, typography stack, spacing, radius, elevation, and component tokens consistently across every file it generates or modifies.

Before & after

See the difference tokens make in what your agent outputs:

Without tokens (generic)
<button style="
  background: blue;
  color: white;
  padding: 10px 20px;
">
  Click me
</button>
With designtoken.md
<button style="
  background: var(--color-primary-500);
  color: #fff;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
">
  Click me
</button>

With tokens, every component Claude Code generates uses your actual design values instead of arbitrary defaults.

Tip

For static projects, the designtoken.md file gives your agent everything it needs. If you're building a product that needs runtime token resolution (where the design system updates across your app without regenerating files) that's what LESS Studio does.

Best practices

Frequently asked questions

Does Claude Code read designtoken.md automatically?
Yes. Claude Code reads files in your project root as context automatically. If designtoken.md is in your project root, Claude Code will find it and use the tokens when generating UI code.
Do I need to reference it in every prompt?
No, but mentioning "use designtoken.md" in your prompt helps Claude prioritize the token file when making styling decisions. Once it's in your project, Claude will see it automatically.
Can I use designtoken.md with CLAUDE.md?
Yes. You can reference designtoken.md in your CLAUDE.md file for persistent guidance. For example, add a line like "Always use the tokens defined in designtoken.md for styling" so Claude Code applies your design tokens without needing a reminder in each prompt.
Generate your designtoken.md →