Skip to content
SlashClone
Made by@brandkit

Brand tokens export

@brandkit/brand-tokens-export

Turn the tokens in your brand.md into code: CSS variables, a Tailwind theme (v3 and v4), and a design-tokens.json for Figma token plugins. One source of truth, regenerated in a second whenever the brand changes.

SkillContentv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1# Brand tokens export
  2. 2
  3. 3Keep your brand colors, fonts, and spacing in one place, `brand.md`, and generate the code from it. One command writes CSS variables, a Tailwind theme, and a design-tokens.json for Figma.
  4. 4
  5. 5**Who it is for:** anyone with a brand guide and a website or app that keeps drifting off it. Designers who want Figma and code to match. Developers who are tired of copying hex codes.
  6. 6
  7. 7## Example
  8. 8
  9. 9You have this in `brand.md`:
  10. 11````markdown
  11. 12```yaml tokens
  12. 13color:
  13. 14 primary: "#1F7A5C"
  14. 15 accent: "#F2A541"
  15. 16font:
  16. 17 heading: [Fraunces, Georgia, serif]
  17. 18radius:
  18. 19 md: 10px
  19. 20```
  20. 21````
  21. 23Ask "export our brand tokens". Claude runs the script and writes `brand-tokens/`:
  22. 25```css
  23. 26:root {
  24. 27 --color-primary: #1F7A5C;
  25. 28 --color-accent: #F2A541;
  26. 29 --font-heading: Fraunces, Georgia, serif;
  27. 30 --radius-md: 10px;
  28. 32```
  29. 34plus `theme.css` (Tailwind v4), `tailwind.theme.cjs` (Tailwind v3), and `design-tokens.json` (W3C format). Then it tells you the one line to add for your setup. Try it on `examples/brand.md`.
  30. 36## What it can access
  31. 38- Reads `brand.md` or `docs/brand.md`.
  32. 39- Writes only inside `brand-tokens/`.
  33. 40- Runs one script, `scripts/export-tokens.mjs` (Node, no dependencies). No network.
  34. 42## Setup
  35. 44None. Needs Node 18 or newer. Pairs well with `brand-guide-builder` (writes the tokens block) and `/brand` (uses it).