К основному содержанию
скилл CX Codex

experience-lwc-widget-assess — скилл для Claude Code

Скилл experience-lwc-widget-assess для Claude Code оценивает, можно ли представить Lightning Web Component как декларативный виджет HXL.

Apache-2.0 129 установок ★ 1 183 обновлён 2026-10-23

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add forcedotcom/sf-skills --skill experience-lwc-widget-assess -a claude-code
Открыть на GitHub

Что делает experience-lwc-widget-assess

Скилл анализирует JavaScript или TypeScript компонента, шаблон, метаданные и связанные дочерние компоненты. Он сопоставляет видимые элементы и действия с доступными блоками виджета, прослеживает источники данных и проверяет состояние, взаимодействия и преобразования. Результат — JSON-вердикт для миграционного скилла и отчёт для проверки человеком.

Оценка различает перенос без изменений, необходимость поменять контракт, неподдерживаемое поведение и случаи, где не хватает свидетельств. Текущий компонент и возможный виджет оцениваются отдельно; если интерфейс меняется, отчёт отмечает потерянное взаимодействие. Скилл не создаёт метаданные. Для выводов о доступных блоках нужны результаты discoverUiComponents и getUiComponentSchemas; контракт действия проверяется по его реализации.

Какие задачи решает

  • оценить переносимость Lightning Web Component в виджет HXL
  • найти взаимодействия компонента без подтверждённого аналога в виджете
  • проверить, сохраняет ли перестроенный виджет цель компонента
  • подготовить вердикт и отчёт для миграции компонента

Примеры запросов агенту

  • Оцени, можно ли перенести caseDetailsPanel в декларативный виджет HXL.
  • Проведи аудит переносимости Lightning Web Component и перечисли блокеры с подтверждениями.
  • Сравни текущее поведение компонента с вариантом виджета и подготовь вердикт для миграции.

Как установить experience-lwc-widget-assess

1Через Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill experience-lwc-widget-assess -a claude-code

2Вручную: положить файлы

~/.claude/skills/experience-lwc-widget-assess/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/experience-lwc-widget-assess/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об experience-lwc-widget-assess

Как установить experience-lwc-widget-assess в Claude Code?

Выполни npx skills add forcedotcom/sf-skills --skill experience-lwc-widget-assess -a claude-code. Файл скилла находится по пути ~/.claude/skills/experience-lwc-widget-assess/SKILL.md.

Что делает experience-lwc-widget-assess?

Он оценивает, можно ли представить поведение Lightning Web Component декларативным виджетом HXL, и отдельно проверяет, сохранит ли возможная перестройка цель компонента. На выходе формирует JSON-вердикт и отчёт.

Какие данные нужны для оценки виджета HXL?

Скиллу нужны исходники компонента, его шаблон и метаданные, а также результаты discoverUiComponents и getUiComponentSchemas, чтобы подтвердить доступные блоки и их атрибуты. Контракт действия нужно сверять с его реализацией.

Исходный текст

SKILL.md · Apache-2.0
---
name: experience-lwc-widget-assess
description: "Assess whether a specific Lightning web component can serve its user's purpose as an HXL declarative widget. Use for LWC-to-widget feasibility, portability audits, and candidate screening; use experience-lwc-widget-migrate when the user wants the widget built."
metadata:
  version: "1.0"
  domains: ["Experience", "Platform", "Agentforce"]
  minApiVersion: "68.0"
  relatedSkills:
    - "experience-lwc-widget-migrate"
    - "platform-widget-generate"
---

# Assess LWC to widget fit

Answer two questions for each LWC: **Can the current behavior be represented?** If not, **would a feasible widget still accomplish the user's goal?** Assess only; do not create metadata. A widget is its own declarative artifact, distinct from a Lightning Type. Its body renders supplied data with discovered tiles, bindings, formulas, and supported actions. It cannot run arbitrary LWC code, fetch after render, or retain reactive client state.

## Evidence and decision

