converting-css-modules-to-tailwind

Migrates CSS Modules to Tailwind utility classes in React components.

672|104|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill converting-css-modules-to-tailwind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: converting-css-modules-to-tailwind
Source: https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/converting-css-modules-to-tailwind
Command: npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill converting-css-modules-to-tailwind

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual effort of translating CSS Modules into Tailwind utility classes, helping you modernize components without rewriting styling logic by hand.

Core Features & Use Cases

  • Class Mapping: Converts each styles reference into an equivalent Tailwind class set.
  • Pattern Handling: Covers conditional class names, composed classes, dynamic variants, and global overrides.
  • SCSS Migration: Helps flatten nested selectors, variables, and mixins when moving from module-based styling to utility-first markup.
  • Use Case: Update a React card component from Card.module.css to Tailwind while preserving layout, spacing, typography, and interactive states.

Quick Start

Ask the assistant to convert the attached component and its matching CSS Module into Tailwind classes, then remove the styles import and verify that the visual output still matches.

Frequently Asked Questions about converting-css-modules-to-tailwind

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

FAQPage Schema
How do I migrate CSS Modules to Tailwind in React components?

The Skill handles React classnames by mapping conditional class names, composed classes, and dynamic variants directly into equivalent Tailwind utility classes, ensuring the component's interactive states and logic remain intact without manual translation.

What is the best way to convert SCSS files to Tailwind utility classes?

The best way to convert SCSS files to Tailwind is by flattening nested selectors, variables, and mixins from your .module.scss files into utility-first markup, replacing the module-based styling approach entirely with Tailwind classes.

Does migrating CSS Modules to Tailwind preserve pseudo-elements and global overrides?

Yes, migrating CSS Modules to Tailwind preserves pseudo-elements and global overrides by translating these specific styling patterns into corresponding Tailwind utility configurations while maintaining the equivalent visual output and interaction behavior.

Can I automate converting SCSS module variables and mixins into Tailwind classes?

You can automate converting SCSS module variables and mixins into Tailwind classes by flattening nested SCSS patterns during the migration process, transforming module-based styling logic directly into utility-first markup without rewriting styles manually.

What happens to the CSS Modules styles import after converting a component to Tailwind?

After converting a component to Tailwind, the CSS Modules styles import is completely removed from the React file, as all styling logic is replaced by inline Tailwind utility classes applied directly to the JSX elements.