Logo de Experience Lwc Legacy Migrate

Experience Lwc Legacy Migrate

OrganizaçãoPopular
forcedotcom
experience-lwc-legacy-migrate

Migre interfaces Salesforce legadas para a plataforma LWC moderna — verificação da conclusão da conversão de Aura → LWC e migração da página hospedeira do Lightning Out Beta → Lightning Out 2.0. ACIONE com pedidos como "verifique se a migração de Aura para LWC foi concluída", "migre Lightning Out Beta para LO 2.0", "atualize $Lightning.use() para <lightning-out-application>", "substitua tokens LO codificados diretamente por OAuth PKCE", "escreva uma página hospedeira do LO 2.0" ou quando uma página Lightning Out externa parar de renderizar; também com arquivos `.cmp`/`.js-meta.xml` junto com LWC. NÃO ACIONE para a conversão inicial de Aura para LWC (use `experience-aura-lwc-migrate`), uma migração de React para LWC ou a criação de um novo LWC (use `experience-lwc-design-generate`).

Add to TypingMind

Visão geral

Publicado porforcedotcom
Repositóriosf-skills
Nome da habilidadeexperience-lwc-legacy-migrate
Estrelas
1.1K
Forks
351
Arquivos incluídos
6
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 6

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por forcedotcom no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Experience Lwc Legacy Migrate no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/experience-lwc/skills/experience-lwc-legacy-migrate
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/forcedotcom/sf-skills.git /tmp/sf-skills
mkdir -p .claude/skills
cp -r /tmp/sf-skills/plugins/builder/experience-lwc/skills/experience-lwc-legacy-migrate .claude/skills/experience-lwc-legacy-migrate
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Experience Lwc Legacy Migrate em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Experience Lwc Legacy Migrate automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Experience Lwc Legacy Migrate não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

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.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Experience Lwc Legacy Migrate faz?

Migre interfaces Salesforce legadas para a plataforma LWC moderna — verificação da conclusão da conversão de Aura → LWC e migração da página hospedeira do Lightning Out Beta → Lightning Out 2.0. ACIONE com pedidos como "verifique se a migração de Aura para LWC foi concluída", "migre Lightning Out Beta para LO 2.0", "atualize $Lightning.use() para <lightning-out-application>", "substitua tokens LO codificados diretamente por OAuth PKCE", "escreva uma página hospedeira do LO 2.0" ou quando uma página Lightning Out externa parar de renderizar; também com arquivos `.cmp`/`.js-meta.xml` junto co...

Por que usar Experience Lwc Legacy Migrate no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Experience Lwc Legacy Migrate é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Experience Lwc Legacy Migrate no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/experience-lwc/skills/experience-lwc-legacy-migrate. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Experience Lwc Legacy Migrate?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Experience Lwc Legacy Migrate?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Experience Lwc Legacy Migrate com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Experience Lwc Legacy Migrate é gratuita?

Sim. A habilidade é publicada no GitHub por forcedotcom sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