Agent skill

Experience Lwc Legacy Migrate

by forcedotcom in forcedotcom/sf-skills

Migrate legacy Salesforce UI stacks onto modern LWC — Aura → LWC conversion completeness verification and Lightning Out Beta → Lightning Out 2.0 host-page migration.

Apache-2.0Auto-check passedSales & Support

Install Experience Lwc Legacy Migrate

skills CLI
$ npx skills add forcedotcom/sf-skills --skill experience-lwc-legacy-migrate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills experience-lwc-legacy-migrate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/experience-lwc-legacy-migrate .claude/skills/experience-lwc-legacy-migrate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
experience-lwc-legacy-migrate
GitHub stars
1.1k
Token cost
~2.6k tokens
SKILL.md length
1,097 words
Files
7 (incl. scripts, references, assets)
Skills in repo
251
Repo updated
First seen
Licence
Apache-2.0

At a glance

Migrate legacy Salesforce UI stacks onto modern LWC — Aura → LWC conversion completeness verification and Lightning Out Beta → Lightning Out 2.0 host-page migration.

  • Works in 4 steps: Script tag — use the library-url the… → Component name / attributes — use the… → Component tag — add the tag directly in… → …
  • Verify Aura to LWC migration completeness
  • SKILL.md covers When to Use This Skill, Prerequisites, Workflow A — Aura → LWC… and Workflow B — Lightning Out…, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Experience Lwc Legacy Migrate is an agent skill from forcedotcom/sf-skills. Migrate legacy Salesforce UI stacks onto modern LWC — Aura → LWC conversion completeness verification and Lightning Out Beta → Lightning Out 2.0 host-page migration. TRIGGER on "verify Aura to LWC migration completeness", "migrate Lightning Out Beta to LO 2.0", "upgrade $Lightning.use() to <lightning-out-application", "replace hardcoded LO tokens with OAuth PKCE", "write an LO 2.0 host page", or an external Lightning Out page that stopped rendering; also .cmp/.js-meta.xml files alongside LWC. DO NOT TRIGGER for…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts, reference files and assets (for example `references/aura-to-lwc-completeness-checklist.md`, `references/lightning-out-2-system-reference.md` and `references/lightning-out-beta-to-2-migration.md`).

It sits in Sales & Support, covering OAuth and OpenID Connect and CRM management. It works with Salesforce and React. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Verify Aura to LWC migration completeness
  • Migrate Lightning Out Beta to LO 2.0
  • Upgrade $Lightning.use() to <lightning-out-application
  • Replace hardcoded LO tokens with OAuth PKCE

Example prompts

  • “verify Aura to LWC migration completeness”
  • “migrate Lightning Out Beta to LO 2.0”
  • “upgrade $Lightning.use() to <lightning-out-application”
  • “/experience-lwc-legacy-migrate”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Script tag — use the library-url the script prints; add async.
  2. Component name / attributes — use the component-tag and kebab-case
  3. Component tag — add the tag directly in HTML at the target
  4. Replace the $Lightning block — delete it entirely and start from

What it can do on your machine

Read from SKILL.md and the folder at commit e5164d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Experience Lwc Legacy Migrate loads about 2.6k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 177 tokens; SKILL.md has 1,097 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~177
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~17k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit e5164d9, republished under its Apache-2.0 licence (© forcedotcom). 1,097 words, ~2,557 tokens.

Download SKILL.mdSave it as .claude/skills/experience-lwc-legacy-migrate/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
experience-lwc-legacy-migrate
description
Migrate legacy Salesforce UI stacks onto modern LWC — Aura → LWC conversion completeness verification and Lightning Out Beta → Lightning Out 2.0 host-page migration. TRIGGER on "verify Aura to LWC migration completeness", "migrate Lightning Out Beta to LO 2.0", "upgrade $Lightning.use() to <lightning-out-application>", "replace hardcoded LO tokens with OAuth PKCE", "write an LO 2.0 host page", or an external Lightning Out page that stopped rendering; also `.cmp`/`.js-meta.xml` files alongside LWC. DO NOT TRIGGER for the initial Aura-to-LWC conversion (use experience-aura-lwc-migrate), a React-to-LWC migration, or building a new LWC (use experience-lwc-design-generate).
metadata.version
1.0
metadata.domains
Experience
metadata.relatedSkills
experience-aura-lwc-migrate, experience-lwc-design-generate
<!-- adk-managed-skill -->

Migrating Legacy LWC Stacks

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.

MigrationUse whenReference
Aura → LWC completeness checkAn Aura component was converted, verify nothing is lostaura-to-lwc-completeness-checklist.md
Lightning Out Beta → LO 2.0Migrating an external host page off lightning.out.jslightning-out-beta-to-2-migration.md

