Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add finsilabs/awesome-ecommerce-skills --skill sfcc-ocapi-scapigit clone --depth 1 https://github.com/finsilabs/awesome-ecommerce-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/sfcc-ocapi-scapi)<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/sfcc-ocapi-scapi"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/sfcc-ocapi-scapi/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/sfcc-ocapi-scapi"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/sfcc-ocapi-scapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.03634 |
| Opus 5 | $0.00017 | $0.01817 |
| Sonnet 5 | $0.00007 | $0.00727 |
| Haiku 4.5 | $0.00003 | $0.00363 |
Grade B, and why
sfcc-ocapi-scapi scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
const response = await fetch("https://account.demandware.com/dwsso/oauth2/access_token", { method: "POST", Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const authResponse = await fetch(authorizeUrl.toString(), { redirect: "manual" }); How it starts
The opening of the file, as written. The whole thing — 411 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SFCC OCAPI and Shopper APIs
Overview
Salesforce B2C Commerce provides two API families: the legacy Open Commerce API (OCAPI) using Basic Auth or OAuth and the modern Commerce API (SCAPI/Shopper APIs) using SLAS (Shopper Login and API Access Service) tokens. SCAPI is the recommended approach for headless storefronts, PWA Kit, and third-party integrations. OCAPI remains the primary Data API for server-side admin operations (product import, order management, promotion management). The Composable Storefront (formerly PWA Kit) is built entirely on SCAPI.
When to Use This Skill
- When building a headless B2C storefront using SFCC as the commerce backend
- When implementing the Salesforce PWA Kit (Composable Storefront) with custom API calls
- When integrating a mobile app with SFCC product catalog, cart, and checkout
- When building server-side order management integrations using OCAPI Data API
- When migrating an existing OCAPI integration to the newer SCAPI endpoints
- When implementing SLAS token management for customer authentication flows
Core Instructions
-
Understand the API landscape
API Auth Use Case SCAPI Shopper APIs SLAS guest/customer token Headless storefront, product search, cart, checkout OCAPI Shop API Basic/OAuth Storefront operations from trusted server contexts OCAPI Data API Client credentials Admin operations: product import, order management, promotions SCAPI Admin APIs Client credentials Modern admin operations (gradually replacing OCAPI Data API) Base URL pattern:
https://{shortCode}.api.commercecloud.salesforce.com/ -
Authenticate with SLAS (Shopper Login and API Access Service)
// lib/sfcc-auth.ts const SLAS_BASE = `https://${process.env.SFCC_SHORT_CODE}.api.commercecloud.salesforce.com/shopper/auth/v1`; const ORG_ID = process.env.SFCC_ORG_ID!; // f_ecom_xxx format const CLIENT_ID = process.env.SFCC_SLAS_CLIENT_ID!; // Step 1: Get PKCE code challenge for guest token function generateCodeChallenge(): { verifier: string; challenge: string } { const nodeCrypto = require("crypto"); const verifier = nodeCrypto.randomBytes(32).toString("hex"); const hash = nodeCrypto.createHash("sha256").update(verifier).digest("base64url"); return { verifier, challenge: hash }; } // Get a guest access token export async function getGuestToken(): Promise<{ access_token: string; refresh_token: string }> { const { verifier, challenge } = generateCodeChallenge(); // Step 1: Authorize (get auth code) const authorizeUrl = new URL(`${SLAS_BASE}/organizations/${ORG_ID}/oauth2/authorize`); authorizeUrl.searchParams.set("client_id", CLIENT_ID); authorizeUrl.searchParams.set("channel_id", process.env.SFCC_SITE_ID!); authorizeUrl.searchParams.set("redirect_uri", process.env.SFCC_SLAS_REDIRECT_URI!); authorizeUrl.searchParams.set("response_type", "code"); authorizeUrl.searchParams.set("code_challenge", challenge); authorizeUrl.searchParams.set("hint", "guest"); // SFCC returns a redirect — extract the code from the Location header const authResponse = await fetch(authorizeUrl.toString(), { redirect: "manual" }); const location = authResponse.headers.get("location") ?? ""; const code = new URL(location).searchParams.get("code") ?? ""; // Step 2: Exchange code for token const tokenResponse = await fetch( `${SLAS_BASE}/organizations/${ORG_ID}/oauth2/token`, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ grant_type: "authorization_code_pkce", code, code_verifier: verifier, client_id: CLIENT_ID, redirect_uri: process.env.SFCC_SLAS_REDIRECT_URI!, channel_id: process.env.SFCC_SITE_ID!, }), } ); return tokenResponse.json(); } // Refresh an access token export async function refreshToken(refreshToken: string) { const response = await fetch(`${SLAS_BASE}/organizations/${ORG_ID}/oauth2/token`, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ grant_type: "refresh_token", refresh_token: refreshToken, client_id: CLIENT_ID, }), }); return response.json(); }
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/ocapi-data-api-admin-operations-and-orde/criteria.json 2.9 KB
- evals/ocapi-data-api-admin-operations-and-orde/task.md 2.1 KB
- evals/scapi-headless-catalog-integration-with-/criteria.json 2.8 KB
- evals/scapi-headless-catalog-integration-with-/task.md 1.9 KB
- evals/slas-authentication-and-session-manageme/criteria.json 3.0 KB
- evals/slas-authentication-and-session-manageme/task.md 2.1 KB
- tile.json 209 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 411 lines · 34 tokens per session scan B eee4f765f10f
sfcc-ocapi-scapi is a skill published in the GitHub repository finsilabs/awesome-ecommerce-skills (52 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 3,634 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
b2c-custom-job-steps
Create custom job steps for B2C Commerce batch processing. Use this skill whenever the user needs to write a batch job, data export script, scheduled cleanup task, or any server-side processing that runs on a schedule. Also use when they ask about steptypes.json, chunk-oriented vs task-oriented job steps…
b2c-business-manager-extensions
Build Business Manager extension cartridges with custom admin tools, menu items, and dialog actions. Use this skill whenever the user needs to create bm cartridges, add menu actions or dialog buttons in BM, configure bmextensions.xml, or extend admin pages with form overlays. Also use when customizing the BM interface…
b2c-custom-api-development
Develop Custom SCAPI REST endpoints with api.json routes, schema.yaml definitions, and OAuth scope configuration. Use this skill whenever the user needs to create a custom API on the Commerce platform, define OpenAPI 3.0 schemas for request/response, structure the rest-apis cartridge folder, or debug endpoint…
b2c-metadata
Define custom attributes, custom object types, and site preferences for B2C Commerce using metadata XML. Use this skill whenever the user needs to add a field to products, orders, or customers, create a new custom object type, set up site preferences, or extend the B2C data model. Also use when they ask about…
b2c-scapi-admin
Build backend integrations that sync data between B2C Commerce and external systems like ERPs, OMS, WMS, or CRMs using SCAPI Admin APIs. Use this skill whenever the user needs to pull or push orders, products, inventory, or customer data programmatically from a backend service, set up server-to-server authentication…
b2c-scapi-shopper
Call Shopper Commerce APIs (SCAPI) from headless storefronts and composable commerce apps. Use this skill whenever the user is building with PWA Kit, Storefront Next (SFNext), or a headless frontend and needs to search products, manage baskets, submit orders, access customer data, or set shopper context. Also use when…