/salesforce-commerce:sf-b2c-cartridgesfrom salesforce-commerce
Creates and modifies Salesforce B2C Commerce cartridges following SFRA architecture patterns, including directory structure, naming conventions, cartridge path configuration, and certification requirements.
Ships in salesforce-commerce. 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.
Build B2C Commerce cartridges following Salesforce Commerce Cloud architecture patterns.
Fetch live documentation FIRST:
Web-search for:
Web-fetch official sources:
Verify before coding:
app_custom_mysite/
├── cartridge/
│ ├── controllers/ # Route handlers
│ ├── models/ # Business logic
│ ├── scripts/ # Helpers, middleware
│ ├── templates/ # ISML + i18n resources
│ └── static/ # Compiled CSS/JS/images
└── cartridge.properties
| Directory | Contents | Notes |
|---|---|---|
controllers/ | Server-side JS route handlers | Each file exports route actions (e.g., Product-Show) |
models/ | Data models and business logic | Keep controllers thin; move logic here |
scripts/ | Utility helpers, middleware, services | Subdirs: helpers/, middleware/, services/ |
templates/default/ | ISML templates per locale | default/ is the fallback locale |
templates/resources/ | i18n .properties files | Resource bundles for Resource.msg() |
forms/default/ | XML form definitions | Server-side validation rules |
static/default/ | Compiled CSS, JS, images | Built from client/default/ source |
client/default/ | Source SCSS and JS | Input for webpack/sgmf-scripts build |
experience/components/ | Page Designer components | Visual merchandising building blocks |
| Prefix | Purpose | Example |
|---|---|---|
app_custom_* | Site-specific customizations | app_custom_mysite |
plugin_* | Reusable feature modules | plugin_wishlists |
int_* | Third-party integrations | int_paypal, int_stripe |
bm_* | Business Manager extensions | bm_custom_admin |
app_storefront_base | Base SFRA cartridge | Core framework (do not modify) |
modules/ | Shared modules (non-cartridge) | Utility libraries consumed by cartridges |
The cartridge path defines file resolution order (configured in Business Manager > Site Settings):
app_custom_mysite:plugin_wishlists:int_paypal:app_storefront_base
Resolution: Left to right. When SFCC resolves a file (e.g., controllers/Product.js), it searches each cartridge in path order and uses the first match. This enables non-destructive customization -- overlay specific files without modifying base cartridges.
Overlay constraints:
cartridge/ to overridemodule.superModule| Type | Contains | When to Use |
|---|---|---|
| Storefront | Controllers, templates, static assets | Customer-facing site logic |
| Integration | Service definitions, API clients | Third-party system connections |
| Plugin | Self-contained feature | Reusable cross-site features |
| Business Manager | BM extensions, custom modules | Admin panel customizations |
Controllers can extend base behavior using module.superModule:
// Pattern: extend base controller
// Fetch live docs for server.extend() API
var server = require('server');
server.extend(module.superModule);
// Add or override route actions here
This avoids duplicating the entire base controller when you only need to modify one action.
Required fields: cartridge ID and multi-language flag. Optional: version and compatibility version. Fetch live docs for the exact property key format (demandware.cartridges.<id>.*) before creating this file.
SFRA uses sgmf-scripts for compiling client-side SCSS and JS. Source files live in cartridge/client/default/ and compile to cartridge/static/default/. Webpack configuration maps entry points for JS bundles and SCSS compilation.
| Tool | Purpose |
|---|---|
sgmf-scripts --compile js | Compile client-side JavaScript |
sgmf-scripts --compile css | Compile SCSS to CSS |
sgmf-scripts --watch | Watch mode for development |
sfcc-ci | CLI for code upload and deployment automation |
| Category | Key Requirements |
|---|---|
| Technical | Compatible with latest SFRA; no hardcoded credentials; passes code profiler |
| Documentation | Installation guide, BM configuration steps, troubleshooting guide |
| Security | Input validation, CSRF protection, secure credential storage |
| Testing | Unit tests, integration tests, performance benchmarks, multi-site compatibility |
Pattern: upload cartridge code to a code version on the sandbox/instance, then activate that version in Business Manager. Use WebDAV upload or the sfcc-ci CLI tool for automation.
| Step | Action |
|---|---|
| 1 | Upload code to a named code version via WebDAV or sfcc-ci |
| 2 | Set the active code version in BM > Administration > Code Deployment |
| 3 | Update cartridge path in BM > Site Settings if new cartridges were added |
| 4 | Clear caches and verify storefront behavior |
# Pattern: scaffold a new cartridge
# Fetch live docs for sgmf-scripts CLI options
mkdir -p app_custom_mysite/cartridge/{controllers,models,scripts,templates/default}
app_custom_*; reusable features in plugin_*.app_storefront_base directory layout for clean overlays.module.superModule to extend controllers rather than copying entire files.scripts/helpers/; keep controllers thin.<isinclude> components.cartridge.properties version on each release.sfcc-ci for CI/CD pipeline integration.Fetch the SFRA GitHub repo, B2C Commerce cartridge development docs, and LINK certification guidelines for exact directory conventions, build tool APIs, and deployment procedures before implementing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sfcc, salesforce-commerce-cloud, sfra, cartridge-development, ecommerce
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin salesforce-commerce24 skills in this plugin
/js-modernWrite modern JavaScript and TypeScript — ES6+ features, async/await, modules, destructuring, optional chaining, TypeScript types. Covers SFCC server-side JS (CommonJS, limited ES6), PWA Kit (full modern JS/TS), and LWC JavaScript (Lightning Locker constraints). Use when writing JavaScript for Salesforce Commerce./node-backendBuild Node.js backends for Salesforce Commerce — SFCC server-side JavaScript (not actual Node.js runtime), PWA Kit backend (Express-like SSR server), Commerce SDK for server-side SCAPI access, and async patterns for external service integration. Use when building server-side commerce logic./react-patternsOther plugins' skills for the same job