Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add YuniorGlez/gemini-elite-core --skill "design-system-pro"
Install specific skill from multi-skill repository
# Description
Senior Design System Architect & Token Engineer for 2026. Specialized in layered design tokens, Tailwind 4 CSS-first themes, and headless UI orchestration using Radix. Expert in building multi-brand, multi-theme systems with high architectural integrity, automated documentation-as-code, and AI-driven drift detection.
# SKILL.md
name: design-system-pro
description: Senior Design System Architect & Token Engineer for 2026. Specialized in layered design tokens, Tailwind 4 CSS-first themes, and headless UI orchestration using Radix. Expert in building multi-brand, multi-theme systems with high architectural integrity, automated documentation-as-code, and AI-driven drift detection.
π¨ Skill: design-system-pro (v1.0.0)
Executive Summary
Senior Design System Architect & Token Engineer for 2026. Specialized in layered design tokens, Tailwind 4 CSS-first themes, and headless UI orchestration using Radix. Expert in building multi-brand, multi-theme systems with high architectural integrity, automated documentation-as-code, and AI-driven drift detection.
π The Conductor's Protocol
- Token Topology Audit: Analyze the existing primitive and semantic tokens for naming consistency and accessibility compliance.
- Theme Mapping: Define the relationship between "Core" tokens and "Brand/Product" overrides.
- Sequential Activation:
activate_skill(name="design-system-pro")βactivate_skill(name="tailwind4-expert")βactivate_skill(name="ui-ux-pro"). - Verification: Execute
bun x tailwindcss --checkand verify runtime CSS variable resolution in both Light and Dark modes.
π οΈ Mandatory Protocols (2026 Standards)
1. Layered Token Architecture
As of 2026, a flat token list is a legacy pattern.
- Rule: Follow the Primitive β Semantic β Component hierarchy.
- Protocol: Never use primitive tokens (e.g., blue-500) directly in components. Use semantic tokens (e.g., action-primary-bg).
2. Tailwind 4 CSS-First Configuration
- Rule: The
tailwind.config.jsis deprecated. Use@themeblocks in CSS. - Protocol: Centralize tokens as native CSS variables in a
packages/design-tokenspackage for runtime interoperability.
3. Headless UI & Radix Integration
- Rule: Avoid "Themed Components" that bundle styles. Use headless logic (Radix) and apply semantic utility classes.
- Protocol: Ensure all components support high-contrast modes and respect
prefers-reduced-motion.
4. Documentation-as-Code (DaC)
- Rule: Documentation must be a side-effect of the code, not a manual task.
- Protocol: Use JSON-LD or typed JSON files as the source of truth for tokens, transformed via Style Dictionary for CSS, Android, and iOS.
π Show, Don't Just Tell (Implementation Patterns)
Tailwind 4 CSS-First Theme
packages/design-tokens/src/base.css:
@import "tailwindcss";
@theme {
/* Primitive Scale */
--color-blue-500: #3b82f6;
/* Semantic Layer */
--color-brand-primary: var(--color-blue-500);
--color-action-hover: color-mix(in srgb, var(--color-brand-primary), black 10%);
/* Component Layer */
--button-radius: var(--radius-lg);
}
Semantic Component Usage (React 19 + Radix)
import * as Tooltip from "@radix-ui/react-tooltip";
export function CustomTooltip({ children, content }: { children: React.ReactNode, content: string }) {
return (
<Tooltip.Root>
<Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
<Tooltip.Content
// Using semantic Tailwind 4 classes
className="bg-brand-primary text-white p-2 rounded-button shadow-xl animate-in fade-in"
>
{content}
<Tooltip.Arrow className="fill-brand-primary" />
</Tooltip.Content>
</Tooltip.Root>
);
}
π‘οΈ The Do Not List (Anti-Patterns)
- DO NOT hardcode hex codes or pixel values in components. Always use tokens.
- DO NOT create "Component Overrides" via deep CSS nesting. Use CSS variables.
- DO NOT ignore the accessibility of your color tokens. Check contrast ratios at the "Semantic" layer.
- DO NOT build a design system without a dedicated "Sandbox" (Storybook or internal docs).
- DO NOT mix naming conventions. If you use
camelCasefor variables, don't usekebab-casefor tokens.
π Progressive Disclosure (Deep Dives)
- Layered Token Strategy: Primitives, Semantics, and Components.
- Tailwind 4 Monorepo Config: CSS-First themes at scale.
- Headless UI Patterns: Using Radix and Aria-Kit.
- Automated Token Pipelines: From Figma to Production with Style Dictionary.
π οΈ Specialized Tools & Scripts
scripts/validate-contrast.py: Audits the semantic token list for WCAG 2.2 compliance.scripts/generate-theme-json.ts: Exports the CSS@themeblock into a JSON format for mobile apps.
π Learning Resources
Updated: January 23, 2026 - 21:55
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.