forcedotcom avatar

Design Systems Slds2 Migrate

This walks you through migrating Lightning Web Components from SLDS 1 to SLDS 2, which is honestly more tedious than difficult. It runs the SLDS linter first (mandatory step), then guides you through fixing the four violation types: hardcoded values, deprecated LWC tokens, class overrides, and legacy token syntax. The color hook selection requires actual thought since context matters, but spacing, sizing, and typography are just numbered scales. The class override fixes trip people up because you need to update both CSS and markup, keeping the original SLDS class in the HTML. Includes validation checklists and repeats the linter loop until you hit zero errors.

skills.sh installs
5.7K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill design-systems-slds2-migrate --agent claude-code

Installs into .claude/skills of the current project.

Files

Goal

Systematically migrate Lightning Web Components from SLDS 1 to SLDS 2 using the SLDS linter and structured guidance for fixing violations across all styling hook categories.

SLDS 2 Styling Hook Categories

CategoryHook PrefixWhat It Replaces
Color--slds-g-color-*Hardcoded colors, --lwc-color* tokens
Spacing--slds-g-spacing-*Hardcoded margins, padding, gaps
Sizing--slds-g-sizing-*Hardcoded widths, heights, dimensions
Typography--slds-g-font-*Hardcoded font sizes, weights, line heights
Border/Radius--slds-g-radius-border-*, --slds-g-sizing-border-*Hardcoded border-radius, border-width
Shadow--slds-g-shadow-*Hardcoded box-shadow values

Color hooks require the most judgment (context-dependent selection). Non-color hooks are mostly numbered scales with straightforward mappings.

Prerequisites

  • Node.js 14.x or higher installed
  • Access to component CSS and markup files (.html for LWC, .cmp for Aura)
  • Terminal/command line access to run linter
  • Git repository for backup (recommended)

Workflow

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Frontend Development, Design & UI/UX
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158
1affaan-m avatarmotion-foundationsaffaan-m/eccMotion tokens, spring presets, performance rules, device adaptation, accessibility enforcement, and SSR safety for React / Next.js using motion/react. Foundatio5.7Kskills.sh installs
2affaan-m avatardocumentation-lookupaffaan-m/eccUse up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the u5.7Kskills.sh installs
3affaan-m avatarmotion-advancedaffaan-m/eccAdvanced motion patterns for React / Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loader5.6Kskills.sh installs
4tanstack-skills avatartanstack-tabletanstack-skills/tanstack-skillsHeadless UI for building powerful tables & datagrids for TS/JS, React, Vue, Solid, Svelte, Qwik, Angular, and Lit.5.6Kskills.sh installs
5github avatarweb-codergithub/awesome-copilotExpert 10x engineer with comprehensive knowledge of web development, internet protocols, and web standards. Use when working with HTML, CSS, JavaScript, web API5.5Kskills.sh installs
6affaan-m avatarnuxt4-patternsaffaan-m/eccNuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.5.5Kskills.sh installs