1. Read the component's JS/TS, template, metadata, and relevant child components. State the user's goal in one sentence. Trace each visible value to its source and identify interactions essential to that goal. An `@api` property proves external input, **not** that an invocable action returns it. A user's explicit statement about action output is evidence for a feasibility assessment; verify the actual action contract and Lightning Type/renderer wiring before claiming a working migration.
2. Map the **job** of each rendered element and action to the target surface. `platform-widget-generate` explains the discovery procedure; the actual `discoverUiComponents` response and `getUiComponentSchemas` results establish available blocks and attributes. Read its `references/widget-formulas.md` only when a transformation matters. Record the target channel from evidence rather than assuming a fixed channel or tile count. Without discovery, a documented pattern can support a **provisional candidate**, but absence from examples does not prove a block is unavailable. Use `review` when that uncertainty determines the verdict; never invent a tile, action, input submission mechanism, or formula.
3. Check all dimensions, even after a failure: rendering vocabulary; retained state, imperative effects, and actions; data origin; and transformations. A bounded snapshot or pre-shaped collection can sometimes move into the invocable action's output. Inspect the action implementation before asserting that it can. A formula's scalar `MIN`/`MAX`, date, or regex support does not imply collection sorting or aggregation. Input forms require evidence that the current tiles can collect values **and** pass those values to an action; `sendMessage` alone does not prove that.
4. Judge the current LWC and a proposed widget separately. A link or `sendMessage` may preserve an intent without preserving the original interaction, if the agent can actually perform the requested work with the required context. A carousel may become a product list; an order builder whose purpose is choosing quantities may not. Treat that change as a rebuild. For the widget candidate, consider a **specified proposed IA contract** when setting `rendersAsWidget`; state the contract change explicitly. If feasibility or purpose remains unresolved, use `review`, not a forced yes/no verdict.

Use these outcomes:

| Outcome | Meaning |
|---|---|
| `asIsVerdict: port-declarative` | Current visible behavior and data contract can be represented. |
| `asIsVerdict: needs-IA-contract-change` | Only a bounded output or pre-shaping change is needed. |
| `asIsVerdict: not-portable` | Some current behavior or visual has no verified equivalent. |
| `asIsVerdict: review` | Evidence cannot establish the current fit. |
| `asDisplayWidget.verdict: viable` | A verified or clearly identified candidate serves the goal, possibly after a stated contract change or rebuild. |
| `asDisplayWidget.verdict: pointless` | It can render but loses the user's goal. |
| `asDisplayWidget.verdict: blocked` | The proposed display/action cannot be represented. |
| `asDisplayWidget.verdict: review` | Capability, data provenance, or purpose is unresolved. |

List **every material blocker** in the report with its gate and evidence, citing a source location or concrete behavior. Gate names are `role`, `rendering vocabulary`, `behavior/interactivity`, `data source`, and `transformation`. Do not stop at the first failed dimension. `contractChange.shapeToAdd` names only fields or pre-shaped values the action could plausibly return; never invent a payload. A viable adaptation may need a contract change even when the current LWC is `not-portable`. If a proposed widget changes the UX, set `isRebuild: true` and name the lost interaction in the report. Mark uncertain conclusions low confidence and explain what would resolve them.

## Output

Produce two artifacts. When an output location is given, write them as `verdict.json` and `report.md`.

**Verdict** — the machine-readable decision that `experience-lwc-widget-migrate` gates on. One JSON object per component; for a folder, an array. Keep exactly these fields:

```json
{
  "component": "caseDetailsPanel",
  "role": "renderer",
  "asIsVerdict": "port-declarative",
  "contractChange": {"suggested": false, "shapeToAdd": []},
  "asDisplayWidget": {"verdict": "viable", "rendersAsWidget": true, "stillServesPurpose": true, "isRebuild": false},
  "needsHumanReview": false
}
```

`role` is `renderer`, `input`, or `interactive`. `stillServesPurpose` is boolean or `"unknown"`; `rendersAsWidget` is boolean or `null` when capability is unresolved. For `viable`, both are true. For `pointless`, rendering is true and purpose false. For `blocked`, rendering is false and purpose is `"unknown"`. For `review`, keep unresolved fields unknown/null. Set `needsHumanReview: true` for either `review` verdict or unknown purpose. Suggest a contract change only when a value the widget displays is **not** already in the action's output (for example, it is fetched after render). Data already in the payload needs no contract change, even when the LWC is `not-portable` or the widget is a rebuild. Any suggested contract change needs a nonempty `shapeToAdd`; `needs-IA-contract-change` requires such a suggestion. `port-declarative` has no contract change.

**Report** — the human-review document. For a folder, one section per component. Use this structure:

