ui-theme

Define semantic CSS custom-property tokens with dark-mode overrides and auditing policies.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/grvpanchal/elegant-opencode --skill ui-theme-grvpanchal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ui-theme
Source: https://github.com/grvpanchal/elegant-opencode/tree/main/skills/ui-theme
Command: npx skills add https://github.com/grvpanchal/elegant-opencode --skill ui-theme-grvpanchal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design-token systems provide a scalable way to manage colors, typography, spacing, and shadows by replacing hard-coded values with semantic tokens that can be themed and audited across an application.

Core Features & Use Cases

  • Design Tokens: CSS custom properties that expose semantic tokens (e.g., --color-primary, --spacing-md) for consistent theming.
  • Dark-Mode Support: Token overrides via [data-theme] attributes to switch between light and dark palettes without code changes.
  • Token Auditing & Guidelines: Policies for semantic naming, token categorization, and documentation to prevent hard-coded values.
  • Use Case: Implement a design system across a large product with a single source of truth for tokens, enabling rapid theming and accessibility improvements.

Quick Start

Create a tokens.css file that defines semantic tokens using CSS variables and implement a dark-mode override via [data-theme] attributes.

Frequently Asked Questions about ui-theme

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a design-token system using CSS custom properties?▼

A design-token system uses CSS custom properties to expose semantic tokens for colors, spacing, and typography, ensuring consistent theming across an application. You create a tokens.css file to define these variables as a single source of truth.

What's the best way to support dark-mode overrides without changing component code?▼

Dark-mode overrides are handled via [data-theme] attributes that switch between light and dark palettes. This approach swaps token values at the root level, meaning component code requires no changes to support dark-mode.

How do I prevent hard-coded values when scaling a UI design system?▼

You prevent hard-coded values by applying token auditing policies that enforce semantic naming and token categorization. The system provides documented code patterns and usage guidelines to maintain a single source of truth.

Does this design-token approach work for large products with complex theming needs?▼

Yes, this approach is designed for implementing a design system across large products. It establishes a single source of truth for semantic color, spacing, and typography tokens, enabling rapid theming and accessibility improvements at scale.

What are semantic naming conventions for CSS design tokens?▼

Semantic naming for CSS design tokens involves categorizing variables by their function rather than their visual value, such as using --color-primary or --spacing-md. This ensures tokens remain meaningful and maintainable across different themes.

When do I need to audit my CSS variables for design-token compliance?▼

You need to audit your CSS variables when hard-coded values appear in your stylesheets or when scaling a UI design system. Token auditing checks for semantic naming compliance and proper token scope to ensure consistent theming.