Agent skill

Commerce B2b Open Code Components Replace

by forcedotcom in forcedotcom/sf-skills

Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code site: component for OOTB definitions.

Apache-2.0Auto-check passedSales & Support

Install Commerce B2b Open Code Components Replace

skills CLI
$ npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-replace -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills commerce-b2b-open-code-components-replace --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/commerce-b2b-open-code-components-replace .claude/skills/commerce-b2b-open-code-components-replace && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
commerce-b2b-open-code-components-replace
GitHub stars
1.1k
Token cost
~3.3k tokens
SKILL.md length
1,296 words
Files
2 (incl. assets)
Skills in repo
251
Repo updated
First seen
Licence
Apache-2.0

At a glance

Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code site: component for OOTB definitions.

  • Works in 3 steps: Scan Site and Cross-Reference Mapping → Replace in content.json → Report
  • Users mention replace OOTB components
  • SKILL.md covers Scope, Prerequisites, Replacement Workflow and Example Interaction, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Commerce B2b Open Code Components Replace is an agent skill from forcedotcom/sf-skills. Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code site: component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commercebuilder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open…

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including assets (for example `assets/ootb-to-open-code-mapping.json`).

It sits in Sales & Support. It works with Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Users mention replace OOTB components
  • Replace commerce components with open code
  • Swap OOTB for open source
  • Replace commercebuilder:

Example prompts

  • “replace OOTB components”
  • “replace commerce components with open code”
  • “swap OOTB for open source”
  • “/commerce-b2b-open-code-components-replace”

Requirements

  • Pre-approved tools (allowed-tools): Bash(grep:*), Bash(ls:*), Read, Write

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Scan Site and Cross-Reference Mapping
  2. Replace in content.json
  3. Report

What it can do on your machine

Read from SKILL.md and the folder at commit e5164d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(grep:*)
    • Bash(ls:*)
    • Read
    • Write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Commerce B2b Open Code Components Replace loads about 3.3k tokens when it runs. Until then it costs about 193 tokens; SKILL.md has 1,296 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~193
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit e5164d9, republished under its Apache-2.0 licence (© forcedotcom). 1,296 words, ~3,274 tokens.

Download SKILL.mdSave it as .claude/skills/commerce-b2b-open-code-components-replace/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
commerce-b2b-open-code-components-replace
description
Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata.
allowed-tools
Bash(grep:*), Bash(ls:*), Read, Write
metadata.version
1.0
metadata.domains
Commerce, Experience
metadata.relatedSkills
commerce-b2b-open-code-components-integrate

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 sfdc_cms__view/<ViewName>/ (or the path the user gives) instead of all views.


Prerequisites

Resolve <package-dir>

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.

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. Let me check..."

If any prerequisite is not met, the integrating skill will handle it. Once all checks pass, proceed to the replacement workflow.

Required state after prerequisites:

  • Package dir — the value resolved above (e.g., force-app)
  • Store name — e.g., My_B2B_Store1
  • Site metadata path — <package-dir>/main/default/digitalExperiences/site/<store-name>/

Replacement Workflow

Step 1: Scan Site and Cross-Reference Mapping

This step is MANDATORY. Always scan the site first before attempting any replacements.

Send a plain-text chat reply to the user (per Rule 1): "I'm scanning your store's site metadata to find all OOTB commerce components currently in use and checking which have open code equivalents."

Step 1a — Find affected files (one command, simple literal match):

bash
grep -rl '"commerce' \
  <package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__view/ \
  <package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__themeLayout/ \
  --include="content.json"

Step 1b — Read the mapping and parse the matched files. Read assets/ootb-to-open-code-mapping.json once into memory. Then, using the Read tool, parse each matched file and extract all "definition" values that start with commerce (e.g., commerce_builder:cartBadge). Collect a deduplicated list of OOTB components across all files.

Step 1c — List repo components (one command):

bash
ls .tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/

Using the parsed definitions, the ls output, and the mapping table, categorize every discovered OOTB component into three groups:

