- Home
- Skills
- E-commerce
- Polaris React to Web Components Migration
Works with the AI Agents you already use
Polaris React to Web Components Migration
Move a Shopify app off Polaris React to Polaris web components slice by slice, with an inventory script, docs-checked mappings, app-shell swaps and proof nothing broke.
$5
Polaris React to Web Components Migration
Example session with this skill installed
Run an inventory of my Shopify app's Polaris React usage and then migrate the Settings page (src/pages/Settings.tsx) to Polaris web components.
- Read your context and instructions
- Compiled the polaris react to
I have completed the inventory and migrated the Settings page. The inventory found 12 files importing Polaris React. After this slice the count is 11. Behavior is unchanged: the same two fields, the same save and discard actions.
Migration Report: Settings
| Polaris React | Replacement | Status |
|---|---|---|
Page | <s-page> | Converted |
Card | <s-section> | Converted |
TextField | <s-text-field> | Converted |
Select | <s-select> + <s-option> | Converted, wired to state |
ContextualSaveBar | <form data-save-bar> | Replaced. The bar supplies Save and Discard |
Toast | shopify.toast.show | Swapped to App Bridge |
Frame | removed | No wrapper replacement |
import { useState } from "react";
const initial = { name: "Store Owner", language: "en" };
export function Settings() {
const [name, setName] = useState(initial.name);
const [language, setLanguage] = useState(initial.language);
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault();
await saveSettings({ name, language });
shopify.toast.show("Settings saved");
}
function handleReset() {
setName(initial.name);
setLanguage(initial.language);
}
return (
<s-page heading="Settings">
<form data-save-bar onSubmit={handleSubmit} onReset={handleReset}>
<s-section>
<s-text-field
label="Name"
value={name}
onInput={(e: React.FormEvent<HTMLInputElement>) => setName(e.currentTarget.value)}
/>
<s-select
label="Language"
value={language}
onChange={(e: React.FormEvent<HTMLSelectElement>) => setLanguage(e.currentTarget.value)}
>
<s-option value="en">English</s-option>
<s-option value="fr">French</s-option>
</s-select>
</s-section>
</form>
</s-page>
);
}
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Polaris React is being replaced by Polaris web components. Converting a whole app at once is risky, and it is easy to break the app shell (Frame, Toast, save bar) without noticing.
What it does
- Counts every Polaris React component in your app with a script you can re-run to show progress
- Converts one page or feature at a time, checking each component against Shopify's migration guide
- Replaces Frame, Toast, Loading, ContextualSaveBar and Navigation
- Warns about styling that stops working inside web components
- Verifies each slice and removes the old package only when nothing imports it
Why not just prompt your agent?
Agents guess tag names and properties. This skill makes the agent read the official guide for each component, one slice at a time, and report the numbers before and after.
Works with
Embedded Shopify apps built with React. The included inventory script needs Node 18 or newer.
Test prompts
- Migrate the settings page to Polaris web components.
- How much of our app is still on Polaris React?
- Replace our Toast and ContextualSaveBar usage.
- Remove @shopify/polaris from the project.
Safety
The script is read-only and offline. The agent asks before installing or removing packages.
Where it stops
It does not cover Shopify-hosted UI extensions, and it cannot test inside the Shopify admin for you.
Some components have no direct replacement, so the agent picks one and explains it. The inventory script counts imports from @shopify/polaris in script and style files; components used through your own wrapper files count only where the wrapper imports them. It cannot test inside the Shopify admin, so you check each slice in a development store. Mappings depend on Shopify's current migration guides, which the agent reads. Needs Node 18+. Review all changes. Not affiliated with or endorsed by Shopify.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
Permissions
What's inside
Frequently Asked Questions
New in E-commerce
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for E-commerce.