b2c-querying-data

b2c-querying-data is a skill for Claude Code from SalesforceCommerceCloud/b2c-developer-tooling. It costs 108 tokens per session (2,349 once invoked), scanned A, original, Apache-2.0.

A guide to querying Salesforce B2C Commerce data for products, customers, and orders. Salesforce B2C Commerce is an online-store platform.

In plain words
What is it for?
Use it when building product searches, looking up customer profiles or orders, paging through results, or investigating slow category pages.
Why use it?
It helps choose the right search method and avoid slow storefront pages or unstable background jobs. It also explains how to return results in pages instead of loading everything at once.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the b2c plugin — 20 skills shipped together

Good fit Use it when building product searches, looking up customer profiles or orders, paging through results, or investigating slow category pages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data
Install

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.

Any agent
npx skills add SalesforceCommerceCloud/b2c-developer-tooling --skill b2c-querying-data
Clone the repo
git clone --depth 1 https://github.com/SalesforceCommerceCloud/b2c-developer-tooling

Made for: Claude Code.

Or install b2c, the plugin that ships this one along with the rest of its 20 skills.

Wrote 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.

agentmods badge for b2c-querying-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data/github.svg)](https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data)
Your own site
<a href="https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data"><img src="https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data/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.

agentmods 80×15 button for b2c-querying-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data"><img src="https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/b2c-querying-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.02349
Opus 5.5 $0.00043 $0.00940
Sonnet 5.5 $0.00022 $0.00470
Haiku 4.5 $0.00011 $0.00235

Measured 21d ago against content hash 3a5a1aac36cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

b2c-querying-data scanned grade A with 0 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 21d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/b2c/skills/b2c-querying-data/SKILL.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Querying Data in B2C Commerce

Efficient data querying is critical for storefront performance and job stability. B2C Commerce provides index-backed search APIs and database query APIs—choosing the right one for each use case avoids performance problems.

Product Search (Storefront)

Use ProductSearchModel for all storefront product searches. It is index-backed and designed for high-traffic pages.

Basic Product Search

var ProductSearchModel = require('dw/catalog/ProductSearchModel');

var psm = new ProductSearchModel();
psm.setCategoryID('electronics');
psm.setOrderableProductsOnly(true); // Only in-stock products
psm.setSearchPhrase('laptop');
psm.search();

var hits = psm.getProductSearchHits();
while (hits.hasNext()) {
    var hit = hits.next();
    var productID = hit.productID;
    var minPrice = hit.minPrice;
    var maxPrice = hit.maxPrice;
}
hits.close();

Paging Search Results

Always page results—never load the full result set:

var ProductSearchModel = require('dw/catalog/ProductSearchModel');
var PagingModel = require('dw/web/PagingModel');

var psm = new ProductSearchModel();
psm.setCategoryID('mens-clothing');
psm.setOrderableProductsOnly(true);
psm.search();

var pagingModel = new PagingModel(psm.getProductSearchHits(), psm.count);
pagingModel.setPageSize(12);
pagingModel.setStart(0); // page offset

var pageElements = pagingModel.pageElements;
while (pageElements.hasNext()) {
    var hit = pageElements.next();
    // Render product tile
}

Getting Variation Data from Search Hits

Use ProductSearchHit methods instead of loading full product objects:

// GOOD: Get variation info from the search hit (index-backed)
var representedColors = hit.getRepresentedVariationValues('color');
var representedIDs = hit.getRepresentedProductIDs();
var minPrice = hit.getMinPrice();
var maxPrice = hit.getMaxPrice();

// BAD: Loading the full product and iterating variants (database-intensive)
var product = hit.product;
var variants = product.getVariants(); // Expensive!
var priceModel = product.getPriceModel(); // Expensive!

Read the full file on GitHub · 290 lines

Files

What ships with it

2 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.

Changes

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.

  1. 21d ago Changed 3a5a1aac36cd
  2. 1mo ago First seen · 290 lines · 108 tokens per session scan A 5908b8b8d320

Subscribe to this mod's changes

b2c-querying-data is a skill published in the GitHub repository SalesforceCommerceCloud/b2c-developer-tooling (56 stars, last pushed today), licensed Apache-2.0. It adds 108 tokens to every session and 2,349 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

x-osv

CLI for Google OSV database. Query vulnerabilities for packages, scan local projects for vulnerable dependencies. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill). Required Tool: Install osv-scanner for project scanning (see https://github.com/google/osv-scanner).

x-cmd/x-cmd · 72 tokens

daiso-cli

A command-line interface for searching Daiso and related Korean shopping, store, food, cinema, and convenience-store data through the Daiso project. It can return structured JSON for searches and comparisons.

hmmhmmhm/daiso-mcp · 160 tokens

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

goofish-reply-buyer

A Chinese-language workflow for handling buyer messages on Xianyu, a Chinese second-hand marketplace. It reviews conversations, classifies buyer intent, and drafts replies according to the seller’s rules, but waits for human approval before sending.

fancyboi999/goofish-cli · 160 tokens

postgresdb

Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…

ericrisco/rsc-harness · 91 tokens