design-systems-slds2-migrate

design-systems-slds2-migrate is a skill for Claude Code, Codex from forcedotcom/sf-skills. It costs 154 tokens per session (3,143 once invoked), scanned A, original, Apache-2.0.

A migration guide and workflow for moving Salesforce Lightning Web Components from the first Lightning Design System styling approach to SLDS 2. It uses the linter to identify old styles and replaces them with newer styling hooks.

In plain words
What is it for?
Use it to update LWC or Aura component CSS and markup for SLDS 2, including choosing replacement styling hooks and fixing linter findings.
Why use it?
It helps replace hardcoded colours, spacing, sizes, typography, borders, and shadows with themeable design-system values. This reduces the styling changes that must be handled manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to update LWC or Aura component CSS and markup for SLDS 2, including choosing replacement styling hooks and fixing linter findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/forcedotcom/sf-skills/design-systems-slds2-migrate
About the project

forcedotcom/sf-skills is a collection of reusable instructions that help AI coding agents build and work with Salesforce applications and platform features. Developers use it for Agentforce agents, Lightning apps, Flow, Apex, SOQL, Lightning Web Components, and related Salesforce configuration. The catalogue entries are the repository’s skills, plugins, commands, MCP servers, and agents for AI tools that support skills.

forcedotcom/sf-skills · 1,097 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add forcedotcom/sf-skills --skill design-systems-slds2-migrate
Clone the repo
git clone --depth 1 https://github.com/forcedotcom/sf-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-systems-slds2-migrate

README.md
[![agentmods](https://agentmods.dev/badge/skills/forcedotcom/sf-skills/design-systems-slds2-migrate/github.svg)](https://agentmods.dev/skills/forcedotcom/sf-skills/design-systems-slds2-migrate)
Your own site
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/design-systems-slds2-migrate"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/design-systems-slds2-migrate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for design-systems-slds2-migrate

Your own site · 80×15
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/design-systems-slds2-migrate"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/design-systems-slds2-migrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Aug 2026
  • Snyk warn 18 Aug 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 41
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 52
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 131
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00154 $0.03143
Opus 5.5 $0.00062 $0.01257
Sonnet 5.5 $0.00031 $0.00629
Haiku 4.5 $0.00015 $0.00314

Measured 1mo ago against content hash 671dd03f4026, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

design-systems-slds2-migrate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/design-systems-slds2-migrate/SKILL.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 (.html for LWC, .cmp for Aura)
  • Terminal/command line access to run linter
  • Git repository for backup (recommended)

Workflow

1. **REQUIRED — ALWAYS run first:** npx @salesforce-ux/slds-linter@latest lint --fix . — NEVER skip this step. This handles simple violations automatically.
2. Review linter output -> Identify remaining manual fixes needed
3. Fix by violation type -> Use per-rule reference guides
4. Choose the right hook -> Context-first, inspect HTML before deciding
5. Validate -> Re-run linter and confirm zero errors

Step 1: Run SLDS Linter

MANDATORY: This step is NOT optional.

npx @salesforce-ux/slds-linter@latest lint --fix .

The linter analyzes all CSS and markup files (.html for LWC, .cmp for Aura), auto-fixes simple violations, and reports remaining issues requiring manual intervention.

Step 2: Analyze Linter Output

The linter reports violations in this format:

componentName.css
  15:3  warning  Overriding slds-button isn't supported. To differentiate SLDS and
                 custom classes, create a CSS class in your namespace.
                 Examples: myapp-input, myapp-button.                        slds/no-slds-class-overrides

  23:5  error    The '--lwc-colorBackground' design token is deprecated. Replace it with
                 the SLDS 2 styling hook and set the fallback to '--lwc-colorBackground'.
                 1. --slds-g-color-surface-2
                 2. --slds-g-color-surface-container-2                      slds/lwc-token-to-slds-hook

  30:8  warning  Consider replacing the #ffffff static value with an SLDS 2 styling hook
                 that has a similar value:
                 1. --slds-g-color-surface-1
                 2. --slds-g-color-surface-container-1
                 3. --slds-g-color-on-accent-1
                 4. --slds-g-color-on-accent-2
                 5. --slds-g-color-on-accent-3                              slds/no-hardcoded-values-slds2

  31:15  error   Consider removing t(fontSizeMedium) or replacing it with
                 var(--slds-g-font-size-base, var(--lwc-fontSizeMedium, 0.8125rem)).
                 Set the fallback to t(fontSizeMedium). For more info, see
                 Styling Hooks on lightningdesignsystem.com.               slds/no-deprecated-tokens-slds1

Read the full file on GitHub · 244 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 244 lines · 154 tokens per session scan A 671dd03f4026

Subscribe to this mod's changes

design-systems-slds2-migrate is a skill published in the GitHub repository forcedotcom/sf-skills (1,097 stars, last pushed today), licensed Apache-2.0. It adds 154 tokens to every session and 3,143 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

anti-slop-design

Autonomous Principal Design Technologist. Cures vibe-coded software from AI frontend slop using curated token archetypes and 7-axis quality gating.

sickn33/agentic-awesome-skills · 34 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

frontend-ui-dark-ts

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

microsoft/skills · 48 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

frontend-visual-qa

Audits rendered UI and specific task/object-link handoffs; excludes ordinary source citations alone. Audits already-rendered UI and Markdown/Obsidian image layout — web app, deck/slide, dashboard, design-system, or Electron/native app — via real-browser/native-app journeys and a Playwright sweep. Use after UI…

daymade/claude-code-skills · 125 tokens