commerce-b2b-open-code…
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
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
$ npx -y skills add forcedotcom/sf-skills --skill design-systems-slds-apply --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/design-systems-slds-applyContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: design-systems-slds-apply
description: "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\"."
metadata:
version: "1.1"
domains: ["Design Systems"]
relatedSkills:
- "design-systems-slds-validate"
cliTools:
- tool: ["npx"]
semver: ">=7.0.0"
- tool: ["node"]
semver: ">=18.0.0"The **Salesforce Lightning Design System (SLDS)** is a CSS framework with thousands of artifacts. This skill teaches agents how to find and correctly use them.
> **Version:** This skill targets **SLDS v2**. Legacy `--lwc-*` tokens and `slds-*--modifier` syntax are deprecated. > > **Audit scope:** The companion `design-systems-slds-validate` skill analyzer only scans `.css`, `.html`, and `.js` files. Use it directly for LWC and similar HTML/CSS/JS components; treat it as a partial signal for JSX/TSX or other framework-specific template formats and supplement with manual review.
| Artifact | Count | Description | |----------|-------|-------------| | **Lightning Base Components** | ~70 | Pre-built LWC components (LWC only) | | **SLDS Blueprints** | 85 | CSS/HTML patterns for any framework | | **Styling Hooks** | 523 | CSS custom properties (`--slds-g-*`) for theming | | **Utility Classes** | 1,147 | Rapid styling classes for spacing, layout, visibility | | **Icons** | 1,732 | SVG icons across 5 categories |
---
**This skill covers:**
**This skill includes basic accessibility reminders** (icon alt text, focus outlines, color-not-sole-indicator) in the validation checklists. Full WCAG compliance requires a dedicated accessibility review.
**This skill does NOT cover (use companion skills):**
---
Always follow this order:
1. Lightning Base Components (LWC only) ← Check first 2. SLDS Blueprints (any framework) ← Use exact SLDS classes 3. Custom with Styling Hooks ← Use var(--slds-g-*) 4. Custom CSS (last resort) ← Still use hooks for values
If building in LWC, check for an LBC first: [Lightning Component Library](https://developer.salesforce.com/docs/component-library/overview/components)
If no LBC exists (or not using LWC), select an SLDS Blueprint. See [references/component-selection.md](references/component-selection.md).
---
---
SLDS hook families do NOT all follow the same naming pattern. Agents frequently invent hooks that don't exist by assuming `{prefix}-{number}` works universally. **Always verify a hook exists** via the bundled `search-hooks.cjs` script or `assets/hooks-index.json` before using it.
| Wrong (does not exist) | Correct | Notes | |------------------------|---------|-------| | `--slds-g-font-size-3` | `--slds-g-font-scale-1` | Font sizes use `font-scale-*`, not `font-size-*` | | `--slds-g-font-size-4` | `--slds-g-font-scale-2` | Only `--slds-g-font-size-base` exists (base size) | | `--slds-g-font-size-8` | `--slds-g-font-scale-6` | Scale goes: neg-4 through 10 |
**Rule:** For font sizes, use `--slds-g-font-size-base` (the one base size) or `--slds-g-font-scale-*` (the numbered scale). Never `--slds-g-font-size-N`.
| Wrong (does not exist) | Correct | Notes | |------------------------|---------|-------| | `--slds-g-color-on-surface` | `--slds-g-color-on-surface-2` | All color hooks need a number | | `--slds-g-color-on-accent` | `--slds-g-color-on-accent-1` | Pick 1/2/3 by emphasis level | | `--slds-g-color-surface` | `--slds-g-color-surface-1` | No unnumbered base form |
**Rule:** Every `--slds-g-color-*` hook ends in a number. Pick by emphasis: `-1` (low), `-2` (medium), `-3` (high).
Some CSS values (e.g., `min-width: 7rem` for label alignment) have no SLDS hook. This is acceptable:
.c-field-label {
/* No SLDS hook exists for this width; intentional custom value */
min-width: 7rem;
}**Rule:** When no hook exists, use the value directly with a comment e
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code…
Use this skill to diagnose and resolve what blocks a DevOps Center promotion of a work item's feature branch: Git merge conflicts and deployment failures.…
Use this skill to manage the full lifecycle of a DevOps Center pipeline — list all pipelines, get a single pipeline's details, create a new pipeline linked to…
Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix…
Configures DevOps Center pipeline testing infrastructure: enables a test provider so its suites become available, re-syncs a configured provider to pull in new…