/saas-design-principles:design-tokensfrom saas-design-principles
Builds and reviews design token systems, theming architecture, dark mode, CSS custom properties, and DTCG specification compliance.
Ships in saas-design-principles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The industry has converged on a three-tier token architecture. Adopting it correctly means theme switching requires only toggling a class — no component re-renders, no complex logic.
Raw values. The palette.
Examples: #3B82F6, 16px, 600
Purpose-driven aliases. The meaning layer.
Examples: --color-text-primary, --color-bg-surface, --spacing-md
Scoped references. The component layer.
Examples: --button-bg, --card-border-radius, --input-border-color
Name tokens by purpose, not appearance.
| Bad (appearance) | Good (purpose) |
|---|---|
--color-white | --color-bg-surface |
--color-blue-500 | --color-action-primary |
--font-large | --font-heading |
--color-gray-200 | --color-border-default |
--color-bg-surface works in both light and dark mode. --color-white becomes meaningless the moment themes change.
Use CSS custom properties with a class toggle on the root element. CSS variables cascade down, automatically updating every component without re-rendering the component tree.
Implementation pattern:
.dark (or [data-theme="dark"]) selector<html> to switch themesUse the hybrid approach:
prefers-color-schemelocalStoragedata-theme attribute on <html>Consider Twitter's three-option model for apps where users spend long sessions:
The DTCG released the first stable specification (2025.10), backed by Adobe, Amazon, Google, Figma, Shopify, and others. Adopting the DTCG JSON format future-proofs token architecture for cross-platform tooling and design-to-code pipelines.
Working implementations in examples/:
examples/three-tier-tokens.md — Complete CSS custom property system: primitives, semantics, component tokens, and DTCG JSON formatexamples/dark-mode-toggle.md — Hybrid theme switching with system detection, localStorage persistence, and framework-specific togglesWhen reviewing or building a token/theming system:
--white, --blue-500)prefers-color-schemelocalStoragedata-theme attribute on <html>What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
design-tokens, theming, dark-mode, css-custom-properties, dtcg
13 skills in this plugin
/accessibilityThis skill should be used when the user is building or reviewing accessibility (a11y), WCAG 2.2 AA compliance, keyboard navigation, focus management, screen reader support, ARIA attributes, color contrast, or SPA accessibility. Covers legal requirements, accessible component primitives, and the unique focus challenges of single-page applications./authenticationThis skill should be used when the user is building or reviewing login flows, magic links, SSO (SAML/OIDC), multi-factor authentication (MFA), OTP input fields, password reset, or session management. Covers the modern auth stack hierarchy, MFA fatigue prevention, session expiry UX, and GDPR compliance for authentication./npx claudepluginhub oborchers/fractional-cto --plugin saas-design-principlesOther plugins' skills for the same job