npx skills add ...
npx skills add giuseppe-trisciuoglio/developer-kit --skill tailwind-design-system
Skill for creating and managing a Design System using Tailwind CSS and shadcn/ui. Use when defining design tokens, setting up theming with CSS variables, building a consistent UI component library, initializing a design system configuration, or wrapping shadcn/ui components into design system primitives.
npx skills add giuseppe-trisciuoglio/developer-kit --skill tailwind-design-system
Expert guide for creating and managing a centralized Design System using Tailwind CSS (v4.1+) and shadcn/ui. This skill provides structured workflows for defining design tokens, configuring themes with CSS variables, and building a consistent UI component library based on shadcn/ui primitives.
Relationship with other skills:
globals.css with a centralized theming system (light/dark mode)Run these commands to set up the project:
Validation checkpoint: After setup, verify with:
Create src/app/globals.css with your design tokens:
Validation checkpoint: Verify tokens are valid CSS:
Bridge CSS variables to Tailwind utilities (Tailwind v4.1+):
Add dark mode class toggle in components/providers/theme-provider.tsx:
Validation checkpoint: Test dark mode:
Create src/components/ds/Button.tsx:
Validation checkpoint: Verify build passes:
Run the token validation script:
Validation checkpoint: Ensure all shadcn components use DS tokens:
Extend the base tokens in globals.css:
Usage: <div className="bg-warning text-warning-foreground">Warning</div>
See references/component-wrapping.md for complete examples including Button, Text, and Stack primitives with full TypeScript types.
Create constrained design system components that enforce token usage. Inline example:
For applications requiring multiple brand themes beyond light/dark:
Verify all required tokens are defined:
--primary, --primary-foreground) for seamless integration@theme inline vs @theme: Use @theme inline when bridging CSS variables to Tailwind utilities; use @theme for direct token definition:root. Missing dark tokens cause visual regressions:root are global. Use [data-theme] selectors for multi-theme without conflictsvar() lookup adds minimal but non-zero overhead@theme directive and @theme inline are v4.1+ features. For v3 projects, use tailwind.config.js with theme.extendglobals.css. Never hardcode color values in components--primary, --destructive) not appearance-based (--blue-500, --red-600)-foreground token for contrast complianceindex.ts for clean importsgap-2, gap-4, gap-6) through DS components rather than arbitrary values