Show the user a breakdown and a selectable list:

First, inform the user about skipped and unmapped components:

text
Found X OOTB components in your site:

In mapping table but NOT in repo (skipping):
  - commerce_builder:quoteSummary → site:quoteSummary (not found in repo)

No mapping available (not in mapping table):
  - commerce_builder:actionButtons
  - commerce_builder:layoutHeaderOne
  - commerce_builder:searchInputContainer
  - commerce_builder:myAccountMegaMenu

Then present the replaceable components as a multi-select list so the user can pick from checkboxes instead of typing. Include an "All of the above" option:

text
Which components would you like to replace?

[ ] commerce_builder:heading → site:productHeading
[ ] commerce_builder:cartBadge → site:cartBadge
[ ] commerce_builder:searchInput → site:searchInput
[ ] All of the above

If user provided specific component name(s) in the original request, pre-filter to those and skip the selection prompt.

Step 2: Replace in content.json

Send a plain-text chat reply to the user (per Rule 1): "I'm now replacing the selected OOTB component definitions with their open code equivalents in your site's content.json files."

The affected files are already known from Step 1. For each file that contains selected components:

  1. Use the Read tool to read the file
  2. For each selected OOTB component, confirm again that the mapped site: target exists in the open code repo. Only proceed with replacements that pass this check.
  3. Replace all matching "definition" values with their mapped open code equivalents — always use the exact site:<name> string from the mapping table
    • Example: "definition": "commerce_builder:heading" → "definition": "site:productHeading"
  4. Use the Write tool to save the updated file
  5. Preserve all other JSON properties — only "definition" values change

Batch efficiently: if a file contains multiple OOTB components, apply ALL replacements in a single Read → modify → Write pass. Do NOT read and write the same file multiple times.

Step 3: Report
text
Replacement Complete!

Replaced X components across Y files:
- commerce_builder:heading → site:productHeading (3 files)
- commerce_builder:cartBadge → site:cartBadge (2 files)
- commerce_builder:searchInput → site:searchInput (4 files)

Skipped (not in repo):
- commerce_builder:quoteSummary

No mapping available (left unchanged):
- commerce_builder:actionButtons
- commerce_builder:layoutHeaderOne
- commerce_builder:searchInputContainer

Modified files:
- sfdc_cms__view/Home/content.json
- sfdc_cms__view/Product_Detail/content.json
- sfdc_cms__themeLayout/DefaultTheme/content.json

Next Steps:
1. Deploy: sf project deploy start -d <package-dir>/main/default/digitalExperiences/site/<store-name>
2. Test the store thoroughly in Experience Builder
3. Publish your site when ready

Example Interaction

User: "Replace OOTB components with open code versions"

Agent: "Before replacing components, I need to verify that the open code components are set up in your store. Let me check..."

  • [done] Open source repo cloned
  • [done] Store metadata available for My_B2B_Store1
  • [done] Open code components are integrated

Agent: "I'm scanning your store's site metadata to find all OOTB commerce components and checking which have open code equivalents."

(Runs grep -rl to find files with commerce definitions, Reads those files to extract component names, runs ls to list repo components, then cross-references with mapping table)

text
Found 8 OOTB components in your site:

No mapping available (not in mapping table):
  - commerce_builder:searchInputContainer
  - commerce_builder:layoutHeaderOne
  - commerce_builder:myAccountMegaMenu
  - commerce_builder:actionButtons

Agent (asks the user via a multi-select prompt):

text
Which components would you like to replace?

[ ] commerce_builder:heading → site:productHeading
[ ] commerce_builder:cartBadge → site:cartBadge
[ ] commerce_builder:searchInput → site:searchInput
[ ] commerce_builder:cartSummary → site:cartSummary
[ ] All of the above

User: (selects heading and cartBadge)

Agent: "I'm now replacing the selected OOTB component definitions with their open code equivalents in your site's content.json files."

(Files already known from scan — one Read/Write pass per affected file, all replacements batched)

text
Replacement Complete!

