What problem does it solve?
ProtoWiki needs a robust, predictable theming system that automatically adapts to global OS preferences, URL overrides, and per-subtree overrides without conflicting CSS. This Skill provides boot-time resolution of the theme into a data-theme attribute and enables scoped token application for consistent visuals across components.
Core Features & Use Cases
- Boot-time global theme resolution using ?theme=light or ?theme=dark and OS prefers-color-scheme.
- Data-theme attribute propagation to ensure Codex tokens align with the active theme.
- Per-subtree overrides via a theme prop for side-by-side dark/light previews and targeted styling.
- useTheme() hook for read-only access to the global theme from within components.
Quick Start
Append ?theme=dark (or ?theme=light) to the ProtoWiki URL to boot with the global theme, then apply per-component theme props to override within subtrees.