forcedotcom/sf-skills / skills/design-systems-slds-apply
design-systems-slds-apply
UnverifiedApply 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".
scripts/search-blueprints.cjs
View on GitHub#!/usr/bin/env node
/**
* Search SLDS blueprint metadata.
*
* Usage:
* node search-blueprints.js --search "dialog"
* node search-blueprints.js --category "Overlay"
* node search-blueprints.js --name "modals"
* node search-blueprints.js # list all blueprints
*/
const fs = require('fs');
const path = require('path');
const BLUEPRINTS_DIR = path.join(__dirname, '..', 'assets', 'blueprints', 'components');
function loadBlueprints() {
const blueprints = [];
if (!fs.existsSync(BLUEPRINTS_DIR)) {
console.error(`Blueprints directory not found: ${BLUEPRINTS_DIR}`);
process.exit(1);
}
const files = fs.readdirSync(BLUEPRINTS_DIR).filter(f => f.endsWith('.yaml'));
for (const file of files) {
const content = fs.readFileSync(path.join(BLUEPRINTS_DIR, file), 'utf8');
const nameMatch = content.match(/^name:\s*"?([^"\n]+)"?/m);
const descMatch = content.match(/^description:\s*"?([^"\n]+)"?/m);
const catMatch = content.match(/^category:\s*"?([^"\n]+)"?/m);
const rootMatch = content.match(/root:\s*"?([^"\n]+)"?/m);
blueprints.push({
file: file.replace('.yaml', ''),
name: nameMatch ? nameMatch[1].trim() : file.replace('.yaml', ''),
description: descMatch ? descMatch[1].trim() : '',
category: catMatch ? catMatch[1].trim() : 'Unknown',
rootClass: rootMatch ? rootMatch[1].trim() : '',
});
}
return blueprints.sort((a, b) => a.name.localeCompare(b.name));
}
function run() {
const args = process.argv.slice(2);
const flags = {};
for (let i = 0; i < args.length; i += 2) {
if (args[i].startsWith('--')) {
flags[args[i].slice(2)] = args[i + 1] || '';
}
}
const blueprints = loadBlueprints();
if (flags.name) {
const needle = flags.name.toLowerCase();
const bp = blueprints.find(b =>
b.file.toLowerCase() === needle || b.name.toLowerCase() === needle
);
if (!bp) {
console.log(`Blueprint "${flags.name}" not found.`);
console.log(`\nAvailable: ${blueprints.map(b => b.file).join(', ')}`);
return;
}
console.log(`\n=== ${bp.name} ===`);
console.log(`Category: ${bp.category}`);
console.log(`Root class: ${bp.rootClass}`);
console.log(`Description: ${bp.description}`);
console.log(`\nFull YAML: assets/blueprints/components/${bp.file}.yaml`);
console.log('\nRead the full YAML file for classes, modifiers, states, accessibility, and example HTML.');
return;
}
let results = blueprints;
if (flags.category) {
const cat = flags.category.toLowerCase();
results = results.filter(b => b.category.toLowerCase() === cat);
}
if (flags.search) {
const term = flags.search.toLowerCase();
results = results.filter(b =>
b.name.toLowerCase().includes(term) ||
b.description.toLowerCase().includes(term) ||
b.file.toLowerCase().includes(term)
);
}
if (results.length === 0) {
console.log('No blueprints found matching your criteria.');
const categories = [...new Set(blueprints.map(b => b.category))].sort();
console.log(`\nAvailable categories: ${categories.join(', ')}`);
return;
}
console.log(`\nFound ${results.length} blueprint(s):\n`);
const byCategory = {};
for (const bp of results) {
if (!byCategory[bp.category]) byCategory[bp.category] = [];
byCategory[bp.category].push(bp);
}
for (const [cat, bps] of Object.entries(byCategory).sort()) {
console.log(`── ${cat} ──`);
for (const bp of bps) {
console.log(` ${bp.name.padEnd(30)} ${bp.rootClass.padEnd(25)} ${bp.description.slice(0, 60)}`);
}
console.log();
}
console.log('Use --name "<blueprint>" to get full details.');
}
run();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |