Agent skill

Converting CSS Modules to Tailwind: Migration Skill

This skill walks an AI coding agent through migrating .module.css and .module.scss files to Tailwind utility classes, one component at a time, with a clean-up checklist.

Install
git clone https://github.com/spencerpauly/awesome-cursor-skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What does the CSS Modules to Tailwind skill do?

Converting-css-modules-to-tailwind is a skill in the awesome-cursor-skills repository. It guides an AI coding agent through replacing .module.css and .module.scss files with Tailwind utility classes in four steps: inventory, convert, handle module patterns such as composes, and clean up the leftover imports.

The skill sits in a curated list of Cursor skills. It migrates a component's .module.css or .module.scss file into Tailwind utility classes, and it can be invoked directly because it is marked user-invocable.

The four step workflow

  1. Inventory the module: list its classes before touching anything.
  2. Convert each class into utility classes.
  3. Handle the CSS Modules specific patterns.
  4. Clean up: remove the styles import, delete the module file, update any barrel index.ts, search for other imports, then run the app and check it visually.

Module patterns it knows how to translate

  • composes: flatten it into utilities, or extract a shared component instead of a shared class.
  • Conditional class names: keep the logic in clsx or classnames.
  • Dynamic styles[variant] lookups: replace them with a lookup object such as variantClasses.
  • :global overrides: move them to globals.css inside an @layer components block, or use @apply.
  • SCSS nesting, variables and mixins: flatten the nesting and map $variables to theme values in tailwind.config.ts.

Who the migration skill is for

Best for

  • React codebases that already use CSS Modules and are standardising on Tailwind.
  • Cursor users, since the repo's README says to copy skills into a .cursor/skills folder.
  • Teams that want conversion done one component at a time with a visual check at the end.

Not for

  • Plain CSS files that are not modules. The same repo has a sibling converting-css-to-tailwind skill for that.
  • Setting up Tailwind from scratch. For a token-first setup, see tailwind-design-system.
  • Building new components. shadcn and ui-styling cover component styling.

Use it with UiChemy

UiChemy builds WordPress pages, so this skill belongs on the React side of a project. If a Figma design has to become a WordPress site, UiChemy Figma to WordPress handles that, and Composer edits the result. Click Get Started on uichemy.com.