How this skill is triggered — by the user, by Claude, or both
Slash command
/design-engineer:design-systemsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build and evolve a token-driven design system. The whole discipline reduces to one rule: **components consume semantic tokens, never primitives or raw values.**
Build and evolve a token-driven design system. The whole discipline reduces to one rule: components consume semantic tokens, never primitives or raw values.
Three layers, each referencing the one above. Components only ever touch the bottom layer.
--blue-500: #3b82f6, --gray-900, --size-16. Never used directly by components.--color-bg, --color-fg, --color-fg-muted, --color-border, --color-accent, --space-4. Maps to primitives. This is the layer theming swaps.--button-bg: var(--color-accent). Add only when a component needs to diverge.Semantic tokens decouple UI from raw values: change --blue-500 once, or remap --color-accent per theme, and every consumer updates. No find-and-replace across components.
| Category | Tokens |
|---|---|
| Color | --color-bg, --color-fg, --color-fg-muted, --color-border, --color-accent, --color-danger |
| Spacing | --space-1…--space-12 (numeric scale, e.g. 4px step) |
| Typography | --font-size-*, --line-height-*, --font-weight-* |
| Radius | --radius-sm, --radius-md, --radius-lg, --radius-full |
| Elevation | --shadow-sm, --shadow-md, --shadow-lg |
| Z-index | --z-dropdown, --z-modal, --z-toast (named, ordered) |
| Motion | --duration-fast, --duration-base, --ease-out |
--color-fg-muted, --space-4.--space-1…--space-12. Predictable, extensible.sm / md / lg.bg / fg / accent / danger, modal / toast — describe role, not value (--color-accent, not --color-blue).Define light values on :root, override only the swapped semantic tokens under [data-theme="dark"]. Primitives stay fixed; semantics remap.
:root {
--blue-500: #3b82f6;
--gray-50: #f9fafb;
--gray-900: #111827;
--color-bg: var(--gray-50);
--color-fg: var(--gray-900);
--color-accent: var(--blue-500);
--space-1: 0.25rem;
--space-4: 1rem;
--radius-md: 0.5rem;
--shadow-md: 0 4px 6px rgb(0 0 0 / 0.1);
}
[data-theme="dark"] {
--color-bg: var(--gray-900);
--color-fg: var(--gray-50);
}
Toggle by setting document.documentElement.dataset.theme = "dark". Components read --color-bg and follow automatically — no per-component theme logic.
A typed accessor keeps token names honest in TS:
const tokens = {
colorBg: "--color-bg",
colorFg: "--color-fg",
colorAccent: "--color-accent",
space4: "--space-4",
radiusMd: "--radius-md",
} as const;
type Token = keyof typeof tokens;
export const cssVar = (token: Token) => `var(${tokens[token]})`;
export function Button({ children }: { children: React.ReactNode }) {
return (
<button
style={{
background: cssVar("colorAccent"),
color: cssVar("colorBg"),
padding: `${cssVar("space4")}`,
borderRadius: cssVar("radiusMd"),
}}
>
{children}
</button>
);
}
The component references only semantic tokens. Theme switches and primitive edits flow through untouched.
Create from scratch
:root (--color-bg, --color-fg, --space-*, …).[data-theme="dark"] overrides for the semantics that change.Extend without breaking
Refactor hardcoded → tokens
#, px, rgb() in components.#, px, or rgb() in a component is drift. Route it through a token.--blue-500 breaks theming. Always go through a semantic token.--color-fg on --color-bg meets WCAG AA in both light and dark.npx claudepluginhub shoto290/shoto --plugin design-engineerProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.