When to Use This Skill

  • User has already converted an Aura component to LWC and wants a structured completeness check.
  • User has a non-Salesforce host page that embeds Salesforce LWC via Lightning Out Beta and needs to move to LO 2.0.
  • User is upgrading $Lightning.use() / $Lightning.createComponent() calls to the <lightning-out-application> web component pattern.
  • User needs to replace a hardcoded LO auth token with OAuth PKCE + front-door flow.

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.

Prerequisites

  • Access to the source (Aura component files or Beta host page).
  • For LO 2.0 migration: ability to create an External Client App (ECA) in Salesforce Setup (Consumer Key required) and optionally a Lightning Out 2.0 App (18-char App ID).
  • For Aura migration: access to the LWC conversion, including any __tests__ (Jest) and __utam__ (UTAM) folders if they exist.

Workflow A — Aura → LWC Completeness Check

Goal: rate an already-done Aura-to-LWC conversion across 12 dimensions and produce actionable recommendations.

Step A1 — Identify the component

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).

Step A2 — Run the checklist

Follow aura-to-lwc-completeness-checklist.md verbatim:

  • Score the conversion on all 12 metrics (Functional Parity, Event Handling, Data Binding & State, UI/UX Parity, Extensibility & Modularity, Error Handling, Localization, Security & Access Control, Performance, Salesforce Best Practices, Jest Test Coverage, UTAM Page Objects).
  • Use the six-rating scale: Excellent / Good / Satisfactory / Limited / Poor / Missing.
  • Present the output as a list (not a table), per the reference.
Step A3 — Summarize + recommend

End with an overall confidence statement and a prioritized list of specific, actionable recommendations (what to fix, in what order).

Workflow B — Lightning Out Beta → LO 2.0

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.

Step B1 — Read the LO 2.0 mental model

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.

Step B2 — Identify Beta patterns

Use Phase 1 of the migration guide to locate:

  • Pattern A — Script tag loading lightning.out.js (extract the domain).
  • Pattern B — Config variables (endpoint, Aura app, component, token).
  • Pattern C — $Lightning.use(...) call.
  • Pattern D — $Lightning.createComponent(...) call.
  • Pattern E — DOM target element referenced by the 3rd arg of Pattern D.

See lightning-out-beta-to-2-migration.md § Phase 1.

Step B3 — Apply transformations

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):

bash
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:

  1. Script tag — use the library-url the script prints; add async.
  2. Component name / attributes — use the component-tag and kebab-case attributes the script prints.
  3. Component tag — add the <c-...> tag directly in HTML at the target location (a judgement call — place it where the Beta render target was).
  4. Replace the $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.
Show full SKILL.md (444 more words)Show less
Step B4 — Six non-negotiable rules

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:

bash
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:

  1. customElements.whenDefined(...) must receive a literal string, not the components variable.
  2. mountLo20(frontdoorUrl, orgUrl) must accept two parameters.
  3. Call clearCachedResult() before every mountLo20(...).
  4. Always pass both parameters when calling mountLo20(...), even if orgUrl is undefined.
  5. Wrap all initialization in boot() and call boot() at the end.
  6. The component tag has no inline display:none — control visibility via the loading indicator.
Step B5 — Salesforce setup
  • 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:

    ConditionAction
    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).

Step B6 — Run the LO 2.0 verification checklist

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.

Verification Checklist (high level)

For Aura → LWC:

  • All 12 completeness metrics rated with a justification.
  • Output in list form (not table), per the reference.
  • Overall confidence statement present.
  • Concrete, prioritized recommendations listed.

For LO Beta → LO 2.0:

  • Script tag uses .my.salesforce.com/lightning/lightning.out.latest/index.iife.prod.js with async.
  • No references to $Lightning.use / $Lightning.createComponent remain.
  • Component name is kebab-case; attributes are kebab-case.
  • mountLo20(frontdoorUrl, orgUrl) takes two parameters.
  • customElements.whenDefined(...) uses a literal string.
  • All initialization wrapped in boot() and boot() is called once.
  • OAuth PKCE flow replaces hardcoded token; postMessage, BroadcastChannel, and storage listeners all present and defensively coded.
  • Component tag has no inline display:none.

Troubleshooting

  • LO 2.0 mount hangs — custom element not registered. Verify the library script tag URL and that the app-id / frontdoor-url values are correct.
  • Component renders empty — attributes probably still in camelCase. LO 2.0 reads HTML attributes which must be kebab-case.
  • OAuth callback never fires — one of postMessage / BroadcastChannel / storage listeners was dropped. LO 2.0 needs all three.
  • Aura checklist scored "Missing" on UTAM or Jest — may be acceptable if the team has an alternative test strategy; flag in recommendations rather than block.

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references, assets) in skills/experience-lwc-legacy-migrate of forcedotcom/sf-skills.

  • SKILL.md
  • assets/lo20-host-page-template.html
  • references/aura-to-lwc-completeness-checklist.md
  • references/lightning-out-2-system-reference.md
  • references/lightning-out-beta-to-2-migration.md
  • scripts/convert-lo-names.py
  • scripts/validate-lo20-page.py

