Prompt to convert a Shopify export to Tailwind CSS

Short answer

This prompt asks an AI coding assistant to restyle a WebExport copy of a Shopify storefront with Tailwind utility classes. It keeps the saved product and collection pages, builds a theme from the store’s colors and fonts, removes cart scripts, and links buy buttons to your Shopify store instead of rebuilding a checkout.

Last reviewed

Key facts

  • Tailwind theme values live in an @theme block, such as --color-* for brand colors.
  • The saved copy has no cart or checkout, so cart code is removed.
  • Product pages share templates, so a few conversions cover the whole catalog.
  • Test status: Tailwind CSS steps tested on a real export (Tailwind CSS 4.3.5), Shopify cleanup not yet tested.

The prompt

Paste this into your AI coding assistant with the unzipped export open, and replace the placeholders in square brackets.

Shopify to Tailwind CSS
You are helping me move a static export of a Shopify site to Tailwind CSS.

CONTEXT
- ./exported-site is a WebExport download of my Shopify site: HTML, CSS, JavaScript, fonts and images.
- Live site for comparison: [LIVE_URL]. Final domain: [DOMAIN]. Host: [HOST: Vercel, Netlify, Cloudflare Pages, Amazon S3 or Nginx].

TARGET: Tailwind CSS on the existing HTML
- Keep the HTML pages. Install tailwindcss and @tailwindcss/cli, and start src/input.css with @import "tailwindcss".
- Put the old colors, fonts and radii into an @theme block, then rewrite classes to utilities one component at a time.
- Keep the old stylesheet linked until a page matches the live site.

SHOPIFY-SPECIFIC CLEANUP
- Remove calls to /cart.js, /cart/add.js and product .js endpoints. They only exist on Shopify.
- Replace add to cart with a link to the product on [STORE_URL]. Do not build a cart or checkout.
- Keep /products/<handle> and /collections/<handle> as paths.
- Extract product data only from values present in the saved HTML. Leave missing fields empty and list them.
- Search for cdn.shopify.com. Download or replace each hit.

RULES
- Keep the design and every URL path. List path changes in REDIRECTS.md.
- Do not invent content, prices or links. Report gaps in MIGRATION_NOTES.md.
- Build after each step and ask before deleting a script or stylesheet.

START
Inventory the folder, show me a plan, wait for my go-ahead, then convert the home page only.

How to run it

  1. Work on a copy of the unzipped folder so you keep the original.
  2. Paste the prompt, approve the theme first, then one component or page at a time, building after each step.

What to expect from Shopify to Tailwind CSS

A storefront has few distinct page types: home, collection, product and a handful of content pages. That makes restyling manageable. Convert the shared header, footer and product card first, then the collection grid, then the product page, and the same classes apply across hundreds of products.

Shopify themes ship a lot of CSS for features your static copy no longer has, such as cart drawers and predictive search. Ask the assistant to remove the markup and rules for any feature that has no working counterpart, so the stylesheet shrinks along with the page.

Questions the assistant should ask you

  • Which cart and drawer elements can be removed from every page?
  • Which image ratio should the product cards use?
  • Which product pages have an unusual layout and should be tested first?

Verify the result

Run these from the project folder after each batch. The last command lists files that still refer to Shopify.

terminal
npx @tailwindcss/cli -i ./src/input.css -o ./dist/output.css

# files that still refer to the old platform
grep -rlE "cdn.shopify.com|/cart.js" . --include="*.html" --include="*.css" --exclude-dir=node_modules | head
  • The CSS build finishes with no errors, and hover, focus and breakpoint styles match the live site.
  • No page links the old platform stylesheet unless you chose to keep it.
  • Click every buy button and confirm it opens the right product on your Shopify store.
  • Compare ten product titles and prices with the live store.

What can go wrong

  • Dead cart markup remains and shows empty panels. Remove the markup together with the script.
  • Product images vary in shape, so a fixed aspect ratio crops some of them. Check the oddest products.
  • Old rules and new utilities fight each other during the transition. Convert one component at a time and build after each.

Frequently asked questions

Does Tailwind help with page weight on a store?

The CSS can shrink, but images usually dominate. The Website Asset Size Analyzer shows where the weight is.

What replaces the cart?

A link to the product on your Shopify store, or a hosted buy button. The prompt does not rebuild a cart.

Can I keep the same fonts?

Yes, as long as the font files are in the export. The assistant reads the font families from the CSS and wires them into the theme.

How many products can one session handle?

Template changes apply to all products at once, so catalog size matters little. Check a sample of product pages after each change.

Official documentation

Free tools for this job

Start with the files

The prompt works on a WebExport download. Paste your public Shopify URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.