/experience-lwc:experience-lwc-legacy-migratefrom Salesforce LWC
Verifies Aura-to-LWC conversion completeness and migrates Lightning Out Beta host pages to LO 2.0, including OAuth PKCE and web component upgrades.
Ships in Salesforce LWC. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Two distinct migration workflows live here because users in the middle of migrating Aura components are often also migrating Lightning Out host pages — they benefit from one skill that knows both.
| Migration | Use when | Reference |
|---|---|---|
| Aura → LWC completeness check | An Aura component was converted, verify nothing is lost | aura-to-lwc-completeness-checklist.md |
| Lightning Out Beta → LO 2.0 | Migrating an external host page off lightning.out.js | lightning-out-beta-to-2-migration.md |
$Lightning.use() / $Lightning.createComponent() calls
to the <lightning-out-application> web component pattern.If the user wants to build a brand-new LO 2.0 host page from scratch (no Beta code to migrate), the LO 2.0 system reference inside this skill is still the right source of truth — point them at it directly.
__tests__
(Jest) and __utam__ (UTAM) folders if they exist.Goal: rate an already-done Aura-to-LWC conversion across 12 dimensions and produce actionable recommendations.
Ask the user for the component name (e.g. accountTile). Locate the Aura
source ({componentName}.cmp, controller, helper, CSS) and the LWC output
({componentName}.html, .js, .css, .js-meta.xml).
Follow aura-to-lwc-completeness-checklist.md verbatim:
End with an overall confidence statement and a prioritized list of specific, actionable recommendations (what to fix, in what order).
Goal: transform a Lightning Out Beta host page into a Lightning Out 2.0 host page while leaving the customer's HTML structure, styling, and business logic intact.
Internalize the architecture before editing code: lightning-out-2-system-reference.md.
Key takeaway: LO 2.0 is not a library upgrade. It runs the LWC inside an iframe with a closed shadow DOM — host-page JS cannot touch the LWC and vice versa, and host-page CSS does not cascade in.
Use Phase 1 of the migration guide to locate:
lightning.out.js (extract the domain).$Lightning.use(...) call.$Lightning.createComponent(...) call.See lightning-out-beta-to-2-migration.md § Phase 1.
The script-tag URL, the component tag name, and the attribute names are deterministic conversions — derive them with the helper script so they are exact every time (namespace preserved, camelCase → kebab-case, Beta host → versioned LO 2.0 library URL):
python3 scripts/convert-lo-names.py \
--component c:myComponent \
--attributes recordId,ownerId \
--my-domain https://<DOMAIN>.lightning.force.com
It prints the <c-...> tag, the kebab-case attributes, and the versioned LO
2.0 library URL. Then work through Phase 2 of the guide:
library-url the script prints; add async.component-tag and kebab-case
attributes the script prints.<c-...> tag directly in HTML at the target
location (a judgement call — place it where the Beta render target was).$Lightning block — delete it entirely and start from
assets/lo20-host-page-template.html,
filling in the config constants; it already includes the helper functions,
mountLo20(frontdoorUrl, orgUrl), boot(), and the OAuth listeners.These rules cause silent runtime failures if violated, and every one is a deterministic code-structure check. Enforce them with the validator script rather than by eye — run it against the migrated page and fix every FAIL:
python3 scripts/validate-lo20-page.py <migrated-page.html>
It prints a PASS/FAIL line per rule (plus the LO 2.0 library and Beta-removal checks) and exits non-zero if any rule fails. The six rules it enforces:
customElements.whenDefined(...) must receive a literal string, not
the components variable.mountLo20(frontdoorUrl, orgUrl) must accept two parameters.clearCachedResult() before every mountLo20(...).mountLo20(...), even if
orgUrl is undefined.boot() and call boot() at the end.display:none — control visibility
via the loading indicator.External Client App (ECA) — Setup → App Manager → New Connected App → External Client App. Enable OAuth with PKCE. Copy the Consumer Key.
Lightning Out 2.0 App — apply this decision before continuing:
| Condition | Action |
|---|---|
Host page sets app-id="..." | Setup → Lightning Out → New LO App; copy the 18-character App ID into the host page's app-id attribute |
Host page embeds LWC directly (no app-id) | Skip the LO App entirely |
Helper files the migration assumes exist alongside the host page:
frontdoor-url.html (OAuth callback) and utils/LightningOutAuth.js
(PKCE implementation).
First run python3 scripts/validate-lo20-page.py <migrated-page.html> to clear
the mechanical checks, then walk the remaining manual items in the full
post-migration checklist — cover every item before declaring the migration
done. See the "Verification Checklist" section at the end of
lightning-out-beta-to-2-migration.md.
For Aura → LWC:
For LO Beta → LO 2.0:
.my.salesforce.com/lightning/lightning.out.latest/index.iife.prod.js with async.$Lightning.use / $Lightning.createComponent remain.mountLo20(frontdoorUrl, orgUrl) takes two parameters.customElements.whenDefined(...) uses a literal string.boot() and boot() is called once.display:none.app-id / frontdoor-url values are correct.assets/lo20-host-page-template.html (opens in a new tab)references/aura-to-lwc-completeness-checklist.md (opens in a new tab)references/lightning-out-2-system-reference.md (opens in a new tab)references/lightning-out-beta-to-2-migration.md (opens in a new tab)scripts/convert-lo-names.py (opens in a new tab)scripts/validate-lo20-page.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
salesforce, aura-to-lwc, lightning-out, migration, host-page
npx claudepluginhub forcedotcom/sf-skills --plugin experience-lwc3 plugins in 2 repositories ship this exact skill · first indexed Sep 23, 2026
14 skills in this plugin
/experience-accessibility-validateUse this skill to determine whether a Lightning Web Component (LWC) is accessible and meets WCAG accessibility guidelines. TRIGGER when the user asks "is my component accessible?", "does my LWC meet accessibility guidelines?", "is this component WCAG compliant?", "find accessibility problems in this LWC", "is this LWC keyboard accessible?", "does this component work with a screen reader?", "does this component have sufficient color contrast?", "check ARIA usage in this LWC", or "WCAG 2.2 accessibility check". Also TRIGGER when the user wants to fix or improve accessibility (a11y, WCAG, ARIA) in an LWC's HTML, JS, or CSS — semantic markup, focus, keyboard nav, contrast, screen-reader labels, WCAG 2.2 SC. Produces `a11y-review.md` with WCAG-cited findings. DO NOT TRIGGER for general LWC generation (use `experience-lwc-generate`) or SLDS visual/design review not focused on accessibility (use `design-systems-slds-validate`)./experience-aura-lwc-migrateUse this skill to analyze a Salesforce Aura component bundle (.cmp, .app, .evt, .intf, Controller.js, Helper.js, Renderer.js) and produce a framework-agnostic migration blueprint (PRD.yaml / PRD.md / PRD.json) capturing public API, data requirements, slots, events, states, accessibility, styling, localization, and security posture. This is Phase 1 (analysis + PRD) only — it does NOT author or edit component code, wire adapters, or Jest tests, and does not write .html/.js/.css/.js-meta.xml. TRIGGER when the user says "analyze this Aura component", "migrate Aura", "convert .cmp", "produce a migration blueprint", "generate a PRD for this Aura component", or mentions aura:attribute, aura:handler, force:recordData, $Label, $Resource, component.get, cmp.find, or an input directory containing .cmp files. DO NOT TRIGGER when there is no Aura source (delegate downstream LWC authoring to experience-lwc-generate), for post-migration scoring, or for refactoring an existing modern component./experience-lds-best-practices-applyUse when reviewing or implementing Lightning Data Service best practices in an LWC (.js, .html, .js-meta.xml) — UIAPI vs Apex, refreshApex / notifyRecordUpdateAvailable, @salesforce/schema imports, LDS record-form data patterns. TRIGGER on "apply LDS best practices to this LWC", "review this LWC for LDS best-practice issues", "review this component for Lightning Data Service issues", "UIAPI or Apex for this data?", "fix stale data after record save", "sync LDS cache", "use @salesforce/schema for field names", "choose between getRecord and Apex". DO NOT TRIGGER when building a new LWC (use experience-lwc-generate), applying SLDS design tokens (use design-systems-slds-apply), picking or wiring a `lightning-*` base component's props/events/slots generically (use experience-lwc-base-components-integrate — this skill covers only the LDS data-layer rationale, even when the fix involves a base record form), or for security / RTL / accessibility reviews (separate passes)./experience-lds-data-requirements-generateUse when a Lightning Web Component data need is described in ambiguous natural language — turn "get contact info" or "show account data" into a clear, PRD-ready data-requirements spec. TRIGGER when the user says "define data requirements for this LWC", "turn this PRD data section into validated object/field names", "recommend GraphQL vs UIAPI for this data need", "validate these Salesforce API names", or "spec out the LDS adapter for this component", or references LWC bundle files (`.js`, `.js-meta.xml`) whose data layer is not yet specified. DO NOT TRIGGER when the data layer is already fully specified, when authoring the actual query or adapter code from a known spec, or when implementing an LWC end-to-end (use experience-lwc-generate)./experience-lds-graphql-generateUse ALWAYS when a prompt mentions GraphQL, lightning/uiGraphQLApi, @wire(graphql, ...), or gql template tags in an LWC context — even if the surface ask is "build an LWC". Owns the ENTIRE flow: introspect the org's LDS GraphQL schema, identify entities/fields, construct the schema-validated gql query or mutation, wire it into the LWC via lightning/uiGraphQLApi, verify against a connected org. REQUIRED whenever a prompt asks to render, list, or edit Salesforce records (Account, Contact, Case, custom objects) via GraphQL — the .html and .js scaffolding IS in scope. DO NOT delegate to experience-lwc-generate: that skill has NO GraphQL schema introspection, NO create_lds_graphql_read_query binding, and defaults to getRecord/getRelatedListRecords wire adapters which will not satisfy a GraphQL prompt. DO NOT TRIGGER only if the prompt forbids GraphQL, chooses UIAPI/Apex (use experience-lds-best-practices-apply), or asks for data requirements (use experience-lds-data-requirements-generate)./experience-lwc-accessibility-jest-runUse ALWAYS when running Sa11y accessibility Jest tests for an LWC — locally before pushing, producing the command(s), running one file vs a suite, selecting tests by naming convention, saving Sa11y-rendered HTML, or reproducing a Sa11y/A11yBug failure. Covers core (Bazel; `bazel test //<module>:<target>`) and standalone `npx jest` (`.accessibility.test.js`, `@sa11y/jest`). REQUIRED for a `run-plan.md`, a failing a11y test's exit code, or `SA11Y_*`/`A11yBug`/core-Bazel test paths. DO NOT TRIGGER for functional Jest tests, a11y review without running tests (use experience-accessibility-validate), or Selenium-based a11y tests.Other plugins' skills for the same job