emotion-migrate
Installation
SKILL.md
Emotion → Mantine + CSS Modules Migration Skill
Migrate Emotion styled-components (@emotion/styled, @emotion/react) to Mantine layout components with style props and CSS modules. The goal is zero Emotion imports, zero inline styles, and maximum use of design system tokens.
Priority Order (Strict)
- Mantine components + style props —
Box,Flex,Stack,Group,Text,Title,Card. This is the DEFAULT. Every CSS property must be checked against style props FIRST. - CSS modules (
.module.css) — ONLY for properties that Mantine style props genuinely cannot express: pseudo-selectors (:hover,:focus,::before),box-shadow,bordershorthand,animation/@keyframes, complex selectors,cursor,pointer-events,overflow,text-overflow,white-space,transition. - Inline styles ONLY for dynamic values —
style={{ }}is allowed only for truly dynamic runtime values (e.g., computed widths, positions, data-driven colors). All static styles must use Mantine props or CSS modules.
Mantine-First Decision Gate (CRITICAL)
For EACH styled component, go through every CSS property and ask: "Can this be a Mantine style prop?" If yes → style prop. If no → CSS module. Do NOT dump an entire component into a CSS module just because one property needs it — split them.
Properties that ARE style props (use these, not CSS modules):