/salesforce-commerce:sf-b2c-sfrafrom salesforce-commerce
Guides SFRA-based B2C Commerce storefront development: cartridge overlay, MVC pattern, module.superModule inheritance, middleware chain, and site-specific customizations.
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.
Fetch live docs:
github.com/SalesforceCommerceCloud/storefront-reference-architecture for SFRA sourcesite:developer.salesforce.com SFRA architecture MVC for MVC patternssite:developer.salesforce.com SFRA cartridge overlay for overlay best practicessite:developer.salesforce.com module.superModule for extension patternssite:developer.salesforce.com SFRA getting started for latest docsSFRA (Storefront Reference Architecture) is the reference implementation for B2C Commerce storefronts:
| Principle | Rule |
|---|---|
| Overlay | Never modify app_storefront_base -- create custom cartridges that layer on top |
| Extend | Use module.superModule to inherit and augment, not replace |
| Hooks | Use commerce hooks for order, payment, and shipping customization |
| Services | Use the Service Framework for external integrations (payment gateways, ERP) |
The cartridge path (configured in Business Manager) resolves files left-to-right. The leftmost cartridge wins.
Example path: app_custom:app_storefront_base
controllers/Product.js checks app_custom first, falls back to app_storefront_baseapp_custom/cartridge/
├── controllers/ # Route handlers
├── models/ # Data models
├── scripts/ # Helpers, services
├── templates/ # ISML templates
├── experience/ # Page Designer
└── client/default/ # JS + SCSS source (Webpack)
module.superModule resolves to the next cartridge in the path that provides the same module. This is how you extend without duplicating:
var base = module.superModule; server.extend(base); then use append/prepend/replacebase.call(this, apiProduct, options), then add properties| Layer | Location | Role |
|---|---|---|
| Controller | controllers/*.js | Route handling via server module |
| Model | models/**/*.js | Transform API data to view-friendly objects |
| View | templates/default/**/*.isml | ISML templates for HTML rendering |
| Client JS | client/default/js/ | Browser-side behavior (Webpack bundled) |
| SCSS | client/default/scss/ | Styles (compiled to CSS) |
| Approach | When | Trade-off |
|---|---|---|
server.extend(base) + append | Adding data, logging, analytics | Keeps base logic; auto-receives base updates |
server.replace('Route', fn) | Fundamentally different logic | You own the entire implementation; no base updates |
Prefer extend + append in nearly all cases. Only replace when the base logic is wrong for your use case.
SFRA uses Webpack to build client assets from client/default/js/ and client/default/scss/. Output goes to cartridge/static/default/. Client JS can extend base modules:
// Pattern: Extend base client module
var base = require('base/product/detail');
// Fetch live docs for base module API
Site.getCurrent().getCustomPreferenceValue('prefName') -- store-level configurationCustomObjectMgr.getCustomObject('Type', 'key') -- custom data structuresdw.* APIapp_storefront_baseapp_custom_[sitename] or int_custom_[feature]module.superModule to extend -- avoid code duplicationserver.extend() to inherit base routesnext() in middleware chain<isinclude> for reusable componentsResource.msg('key', 'bundle', null)Transaction.wrap() for all database writesCacheMgrFetch the SFRA GitHub repository, developer documentation, and module.superModule guide for exact patterns, API references, and best practices before implementing.
What SKILL.md sets; muted values are Claude Code's defaults
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