commerce-b2b-open-code-components-integrate
БесплатноБез исполняемых скриптовНе проверенIntegrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention "integrate open code components", "open…
от forcedotcom★ 1 200 звёзд на GitHubОб этом скилле
When to Use This Skill
Use this skill when you need to:
- Integrate all open source B2B Commerce components into a store
- Add open source components to a new or existing B2B Commerce store
- Make open code components available in Experience Builder
Rules
- Always explain before executing. Before running any command, you MUST tell the user what the command does and why you are running it. Never just show a raw command and ask for permission. The user should be able to read your explanation and understand the purpose before approving.
Overview
This skill copies all open source B2B Commerce components from the official Salesforce repository (https://github.com/forcedotcom/b2b-commerce-open-source-components) into a B2B Commerce store's site metadata. After integration, the components appear in the Experience Builder component palette.
Startup Flow
When this skill is triggered, perform these checks automatically before copying.
Check 0: Resolve Package Directory
Read sfdx-project.json and pick the active package directory. Extract packageDirectories[] and use the entry with "default": true; if no entry is flagged default, use the first entry. Use this value as <package-dir> everywhere below. If sfdx-project.json is missing or has no packageDirectories, tell the user and abort.
Check 1: Open Source Repository
Verify the repo is cloned at .tmp/b2b-commerce-open-source-components:
- If directory does not exist: Tell user: "I'm cloning the official B2B Commerce open source components repository from GitHub into a local
.tmp/folder. This gives us access to all the open code components." Then run:git clone https://github.com/forcedotcom/b2b-commerce-open-source-components .tmp/b2b-commerce-open-source-components - If directory exists and contains
force-app/main/default/sfdc_cms__lwcandsfdc_cms__label, present options:"Open source repository is already cloned. How would you like to proceed?"
- Reuse existing — Use the already cloned repository
- Re-clone — Remove and clone fresh from GitHub
- If directory exists but structure is invalid: Tell user: "The cloned repository has an unexpected structure. I'll remove it and clone a fresh copy." Then remove and re-clone.
- If clone fails: inform user and abort
Check 2: Store and Site Metadata
Verify a store is selected and site metadata is available locally:
- Tell user: "I'm checking if your project already has B2B store metadata locally."
Check if
<package-dir>/main/default/digitalExperiences/site/contains any store directories. - If store metadata exists: use it. If multiple stores found, ask user to select one.
- If no store metadata found: Try retrieving from the connected org before delegating:
- Run
sf org list(or checksf config get target-org) to find a connected org. Ask the user to confirm or pick one if more than one. - List
DigitalExperienceBundlesite bundles in that org withsf org list metadata --metadata-type DigitalExperienceBundle --target-org <alias>. Filter tosite/*entries. - If at least one site bundle exists, ask the user which to use, then run:
sf project retrieve start --metadata "DigitalExperienceBundle:site/<storeName>" --target-org <alias>The bundle lands at<package-dir>/main/default/digitalExperiences/site/<storeName>/. - Only if no connected org is available, or no site bundles are found, or retrieve fails: delegate to the commerce-b2b-store-create skill.
- Run
Required state after all checks:
- Package dir — the value resolved in Check 0 (e.g.,
force-app) - Store name — the selected
fullNamevalue (e.g.,My_B2B_Store1) - Site metadata path —
<package-dir>/main/default/digitalExperiences/site/<store-name>/ - Repo path —
.tmp/b2b-commerce-open-source-components/
Integration Task
Copy all components and labels from cloned repo to site directory:
- Source:
.tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/*andsfdc_cms__label/*(the open source repo's own layout — alwaysforce-app) - Destination:
<package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__lwc/andsfdc_cms__label/(<package-dir>resolved in Check 0)
Steps:
- Tell user: "I'm checking if open code components already exist in your store's site metadata." Check if destination directories already contain files.
- If files exist, present options:
"Components already exist in {store-name}. How would you like to proceed?"
- Overwrite all — Replace all existing components with latest from repo
- Copy only new — Skip existing components, copy only ones not yet present
- Tell user: "I'm now copying all open code LWC components from the cloned repository into your store's site metadata directory." Copy all component directories from source to destination. 4
Установить commerce-b2b-open-code-components-integrate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(git clone:*)Bash(cp:*)Bash(sf org list:*)Bash(sf config get:*)Bash(sf project retrieve start:*)ReadFAQ
Что делает скилл commerce-b2b-open-code-components-integrate?
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention "integrate open code components", "open source B2B commerce", "add open code components", "forcedotcom/b2b-commerce-open-source-components", or want to add open source commerce components to their store. Copies all components and labels so they become available in Experience Builder.
Как установить скилл commerce-b2b-open-code-components-integrate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл commerce-b2b-open-code-components-integrate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic