Skip to content
SalesforceSkills

Quality Review

Audits your components and gives you a score with specific things to fix. Like a code review checklist, automated.

Skill Details

Install this skill

Versionv1.1.0AuthorJorge ArteagaLicenseMITSections9

Works with

Claude CodeCursorWindsurf

Review and score existing Lightning Web Components against the full UI/UX design skills suite. This skill is the enforcement mechanism — it turns design guidelines into actionable feedback.

When to Run

  • Before deploying a new LWC component
  • When refactoring existing components
  • During code review of LWC pull requests
  • When the user asks to "review", "audit", "check", or "score" a component
  • Periodically across an LWC directory to measure design debt
  • Before a demo or PoC presentation (use Demo Readiness mode)

Audit Process

Step 1: Identify Files

Read the component bundle: .js, .html, .css, and .js-meta.xml.

Step 2: Run Three Scoring Passes

Step 3: Generate Report

Code
Component: c-account-card
Total Score: 215 / 300

  Design:  78 / 100  ■■■■■■■■░░
  UX:      72 / 100  ■■■■■■■░░░
  Styling: 65 / 100  ■■■■■■░░░░

Issues Found: 12
  Critical (must fix): 3
  Warning (should fix): 5
  Info (nice to have): 4

Design Pass Checklist (100 Points)

SLDS 2 Hook Usage (25 pts)

Scan .css file for:

Flag pattern: Any CSS property with a hardcoded value that has a --slds-g- equivalent.

Theme-Safe Styling (20 pts)

These checks ensure the component works in light mode (default) and won't break if dark mode is enabled later.

Migration Compliance (15 pts)

Component Structure (15 pts)

Color Semantics (15 pts)

Typography & Spacing (10 pts)

UX Pass Checklist (100 Points)

State Management (20 pts)

Accessibility (25 pts)

Layout Quality (15 pts)

Interaction Design (15 pts)

Component Composition (15 pts)

Responsive (10 pts)

Styling Pass Checklist (100 Points)

SLDS Hook Usage (25 pts)

Same checks as Design pass — reinforces zero tolerance for hardcoded values.

Utility Class Quality (20 pts)

Composition (20 pts)

Fallback Values (15 pts)

Same check as Design theme-safe fallbacks — every var() includes a fallback.

Theme-Safe (10 pts)

Confirmed through Design pass. Cross-reference score. Verifies no hardcoded values that would break if org enables dark mode later.

Performance (10 pts)

Demo Readiness Audit (Bonus 50 Points)

When reviewing components for a demo or PoC, run this additional pass. This is additive to the 300-point production audit.

Visual Impact (15 pts)

Data Realism (15 pts)

Demo Flow (10 pts)

Polish (10 pts)

Report Format

Summary Block

Code
=========================================
  LWC Design Audit: c-my-component
=========================================

  Score:    215 / 300
  Grade:    B (Good — minor issues)

  Design:   78 / 100
  UX:       72 / 100
  Styling:  65 / 100

  Demo Readiness: 38 / 50 (bonus)

=========================================

Grade Scale

Demo Readiness Scale

Issue List

Each issue includes:

