Agent skill · forcedotcom

commerce-b2b-open-code-components-replace

Map OOTB Salesforce B2B Commerce component definitions to open source `site:` equivalents, or replace those definitions in site metadata `content.json` files. Use this skill for lookup-only and replacement workflows. TRIGGER when: the user asks for an OOTB-to-open-code mapping, names `commerce_builder:` definitions, requests equivalent `site:` components, or wants selected definitions replaced in a store or view. DO NOT TRIGGER when: the user needs to install or copy the official component library (use commerce-b2b-open-code-components-integrate), create or retrieve a B2B store (use commerce-b2b-store-create), author custom LWCs, or make general Experience Builder changes unrelated to OOTB-to-open-code mapping.

What it needs

About 7k tokens when loaded.

What this skill does

Replacing OOTB B2B Commerce Components with Open Code This skill replaces OOTB (out-of-the-box) B2B Commerce component definitions in site metadata content.json files with their open source site: equivalents, or looks up the equivalent open code component for given OOTB definitions without making changes. It uses an authoritative mapping loaded from assets/ootb-to-open-code-mapping.json. Scope Modes: Full replace runs the scan (Step 1), user selection if needed, then content.json updates (Step 2–3). Lookup only (user asks for equivalents but not to change files): apply the mapping-authority rule and report OOTB → site: for the named components or for definitions found in the scoped content.json — do not call Write unless the user confirms replacement. View-scoped work: limit file discovery and reads to sfdccmsview/<ViewName>/ (or the path the user gives) instead of all views. --- Prerequisites Resolve <package-dir> Run the plugin's deterministic resolver from the Salesforce project root: Use its single stdout line as <package-dir> everywhere below. The resolver selects the packageDirectories[] entry with "default": true, or the first entry when no default is declared. If it exits nonzero, relay its diagnostic to the user and abort; do not guess a package directory or reimplement the selection logic inline. Delegate setup Before replacing components, delegate to the commerce-b2b-open-code-components-integrate skill to ensure: 1. Open source repository is cloned at .tmp/b2b-commerce-open-source-components 2. Store is selected and site metadata is retrieved locally 3. Open code components are copied to the store's site metadata The integrating skill owns the .tmp/ clone lifecycle (it prompts the user to reuse or re-clone an existing checkout); this skill assumes the clone is already present. Send a plain-text chat reply to the user (per Rule 1): "Before replacing components, I need to verify that the open code components are set up in your store. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills forcedotcom/commerce-b2b-open-code-components-replace--6f908e

View the source on GitHub

Browse the @skills marketplace