theme-system

Enforce theme token usage for UI styling in OpenChamber.

7.8k|844|Updated Sep 11, 2025
One-click install
npx skills add https://github.com/openchamber/openchamber --skill theme-system-openchamber
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: theme-system
Source: https://github.com/openchamber/openchamber/tree/main/.opencode/skills/theme-system
Command: npx skills add https://github.com/openchamber/openchamber --skill theme-system-openchamber

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures consistent and maintainable UI theming by enforcing the use of predefined theme tokens instead of hardcoded colors or Tailwind classes, simplifying the process of creating and modifying visual elements.

Core Features & Use Cases

  • Theme Token Enforcement: Guarantees all UI colors adhere to the established theme system.
  • Component Styling: Facilitates the creation and modification of UI components, ensuring visual coherence.
  • Use Case: When developing a new button component, use primary.base for its background and primary.foreground for its text color to maintain brand consistency.

Quick Start

Use the theme-system skill to apply the surface.elevated color to the background of a div element.

Frequently Asked Questions about theme-system

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

FAQPage Schema
How do I style UI components with design tokens instead of hardcoded colors?

You can style UI components with design tokens by referencing a JSON-based theme system that maps predefined tokens like primary.base to CSS variables. This mechanism prevents hardcoded colors and provides CSS variable fallbacks for broad compatibility.

Why should I use theme tokens instead of Tailwind color classes for frontend styling?

You should use theme tokens instead of Tailwind color classes to ensure consistent and maintainable UI theming. This approach centralizes visual properties and enforces design principles by preventing direct Tailwind color class usage in your components.

How do I apply a surface elevated background color to a UI element?

To apply a surface elevated background, reference the surface.elevated token from the JSON theme system when styling your element. This maps the visual property to the corresponding CSS variable fallback, ensuring the component adheres to design principles.

Does the theme token system provide CSS variable fallbacks for older browsers?

Yes, the theme token system provides CSS variable fallbacks for broad compatibility. Integrating with a JSON-based theme system ensures visual styling gracefully degrades across environments while maintaining strict adherence to design principles.

Can I use hardcoded hex values when modifying existing UI components?

No, you cannot use hardcoded hex values when modifying UI components due to strict theme token enforcement. The system prevents hardcoded colors and direct color class usage, guaranteeing all visual elements adhere to the established theme system for maintainability.