forcedotcom/sf-skills

experience-lwc-widget-assess

Assess whether a specific Lightning web component can serve its user's purpose as an HXL declarative widget.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-widget-assess

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 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

  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:

OutcomeMeaning
asIsVerdict: port-declarativeCurrent visible behavior and data contract can be represented.
asIsVerdict: needs-IA-contract-changeOnly a bounded output or pre-shaping change is needed.
asIsVerdict: not-portableSome current behavior or visual has no verified equivalent.
asIsVerdict: reviewEvidence cannot establish the current fit.
asDisplayWidget.verdict: viableA verified or clearly identified candidate serves the goal, possibly after a stated contract change or rebuild.
asDisplayWidget.verdict: pointlessIt can render but loses the user's goal.
asDisplayWidget.verdict: blockedThe proposed display/action cannot be represented.
asDisplayWidget.verdict: reviewCapability, 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.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
forcedotcom
커뮤니티

design-systems-slds-apply

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include \"build a modal\", \"create a form\", \"data table\", \"SLDS styling\", \"style with hooks\", \"add an icon\".

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

dx-code-analyzer-run

Run Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations. Supports all engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru), targets (files, folders, git diff), categories, and severities. Also handles post-scan exploration: filtering results by engine/severity/category/file, and explaining what rules mean. TRIGGER when: user says 'scan my code', 'check security issues', 'run PMD/ESLint', 'find duplicates', 'analyze Flows', 'check vulner

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

experience-lwc-accessibility-jest-run

Use 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 // : ) 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, a11

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

experience-lwc-generate

Lightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc//.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use platform-apex-generate), Aura components, or Visualforce.

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일