Replaced 2 components across 5 files:
- commerce_builder:heading → site:productHeading (3 files)
- commerce_builder:cartBadge → site:cartBadge (2 files)

No mapping available (left unchanged):
- commerce_builder:searchInputContainer
- commerce_builder:layoutHeaderOne
- commerce_builder:myAccountMegaMenu
- commerce_builder:actionButtons

Modified files:
- sfdc_cms__view/Home/content.json
- sfdc_cms__view/Product_Detail/content.json
- sfdc_cms__themeLayout/DefaultTheme/content.json

Next Steps:
1. Deploy: sf project deploy start -d force-app/main/default/digitalExperiences/site/My_B2B_Store1
2. Test the store thoroughly in Experience Builder

Show full SKILL.md (472 more words)Show less

Rules

  1. Always explain in chat before executing. Before every Bash or Write tool call, send a plain-text reply in the conversation that says what the command will do and why. The explanation MUST appear as a normal chat message preceding the tool call. Do NOT embed it inside the command itself (no echo lines, no # comments), do NOT prefix it to the command, and do NOT rely solely on the tool's description parameter — that field is not guaranteed to be visible to the user. After the explanation, issue the tool call and wait for the user to approve it before continuing.
  2. assets/ootb-to-open-code-mapping.json is the only source of truth. Every OOTB → open-code mapping comes from that file; never guess, infer, or hallucinate component names. Each replacement's new "definition" MUST be the exact mapped value from the file, which always uses the site: namespace (e.g. site:productHeading). Before writing, verify the mapped target exists in the cloned open code components repo (under .tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/); if it is not present, skip the replacement and report it under "not in repo".
  3. Use Read and Write tools for JSON files. Use the Read tool to parse content.json files and the Write tool to update them. Do NOT use bash to parse or edit JSON — no sed, awk, perl, or regex on JSON content. Bash is only for simple file discovery (grep -rl, find, ls) — never for extracting or modifying JSON values.
  4. Minimize commands. Batch work into as few commands as possible. Use a single grep to scan all files, a single ls to verify the repo, and one Read/Write pass per file. Do NOT run a separate command for every component or every directory.

Error Handling

ErrorMessageAction
Prerequisites not met"Open code components are not integrated yet."Run integrating skill first
No mapping found"No mapping found for '{component}'."Show available mappings, report as unmapped
Component not in repo"Open code component '{name}' not found in cloned repo."Skip and inform user
No OOTB components in site"No OOTB commerce components found in site metadata."Inform user, nothing to replace
No replaceable components"All OOTB components found are unmapped — none can be replaced."Show the unmapped list, suggest checking for updated mappings
content.json parse error"Failed to parse content.json: {file}"Show error, skip file, continue with remaining files

Verification Checklist

  • Prerequisites verified via integrating skill (repo, store, components)
  • Site scanned + repo verified + mapping cross-referenced in minimal commands (Step 1)
  • Each replacement uses the exact mapped site: definition and was verified present in the open code repo before write
  • Breakdown shown to user with three categories before proceeding
  • User selected components to replace (or provided names)
  • Each content.json file updated in a single Read → modify → Write pass
  • JSON structure preserved, no syntax errors introduced
  • User informed of skipped and unmapped components
  • Deployment command provided

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (assets) in skills/commerce-b2b-open-code-components-replace of forcedotcom/sf-skills.

  • SKILL.md
  • assets/ootb-to-open-code-mapping.json

Open the folder on GitHubat commit e5164d9

Compare with similar skills

Commerce B2b Open Code Components Replace next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Commerce B2b Open Code Components Replace compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commerce B2b Open Code Components Replace this skillforcedotcom/sf-skills1.1k—~3.3kAutomated safety check: PassApache-2.0
Services Extension Consumptionforcedotcom/salesforcedx-vscode1k—~5kAutomated safety check: PassBSD-3-Clause
Soql Lib Query Builderbeyond-the-cloud-dev/soql-lib154—~4.3kAutomated safety check: PassMIT
Sf DatacloudJaganpro/sf-skills424—~2.7kAutomated safety check: PassMIT
Soql Lib Selectorbeyond-the-cloud-dev/soql-lib154—~2kAutomated safety check: PassMIT
Core Extension APIforcedotcom/salesforcedx-vscode1k—~842Automated safety check: PassBSD-3-Clause

Similar skills

  • Services Extension Consumption

    forcedotcom/salesforcedx-vscode

    Consume the salesforcedx-vscode-services extension API. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~5k tokensUpdated today
    Sales & SupportAuto-check passed
  • Soql Lib Query Builder

    beyond-the-cloud-dev/soql-lib

    Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).

    154 GitHub stars~4.3k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Sales & SupportAuto-check passed
  • Soql Lib Selector

    beyond-the-cloud-dev/soql-lib

    Creates Salesforce Apex selector classes using the SOQL Lib selector pattern.

    154 GitHub stars~2k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Core Extension API

    forcedotcom/salesforcedx-vscode

    Public API exported by salesforcedx-vscode-core activate(). An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~842 tokensUpdated today
    Sales & SupportAuto-check passed
  • Dev Setup

    Portwood-Global-Solutions/Portwood

    Get from a fresh clone of Portwood to a working, fully-tested Salesforce org.

    125 GitHub stars~1.1k tokensUpdated today
    Sales & SupportAuto-check passed

More from forcedotcom/sf-skills

All 251 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated today
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated today
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Commerce B2b Open Code Components Replace

What does Commerce B2b Open Code Components Replace do?

Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code site: component for OOTB definitions. Commerce B2b Open Code Components Replace is an agent skill from forcedotcom/sf-skills.json files, or look up the equivalent open code site: component for OOTB definitions.

When should I use Commerce B2b Open Code Components Replace?

Commerce B2b Open Code Components Replace fits situations like: users mention replace OOTB components; replace commerce components with open code; swap OOTB for open source; replace commercebuilder:.

How do I install Commerce B2b Open Code Components Replace in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-replace -a claude-code`. Or copy the skill folder (skills/commerce-b2b-open-code-components-replace in forcedotcom/sf-skills) into .claude/skills/commerce-b2b-open-code-components-replace in your project. Claude Code loads it when a task matches its description.

How do I install Commerce B2b Open Code Components Replace in Codex?

Run `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-replace -a codex`. Or copy the skill folder (skills/commerce-b2b-open-code-components-replace in forcedotcom/sf-skills) into .agents/skills/commerce-b2b-open-code-components-replace in your project. Codex loads it when a task matches its description.

Can I use Commerce B2b Open Code Components Replace in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill commerce-b2b-open-code-components-replace -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commerce-b2b-open-code-components-replace, .gemini/skills/commerce-b2b-open-code-components-replace, .github/skills/commerce-b2b-open-code-components-replace and .opencode/skills/commerce-b2b-open-code-components-replace in your project.

What does Commerce B2b Open Code Components Replace need to run?

SKILL.md names no scripts, command-line tools or credentials: Commerce B2b Open Code Components Replace is instructions for the agent only. Its frontmatter pre-approves these tools: Bash(grep:*), Bash(ls:*), Read, Write.

Does Commerce B2b Open Code Components Replace access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Commerce B2b Open Code Components Replace safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Commerce B2b Open Code Components Replace use?

Commerce B2b Open Code Components Replace is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commerce B2b Open Code Components Replace use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Commerce B2b Open Code Components Replace?

Skills that share tags, products or a category with Commerce B2b Open Code Components Replace: Services Extension Consumption (forcedotcom/salesforcedx-vscode, 1k stars), Soql Lib Query Builder (beyond-the-cloud-dev/soql-lib, 154 stars), Sf Datacloud (Jaganpro/sf-skills, 424 stars) and Soql Lib Selector (beyond-the-cloud-dev/soql-lib, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commerce B2b Open Code Components Replace?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,060 GitHub stars. The repository holds 251 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.