Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

design-systems-slds-apply

БесплатноБез исполняемых скриптовНе проверен

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between…

forcedotcomот forcedotcom★ 1 200 звёзд на GitHub

Об этом скилле

Applying SLDS

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.

What is SLDS?

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

Scope

This skill covers:

  • Which blueprint to use for a given UI pattern
  • How to style with hooks (color, spacing, typography, shadows, borders)
  • Which utility classes to use for layout, spacing, visibility
  • Which icon to use and from which category
  • SLDS naming conventions, class structure, hook syntax

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):

  • Design decisions -- visual hierarchy, composition, interaction patterns
  • LWC mechanics -- component structure, @wire, @api, lifecycle, events (not yet available)
  • Full accessibility -- WCAG conformance, ARIA patterns, keyboard navigation, focus management, contrast ratios (not yet available)

Component Selection Hierarchy

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

If no LBC exists (or not using LWC), select an SLDS Blueprint. See references/component-selection.md.


Core Rules

Do

  • Follow the selection hierarchy: LBC > Blueprint > Hooks > Custom CSS
  • Use var(--slds-g-*, fallback) for all themeable values
  • Create custom classes (my-*, c-*) instead of overriding .slds-*
  • Verify every hook, class, and utility exists before using it — run the search scripts; never assume an artifact exists based on naming patterns (see Verify Before You Use)
  • Pair surface colors with on-surface colors for text
  • Provide alternative-text on every <lightning-icon>

Don't

  • Hard-code colors, spacing, or typography values
  • Override .slds-* classes directly
  • Use deprecated --lwc-* tokens as primary values
  • Use --slds-s-* (shared) hooks -- they are private/internal
  • Reassign hook values -- only reference them with var()
  • Use color alone to convey meaning
  • Invent hook names by interpolating patterns from other families (see Naming Traps below)

Hook Naming Traps

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.

Trap 1: Font size hooks are NOT numbered

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.

Trap 2: Color hooks always require a number

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).

Trap 3: Not all values have hook equiva

Полный SKILL.md на GitHub

Установить design-systems-slds-apply в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/README.mdassets/blueprints/components/accordion.yamlassets/blueprints/components/activity-timeline.yamlassets/blueprints/components/alert.yamlassets/blueprints/components/app-launcher.yamlassets/blueprints/components/avatar-group.yamlassets/blueprints/components/avatar.yamlassets/blueprints/components/badges.yamlassets/blueprints/components/brand-band.yamlassets/blueprints/components/breadcrumbs.yamlassets/blueprints/components/builder-header.yamlassets/blueprints/components/button-groups.yamlassets/blueprints/components/button-icons.yamlassets/blueprints/components/buttons.yamlassets/blueprints/components/cards.yamlassets/blueprints/components/carousel.yamlassets/blueprints/components/chat.yamlassets/blueprints/components/checkbox-button-group.yamlassets/blueprints/components/checkbox-button.yamlassets/blueprints/components/checkbox-toggle.yamlassets/blueprints/components/checkbox.yamlassets/blueprints/components/color-picker.yamlassets/blueprints/components/combobox.yamlassets/blueprints/components/counter.yamlassets/blueprints/components/data-tables.yamlassets/blueprints/components/datepickers.yamlassets/blueprints/components/datetime-picker.yamlassets/blueprints/components/docked-composer.yamlassets/blueprints/components/docked-form-footer.yamlassets/blueprints/components/docked-utility-bar.yamlassets/blueprints/components/drop-zone.yamlassets/blueprints/components/dueling-picklist.yamlassets/blueprints/components/dynamic-icons.yamlassets/blueprints/components/dynamic-menu.yamlassets/blueprints/components/expandable-section.yamlassets/blueprints/components/expression.yamlassets/blueprints/components/feeds.yamlassets/blueprints/components/file-selector.yamlassets/blueprints/components/files.yamlassets/blueprints/components/form-element.yaml

FAQ

Что делает скилл design-systems-slds-apply?

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".

Как установить скилл design-systems-slds-apply?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл design-systems-slds-apply запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить design-systems-slds-apply с