
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-codeInstalls 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
| Category | Hook Prefix | What 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 (
.htmlfor LWC,.cmpfor 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- External Diagram Mermaid Generate5.6K
- Integration Connectivity Connected App Configure5.5K
- Integration Connectivity Generate5.5K
- Agentforce D360 Analyze5.4K
- Experience Ui Bundle Frontend Generate5.3K
- Platform Tracing Configure5.3K
- Experience Ui Bundle Metadata Generate5.3K
- Experience Ui Bundle App Coordinate5.3K
- Experience Ui Bundle Deploy5.3K
- Experience Ui Bundle Salesforce Data Access5.3K
- Experience Ui Bundle Custom App Generate5.3K
- Dx App Analytics Query5.2K
- Platform Tracing Agentforce Configure5.2K
- Platform Value Set Generate5.2K
- Integration Eventing Cdc Configure5.2K
- Integration Eventing Subscription Configure5.2K
- Platform Trust Archive Manage5.2K
- Experience Ui Bundle File Upload Generate5.2K
- Experience Ui Bundle Features Generate5.1K
- Dx Devops Test Failures Analyze5.1K
- Data360 Schema Get5.1K
- Dx Devops Test Pipeline Configure5.1K
- Experience Ui Bundle Site Generate5K
- Dx Devops Test Suite Assignments Configure5K