b2c-cap
B2C CAP 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).
Configuration & Authentication
The CLI auto-discovers the target instance and credentials from SFCC_* environment variables, dw.json in the current or parent directories, ~/.mobify, package.json, and configuration plugins. 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, --unmask to reveal secrets). 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 both OCAPI access (for running the system job) and WebDAV access (for uploading/downloading archives). 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.