Code
[CRITICAL] CSS line 42: Hardcoded color #333333
  Fix: Replace with var(--slds-g-color-on-surface-1, #181818)

[WARNING] HTML line 15: No loading state
  Fix: Add template if:true={isLoading} with skeleton or spinner

[INFO] CSS line 78: Missing var() fallback
  Fix: Change var(--slds-g-spacing-4) to var(--slds-g-spacing-4, 1rem)

[DEMO] No entry animation on dashboard cards
  Fix: Add staggered fade-in from sf-lwc-motion

Improvement Plan

After listing issues, generate a prioritized fix plan:

Code
Priority Fixes (do first — biggest score impact):
1. Replace 5 hardcoded colors in CSS (+15 pts)
2. Add loading state to template (+5 pts)
3. Add empty state with guidance message (+5 pts)

Quick Wins (easy fixes):
4. Add fallback values to 8 var() calls (+5 pts)
5. Add aria-label to icon buttons (+3 pts)

Demo Polish (for presentations):
6. Add staggered card entrance animation (+5 demo pts)
7. Replace "Test Account" with realistic data (+5 demo pts)
8. Add skeleton loading shimmer (+5 demo pts)

Directory Audit

When reviewing multiple components, generate a summary:

Code
=========================================
  LWC Design Audit: force-app/main/default/lwc/
=========================================

  Components Reviewed: 12

  Average Score: 198 / 300 (C+)
  Highest:  c-metric-card        267 / 300 (A)
  Lowest:   c-case-list          112 / 300 (D)

  Most Common Issues:
  1. Hardcoded colors (9/12 components)
  2. Missing loading states (7/12 components)
  3. No empty state UI (6/12 components)
  4. Missing var() fallbacks (8/12 components)

  Demo Readiness: 28 / 50 (Almost Ready)
  Missing: entry animations, realistic data
=========================================

Cross-Skill IntegrationReference

PassSkillPointsFocus
Designsf-lwc-design100SLDS 2 hooks, theme-safe styling, migration, structure
UXsf-lwc-ux100States, accessibility, layout, interactions
Stylingsf-lwc-styling100Utility patterns, composition, fallbacks
CheckPointsHow to Detect
All colors use --slds-g-color-10Search for hex/rgb/hsl literals not inside var() fallbacks
All spacing uses --slds-g-spacing-5Search for bare px/rem/em in padding/margin/gap
All font sizes use --slds-g-font-size-5Search for bare px/rem in font-size
All radii use --slds-g-radius-5Search for bare px/rem in border-radius
CheckPointsHow to Detect
Zero hardcoded color values10Regex: #[0-9a-fA-F]{3,8} or rgb\( not inside var() fallback position
All var() have fallback values5Regex: var\(--[^,)]+\) (no comma = no fallback)
No inline color styles in HTML5Search .html for style= containing color, background, border-color
CheckPointsHow to Detect
No --lwc- tokens10Search for --lwc- in .css
No deprecated SLDS 1 class names5Search .html for slds-m-, slds-p- utility classes
CheckPointsHow to Detect
Uses lightning- base components where appropriate10Check if custom buttons/inputs/cards duplicate base components
Semantic HTML elements5Check for bare
where
,
,
CheckPointsHow to Detect
Feedback colors match meaning10error- used for errors, success- for success, not mixed
Surface hierarchy is logical5surface-1 for primary, surface-container- for nested
CheckPointsHow to Detect
Consistent spacing scale5No mixing of spacing hooks with pixel values
Typography follows scale5Font sizes from hook scale, not arbitrary values
CheckPointsHow to Detect
Loading state exists5Search .html for isLoading or loading conditional
Empty state exists5Search .html for empty/no-data conditional with message
Error state exists5Search .html for error conditional with user-friendly message
Error has retry action5Error block contains a button/link for recovery
CheckPointsHow to Detect
Interactive elements have labels8All
Live regions announced5Dynamic content areas have role="status" or role="alert"
Keyboard navigation implemented7onkeydown handler on custom interactive widgets
Focus management on modals/popovers5Focus moves to opened element, returns on close
CheckPointsHow to Detect
Uses CSS Grid or Flexbox5No float, no position: absolute for layout
No fixed pixel widths5No width: 300px on content containers
Spacing uses SLDS scale5Gap/padding/margin from --slds-g-spacing-
CheckPointsHow to Detect
Hover states on interactive elements5:hover rules in CSS for clickable items
Focus-visible styles5:focus-visible or :focus with outline in CSS
Feedback on actions (toast/inline)5ShowToastEvent or inline success/error message after mutations
CheckPointsHow to Detect
Uses for composition5Slots in .html for extensibility
Consistent @api conventions5Props follow variant, size, label, disabled pattern
Emits CustomEvents (not direct DOM)5this.dispatchEvent(new CustomEvent(...)) for child-to-parent
CheckPointsHow to Detect
Grid/flex with auto-fill or flex-wrap5auto-fill, auto-fit, or flex-wrap: wrap in CSS
No horizontal overflow at narrow widths5No fixed-width elements larger than mobile viewport
CheckPointsHow to Detect
Reusable class names (.util-, .recipe-, or semantic)10No single-use classes like .thing1, .wrapper2
No deeply nested selectors (max 2 levels)5Count selector depth in CSS
No !important5Search for !important in CSS
CheckPointsHow to Detect
Classes combine cleanly in HTML10Multiple utility classes on elements
CSS file is organized (grouped by purpose)5Related rules are adjacent
No duplicate property declarations5Same property on same selector
CheckPointsHow to Detect
No wildcard selectors5Search for * { in CSS
No redundant declarations5Same property set multiple times on same element
CheckPointsHow to Detect
Entry animations on key content5animation or transition in CSS; staggered reveals
Skeleton/shimmer loading states5.skeleton or .shimmer classes; pulse/shimmer keyframes
Smooth transitions between states5transition properties on state-change elements
CheckPointsHow to Detect
No "Test" or "Lorem ipsum" data5Search JS/HTML for test data placeholders
Industry-appropriate labels and values5KPI labels match the demo vertical
Dates are relative (not hardcoded past dates)5Search for hardcoded date strings
CheckPointsHow to Detect
Component works without record context (preview mode)5Placeholder/fallback data when no recordId
Configurable via App Builder properties5meta.xml has meaningful exposed properties
CheckPointsHow to Detect
Consistent card heights in layouts5height: 100% or flex-based height matching
No console errors or warnings5Clean browser console during component lifecycle
ScoreGradeMeaning
270-300AProduction-ready, exemplary design
220-269BGood — minor issues to address
150-219CNeeds improvement — several gaps
100-149DSignificant design debt
Below 100FMajor redesign required
ScoreRatingMeaning
40-50Demo ReadyShip it — impressive and polished
25-39Almost ReadyA few tweaks and it's demo-worthy
Below 25Needs WorkMissing key polish or realistic data
SkillRelationship
sf-lwc-designProvides the 100-point design rubric
sf-lwc-uxProvides the 100-point UX rubric
sf-lwc-stylingProvides the 100-point styling rubric
sf-lwc-datavizAdditional checks for data visualization components
sf-lwc-mobileAdditional checks for mobile-targeted components
sf-se-demo-scriptsDemo Readiness audit validates demo-specific polish

Navigate Data & Quality