```markdown
# <component>: <one-line conclusion>

**Verdict:** <asIsVerdict> → <asDisplayWidget.verdict> (rebuild or not) · **Confidence:** high | low · **Needs human review:** yes | no

## Why
The user's goal, what maps cleanly, and what decides the verdict.

## Blockers
Each material blocker: gate, signal, evidence. "None" for `port-declarative`.

## Suggested contract change
Each field to add and why it must move into the action output. Omit when none is suggested.

## What the widget keeps / drops
Kept actions and dropped or replaced interactions.

## Open questions
What would resolve any low-confidence conclusion.
```

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
lwc официальный github Правило lwc задаёт стандарты разработки Lightning Web Components для Salesforce: файловую структуру, замену HTML на компоненты SLDS и правила реактивности. CX Codex +1 ★ 41 430звёзд репо Salesforce UI Development (Aura & LWC) официальный github Субагент Salesforce UI Development (Aura & LWC) для GitHub Copilot собирает компоненты LWC и Aura при разработке интерфейса Salesforce, учитывая доступность и SLDS. CX Codex +1 ★ 41 430звёзд репо isolet-widget-isolation reason-machines Скилл isolet-widget-isolation для Claude Code и ещё пяти платформ учит агента упаковывать компоненты в самодостаточные виджеты через isolet-js. Компонент получает shadow DOM, область видимости стилей и сборку в IIFE, ESM или CommonJS. CX Codex +1 481установок three.ws Assistant Widget nirholas MCP-сервер three.ws Assistant Widget генерирует готовый код вставки 3D-аватара для сайта прямо в чате с моделью. Помогает настроить плавающий виджет чат-бота без ручной сборки параметров. CX Codex +1 ★ 284звёзд репо assess-react-native-migration callstackincubator Скилл assess-react-native-migration разбирает продуктовые репозитории и решает, стоит ли переносить мобильное приложение на React Native — до того, как начнётся код. CX Codex +1 2 700установок flutter-add-widget-test flutter Скилл flutter-add-widget-test для Claude Code помогает писать тесты Flutter-виджетов: проверять отображение, состояние и реакцию на действия. Включается при проверке конкретного виджета. CX Codex +1 42 900установок

Из того же набора232

Весь набор →
education-cloud-student-recruitment-agent-configure Скилл education-cloud-student-recruitment-agent-configure для Claude Code настраивает Student Recruitment Agent в Salesforce Education Cloud для приёмной комиссии, записи на экскурсии и подачи заявок. CX Codex +1 141установок service-omni-channel-setup-coordinate Скилл service-omni-channel-setup-coordinate автоматизирует развёртывание Omni-Channel на Salesforce: создаёт агентов, очереди, каналы, маршруты и права, проверяет, что уже есть, и ставит только недостающее. CX Codex +1 140установок service-agentforce-human-escalation-configure Скилл service-agentforce-human-escalation-configure для Claude Code настраивает передачу диалога Agentforce оператору через Omni-Channel и проверяет результат. Настраивает ручную эскалацию с очередью и порогом сбоев. CX Codex +1 135установок service-omni-command-center-analyze Скилл service-omni-command-center-analyze для Claude Code анализирует, выбрать ли Command Center V2 или классический Omni Supervisor, и рекомендует следующий шаг без изменений в организации. CX Codex +1 132установок life-sciences-fieldsalesrep-coordinate Скилл life-sciences-fieldsalesrep-coordinate запускает все пять этапов настройки Life Sciences Cloud для торгового представителя подряд, с проверкой перед каждым следующим шагом. CX Codex +1 128установок experience-lwc-widget-migrate Скилл experience-lwc-widget-migrate для Claude Code переносит существующий Lightning Web Component (LWC) в декларативный виджет HXL / Agentforce. Запускается по запросу переделать конкретный LWC в виджет. CX Codex +1 126установок education-cloud-academic-calendar-generate Скилл education-cloud-academic-calendar-generate для Claude Code создаёт в Education Cloud учебный год, семестры и другие периоды, а также сессии по датам из текста или документа. Настраивает календарь учебного заведения. CX Codex +1 124установок life-sciences-kam-coordinate Скилл life-sciences-kam-coordinate для Claude Code пошагово настраивает Life Sciences Cloud в выбранной Salesforce org для роли Key Account Management (KAM). CX Codex +1 123установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой