/b2c-cli:b2c-capfrom b2c-cli
Manages Salesforce B2C Commerce App Packages via the b2c CLI: validate, package, install, uninstall, list, and pull CAPs on commerce instances.
Ships in b2c-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use the b2c CLI plugin to validate, package, install, uninstall, list, and pull Commerce App Packages (CAPs) and commerce features on Salesforce B2C Commerce instances.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli cap list).
The CLI auto-discovers the target instance and credentials from SFCC_* environment variables (including project .env), the selected project-local or shared dw.json, and configuration plugins. package.json supplies only non-sensitive defaults. Flags like --server, --client-id, and --client-secret are usually unnecessary — only pass them to override what's auto-detected.
Run b2c setup inspect to see the resolved configuration and which source provided each value (use --json for scripting; secrets stay masked by default). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
The remote commands (cap install, cap uninstall, cap tasks, cap pull, and cap list without --local) require OAuth for SCAPI-first system-job execution and WebDAV access for uploading/downloading archives. In auto mode, job execution temporarily falls back to OCAPI when SCAPI definitively rejects the start request. WebDAV authenticates via SFCC_USERNAME/SFCC_PASSWORD (BM username + WebDAV access key), --user-auth for interactive browser login, or an Account Manager OAuth client granted WebDAV permissions on the /impex path; SCAPI is not a substitute for the WebDAV upload. The local-only commands (cap validate, cap package, and cap list --local) need no credentials.
Authoring vs. operating: This skill covers operating on existing CAPs against an instance (validate, package, install, uninstall, list, tasks, pull). To author a new CAP — scaffold the structure, generate IMPEX, run registry-grade validation, or submit to the registry — install the
cap-devskills withb2c setup skills cap-dev, or via the commerce-apps marketplace:claude plugin marketplace add SalesforceCommerceCloud/commerce-appsthenclaude plugin install cap-dev. With the B2C MCP they're already available (start atskill://cap-dev/scaffold-app/SKILL.md).
# list all commerce features across all sites
b2c cap list
# list features for specific sites
b2c cap list --site-id RefArch,SiteGenesis
# list with full JSON output (includes config tasks and installation metadata)
b2c cap list --json
# list locally detected CAP directories
b2c cap list --local
Pull installed Commerce App source packages for cartridge deployment or Storefront Next (sfnext) development. Pulled apps are extracted into ./commerce-apps/{name}/. Depending on the app's architecture, a package may contain cartridges/ and impex/ data (backend or fullstack apps) and/or storefront-next/ extensions (UI-only or fullstack apps) ready for use with the sfnext CLI.
# pull all registry apps to ./commerce-apps
b2c cap pull
# pull a specific app by name
b2c cap pull avalara-tax
# pull to a custom output directory
b2c cap pull --output ./my-apps
# pull apps installed on a specific site
b2c cap pull --site-id RefArch
# show configuration tasks with clickable BM links
b2c cap tasks avalara-tax --site-id RefArch
# get tasks as JSON
b2c cap tasks avalara-tax --site-id RefArch --json
# validate a local CAP directory
b2c cap validate ./commerce-avalara-tax-app-v0.2.5
# validate a CAP zip file (cap package produces {id}-v{version}.zip)
b2c cap validate ./avalara-tax-v0.2.5.zip
# validate with JSON output
b2c cap validate ./commerce-avalara-tax-app-v0.2.5 --json
A CAP that includes app-configuration/tasksList.json must also include app-configuration/translations/. That directory needs every required default Business Manager locale, en-US.json must list every taskKey, and the other locale files must use the same task keys. When adminComponents.json is shipped, en-US.json must also cover each component attribute. Write the real translation in each locale file.
# package a CAP directory into a distributable zip
b2c cap package ./commerce-avalara-tax-app-v0.2.5
# package with a custom output path
b2c cap package ./commerce-avalara-tax-app-v0.2.5 --output ./dist/my-app.zip
Every cartridge under
cartridges/site_cartridges/andcartridges/bm_cartridges/must have a.projectfile.cap packageauto-creates an empty one for any cartridge missing it (existing.projectfiles, empty or full Eclipse XML, are left untouched);cap validatefails if any cartridge is still missing one.
# install a CAP directory on an instance
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch
# install a pre-packaged zip
b2c cap install ./avalara-tax-v0.2.5.zip --site-id RefArch
# install with a timeout
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --timeout 600
# skip validation before install
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --skip-validate
# remove the uploaded archive after install
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --clean-archive
# create a Storefront Next pull request for the app's storefront content
# (requires a repository connected to the storefront; off by default)
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --create-pr
# uninstall a commerce app (domain is looked up automatically)
b2c cap uninstall avalara-tax --site-id RefArch
See b2c cap --help for a full list of available commands and options in the cap topic.
b2c-cli:b2c-job - For running general jobs and site archive import/exportb2c-cli:b2c-site-import-export - For site archive structure and metadata XML patternsb2c-cli:b2c-code - For deploying cartridges pulled from Commerce AppsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cli28 skills in this plugin
/b2c-amManage Account Manager resources including API clients, users, roles, and organizations. Use this skill whenever the user needs to create or update API clients, onboard or offboard developers, assign Account Manager roles scoped to tenants, audit user permissions, look up organizations, or provision API clients for CI/CD pipelines. Also use when managing AM role assignments or querying Account Manager data — even if they just say "add a new developer" or "set up an API client". For instance-level Business Manager administration (BM roles, BM users, BM access keys, BM whoami), defer to the `b2c-cli:b2c-bm-users-roles` skill./b2c-bm-users-rolesManage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever the user needs to list or search BM users on a sandbox or production instance, identify which BM user an OAuth token resolves to ("whoami"), assign or revoke instance-level access roles, edit role permissions, look up a user's WebDAV / OCAPI / Storefront access key, or rotate access keys for SSO-managed users. Also use when the user asks "what's my BM login on sandbox X", "rotate my WebDAV password", "how do I make a custom BM role", "audit BM users on this instance", or "delete a stale BM user from a sandbox".Other plugins' skills for the same job