Open the folder on GitHubat commit e5164d9

Compare with similar skills

Experience Lwc Legacy Migrate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Experience Lwc Legacy Migrate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Experience Lwc Legacy Migrate this skillforcedotcom/sf-skills1.1k—~2.6kAutomated safety check: PassApache-2.0
Sf IntegrationJaganpro/sf-skills424—~1.5kAutomated safety check: PassMIT
Implementing Zero Trust For SaaS Applicationsmukul975/Anthropic-Cybersecurity-Skills34k—~2.9kAutomated safety check: PassApache-2.0
Gh Bot Commentjetstreamapp/jetstream126—~616Automated safety check: PassCustom licence
Sf Connected AppsJaganpro/sf-skills424—~1.9kAutomated safety check: NotesMIT
Hunt Sqlielementalsouls/Claude-BugHunter4.8k—~5.5kAutomated safety check: PassMIT

Similar skills

  • Sf Integration

    Jaganpro/sf-skills

    Salesforce integration architecture with 120-point scoring. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~1.5k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed
  • Implementing Zero Trust For SaaS Applications

    mukul975/Anthropic-Cybersecurity-Skills

    Secures SaaS apps (Microsoft 365, Google Workspace, Salesforce, Slack) via CASB/SSPM deployment, conditional access policies, OAuth app governance, and session-level DLP controls enforcing identity…

    34k GitHub stars~2.9k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Gh Bot Comment

    jetstreamapp/jetstream

    Post GitHub PR/issue comments, reviews, and review replies as the Jetstream bot account instead of the user's personal account.

    126 GitHub stars~616 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Sf Connected Apps

    Jaganpro/sf-skills

    Salesforce Connected Apps and OAuth configuration with 120-point scoring.

    424 GitHub stars~1.9k tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Hunt Sqli

    elementalsouls/Claude-BugHunter

    Hunting skill for sqli vulnerabilities. An agent skill from elementalsouls/Claude-BugHunter.

    4.8k GitHub stars~5.5k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Databricks Lakeflow Connect

    databricks/databricks-agent-skills

    Official

    Build managed ingestion pipelines into Databricks using Lakeflow Connect.

    345 GitHub stars~3.8k tokensUpdated yesterday
    Sales & SupportAuto-check passed

More from forcedotcom/sf-skills

All 251 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated 2 days ago
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Experience Lwc Legacy Migrate

What does Experience Lwc Legacy Migrate do?

Migrate legacy Salesforce UI stacks onto modern LWC — Aura → LWC conversion completeness verification and Lightning Out Beta → Lightning Out 2.0 host-page migration. Experience Lwc Legacy Migrate is an agent skill from forcedotcom/sf-skills.0 host-page migration.

When should I use Experience Lwc Legacy Migrate?

Experience Lwc Legacy Migrate fits situations like: verify Aura to LWC migration completeness; migrate Lightning Out Beta to LO 2.0; upgrade $Lightning.use() to <lightning-out-application; replace hardcoded LO tokens with OAuth PKCE.

How do I install Experience Lwc Legacy Migrate in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill experience-lwc-legacy-migrate -a claude-code`. Or copy the skill folder (skills/experience-lwc-legacy-migrate in forcedotcom/sf-skills) into .claude/skills/experience-lwc-legacy-migrate in your project. Claude Code loads it when a task matches its description.

How do I install Experience Lwc Legacy Migrate in Codex?

Run `npx skills add forcedotcom/sf-skills --skill experience-lwc-legacy-migrate -a codex`. Or copy the skill folder (skills/experience-lwc-legacy-migrate in forcedotcom/sf-skills) into .agents/skills/experience-lwc-legacy-migrate in your project. Codex loads it when a task matches its description.

Can I use Experience Lwc Legacy Migrate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill experience-lwc-legacy-migrate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/experience-lwc-legacy-migrate, .gemini/skills/experience-lwc-legacy-migrate, .github/skills/experience-lwc-legacy-migrate and .opencode/skills/experience-lwc-legacy-migrate in your project.

What does Experience Lwc Legacy Migrate need to run?

Going by SKILL.md and its folder, Experience Lwc Legacy Migrate needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Experience Lwc Legacy Migrate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Experience Lwc Legacy Migrate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Experience Lwc Legacy Migrate use?

Experience Lwc Legacy Migrate is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Experience Lwc Legacy Migrate use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Experience Lwc Legacy Migrate?

Skills that share tags, products or a category with Experience Lwc Legacy Migrate: Sf Integration (Jaganpro/sf-skills, 424 stars), Implementing Zero Trust For SaaS Applications (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Gh Bot Comment (jetstreamapp/jetstream, 126 stars) and Sf Connected Apps (Jaganpro/sf-skills, 424 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Experience Lwc Legacy Migrate?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,065 GitHub stars. The repository holds 251 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.