# Commerce B2b Open Code Components Integrate

Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce...

- Repository: https://github.com/forcedotcom/sf-skills (1134 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-integrate -g -a claude-code -y`
Codex: `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-integrate -g -a codex -y`
Cursor: `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-integrate -g -a cursor -y`
Gemini CLI: `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-integrate -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add forcedotcom/sf-skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## 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

1. **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`:

The rest: https://github.com/forcedotcom/sf-skills/blob/HEAD/plugins/builder/commerce-b2b/skills/commerce-b2b-open-code-components-integrate/SKILL.md
