component-css-modules-migration
OfficialMigrate styles safely with zero visual drift.
Software Engineering#playwright#cva#css-modules#visual regression testing#click-ui#styled-components migration#tokenized theming
AuthorClickHouse
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It prevents visible regressions when migrating a Click UI component from styled-components to CSS Modules by enforcing a byte-for-byte, visual regression–verified workflow.
Core Features & Use Cases
- Mechanical, scope-limited migration: Refactors styling only, preserving existing (even incorrect) behavior and DOM structure to keep visual diffs credible.
- Visual regression baseline + parity enforcement: Captures a baseline from the styled-components rendering and requires CSS Modules snapshots to pass without regeneration.
- Token-faithful CSS Modules implementation: Translates theme token usage into the correct
--click-*CSS variables and mirrors selector/cascade behavior to match styled-components output. - Deterministic component refactor pattern: Replaces styled-components with
cva+cn, preservesclassNamemerging, preserves prop/attribute spread order, and keepsforwardRefanddisplayNamebehavior.
Quick Start
Use this skill to migrate a single component (one at a time) by first creating a visual regression baseline on the existing styled-components stories and spec, then performing the CSS Modules + cva/cn refactor and verifying that yarn test:visual passes with zero snapshot changes.
Dependency Matrix
Required Modules
None requiredComponents
Standard packageđź’» Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: component-css-modules-migration Download link: https://github.com/ClickHouse/click-ui/archive/main.zip#component-css-modules-migration Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.