experience-lwc-widget-assess
FreeNo executable scriptsNot checkedAssess whether a specific Lightning web component can serve its user's purpose as an HXL declarative widget. Use for LWC-to-widget feasibility, portability…
by forcedotcom★ 1,200 GitHub starsAbout this skill
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
- 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
@apiproperty 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. - Map the job of each rendered element and action to the target surface.
platform-widget-generateexplains the discovery procedure; the actualdiscoverUiComponentsresponse andgetUiComponentSchemasresults establish available blocks and attributes. Read itsreferences/widget-formulas.mdonly 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. Usereviewwhen that uncertainty determines the verdict; never invent a tile, action, input submission mechanism, or formula. - 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;sendMessagealone does not prove that. - Judge the current LWC and a proposed widget separately. A link or
sendMessagemay 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 settingrendersAsWidget; state the contract change explicitly. If feasibility or purpose remains unresolved, usereview, 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:
{
"component": "caseDetailsPanel",
"role": "renderer",
"asIsVerdict": "port-declarative",
"contractChange": {"suggested": false, "shapeToAdd": []},
"asDisplayWidget": {"verdict": "viable", "rendersAsWidget": true, "stillServesPurpose": true, "isRebuild": false},
"needsHumanReview": false
}
role is
Install experience-lwc-widget-assess in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the experience-lwc-widget-assess skill do?
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.
How do I install the experience-lwc-widget-assess skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the experience-lwc-widget-assess skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic