- Home
- Skills
- Frontend & Web Apps
- CSS to Tailwind — First-Pass Converter
More screenshots
Works with the AI tools you already use
CSS to Tailwind — First-Pass Converter
Converts a plain CSS or Sass site to Tailwind v4 classes as a fast first pass, checks every class against Tailwind's own scale, and lists exactly what you still have to fix by hand.
$5
CSS to Tailwind — First-Pass Converter
Example session with this skill installed
/css-to-tailwind Migrate this site's styles to Tailwind. I only want to see what converts cleanly and what I'd have to fix by hand.
- Read your context and instructions
- Compiled the css to tailwind
- Generated the app files
Sample project: a three-page cafe site (index, menu, about) with one Sass-built stylesheet, about 50 selectors, BEM naming, media queries, hover states and a few things Tailwind has no direct class for.
Conversion mode
Tool-assisted: 42 converter calls, and every result checked against Tailwind's own scale and color tables.
Migrated
| File | Selectors converted | Stylesheet | Backup |
|---|---|---|---|
| index.html | 22 | kept, 5 rules flagged | index.html.bak |
| menu.html | 19 | kept, 5 rules flagged | menu.html.bak |
| about.html | 15 | kept, 5 rules flagged | about.html.bak |
Across the three pages that is 32 selector blocks, including their hover and media-query variants and the active-link compound selector. The original Sass and CSS files are untouched.
Flagged for manual review
.menu__item + .menu__item(the divider line between menu items): sibling combinator, not converted..about__quote::before(the opening quote mark): generated content, not converted.@keyframes fade-in: no utility class.- The
animationon.notice: depends on the keyframes above; the rest of.noticewas converted. @supports (display: grid)block: not converted.
While the old stylesheet stays linked, its rules win every conflict, so the page looks right mostly because of the old CSS. To see what the Tailwind classes do on their own, comment out that link. The flagged rules then visibly change, and that is your to-do list.
What the check caught in the converter's output
| Selector | Converter said | Corrected to | Why |
|---|---|---|---|
| .container | max-w-24 | max-w-275 | max-width: 1100px; max-w-24 is 96px |
| .container | my-0 for margin: 0 auto | mx-auto | the auto horizontal margin was lost, which would break centering |
| .hero (768px and up) | py-24 | md:py-28 | padding: 112px; py-24 is 96px |
| body | text-4 | text-base | 16px; text-4 is not a font-size class |
| .site-header__logo | text-6 | text-2xl | 24px |
| .card__title | text-5 | text-xl | 20px |
| .notice, footer | text-3.5 | text-sm | 14px |
| brand colors | bg-f7f1e8, text-3b2a20 | bg-[#f7f1e8], text-[#3b2a20] | not real classes; kept as exact hex |
| .cards | grid columns unsupported | grid-cols-1 md:grid-cols-3 | standard utilities preferred over arbitrary ones |
| .menu__list | list-style unsupported | list-none | one-to-one literal match |
Most converter calls had at least one wrong or missing declaration. The check corrected them before anything reached your HTML.
Values left as arbitrary (no standard step)
Font sizes 13, 15, 32, 40 and 56px, line heights 1.2 and 1.7, letter spacing 0.08em and 0.2em, one shadow, the font stack, and eight brand colors from the Sass variables. They are listed for a visual check. One near-miss color was snapped: #fff7e6 became bg-yellow-50, flagged for confirmation.
Tailwind preflight differences
Tailwind resets browser defaults that the original CSS never set, so a page can differ slightly even where every rule converted. The report lists what applies here, with the fix.
- index.html: the hero title and the three card titles lose their default bold (add
font-bold). - menu.html: the page heading loses its default bold (add
font-bold). - All pages: the unclassed paragraph in the footer loses its top and bottom margins, and footer links lose their underline (add
my-4andunderline).
Tailwind runtime
No Tailwind build was found, so a version-pinned CDN script with an integrity hash was added to each page so the classes render right away. This is a preview convenience, not a production setup.
Before you trust this
This is a best-effort mechanical conversion. Nothing was checked in a browser by the agent. Compare the pages visually, including hover states and the md breakpoint.
css-to-tailwind-first-pass-converter-app.zip
ZIP · project files
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Moving a hand-written CSS or Sass site to Tailwind usually means finding out the hard way what does not translate. This skill gives you that answer first. It converts what converts cleanly, checks each class against Tailwind's own scale, and tells you plainly what it left alone, so you can see whether Tailwind will cause problems on your site before you commit to it.
It is a first pass, not a promise of a perfect replacement. If the result looks right, keep it and fix only the spots the report lists. If it does not, your originals are untouched and every edited page has a backup.
What it does
- Compiles Sass (nesting, variables, mixins, partials) to plain CSS in a temporary file, so your .scss source is never touched
- Converts your stylesheet selector by selector, including hover and focus states and media queries as Tailwind variants
- Checks every class against the bundled Tailwind scale and color tables, and corrects the ones that do not match your CSS. For example a 320px width comes out as w-80, never w-24
- Leaves anything that needs judgment for you instead of guessing: selector combinators, keyframe animations, @supports blocks, pseudo-element content, approximate colors and off-scale values
- Keeps your old stylesheet linked while any rule is still unconverted, so nothing silently loses its styling, and tells you how to comment the link out to see what the Tailwind classes do on their own
- Saves a .bak copy of each HTML file before editing it, and never overwrites an existing backup
- Adds a short Tailwind rules section to CLAUDE.md, creating the file if needed
- If the project has no Tailwind at all, adds a version-pinned CDN script with an integrity hash so the classes render right away for preview
- Ends with a report: what was converted, what needs a manual fix, what the check corrected, and which values stayed arbitrary
How it works
- Finds your HTML pages and the stylesheets they link, and asks which to migrate
- Compiles Sass to flat CSS if needed and splits it into rules
- Converts each rule to a candidate class list, using the optional converter tool when it is connected or Tailwind knowledge when it is not
- Verifies every candidate against the scale and color tables and records each correction
- Applies the classes to your HTML, backs up each file first, and unlinks the old stylesheet only when every rule was converted
- Reports the result, including what to check by eye
What it is not
It does not guarantee a pixel-identical page. Tailwind resets some browser defaults, such as heading weight, paragraph margins and link underlines, so a page can differ slightly even where every rule converted. The report names the elements affected. It handles plain HTML files; Vue single-file components, CSS Modules and styled-components are out of scope.
Requirements
Node.js, used once to compile Sass with npx. A TailwindCSS MCP server is optional: if it is connected the skill uses it as a starting point, and if not the skill carries on without it. Either way every class is verified against the bundled tables. Network access is used only to fetch the Sass compiler and, for a project with no Tailwind, to pin the CDN script version.
Try it free first
Try it Free runs on Agensi's servers with a 5,000-character input limit, so it previews part of a page (for example one body and its stylesheet). The installed skill handles whole sites locally.
Works well with
Tailwind Review, the free companion skill, for ongoing checks once your markup is on Tailwind.
More from KMRVID
The full Claude Code skill bundle for Figma, Tailwind and Astro workflows is available on Gumroad: https://gaspanik.gumroad.com/l/kmrvid-claudeskills
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 3 days ago
- Passed all security checks, Safe to install