sfnext-data-fetching

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

A guide to server-side data fetching in Storefront Next using loaders, actions, and an interactive fetcher. Server-side fetching means the commerce data is requested by the server rather than directly by the visitor's browser.

In plain words
What is it for?
Use it to load initial page data, handle mutations such as cart updates, and implement features such as search suggestions or infinite scrolling.
Why use it?
It clarifies which data-loading pattern to use for page loads, form submissions, and on-demand interactions, including streaming responses.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the storefront-next plugin — 24 skills shipped together

Good fit Use it to load initial page data, handle mutations such as cart updates, and implement features such as search suggestions or infinite scrolling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/salesforcecommercecloud/b2c-developer-tooling/sfnext-data-fetching
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 sfnext-data-fetching
Clone the repo
git clone --depth 1 https://github.com/SalesforceCommerceCloud/b2c-developer-tooling

Made for: Claude Code.

Or install storefront-next, the plugin that ships this one along with the rest of its 24 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 sfnext-data-fetching

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/sfnext-data-fetching"><img src="https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/sfnext-data-fetching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,456 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.00224 $0.02456
Opus 5.5 $0.00090 $0.00982
Sonnet 5.5 $0.00045 $0.00491
Haiku 4.5 $0.00022 $0.00246

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

Security

Grade A, and why

sfnext-data-fetching 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 15d 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/storefront-next/skills/sfnext-data-fetching/SKILL.md · 141 lines

How it starts

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

Storefront Next Data Fetching

All data comes from the server. Loaders and actions run on the server with the shopper's session; the browser never calls SCAPI directly. Your project ships docs/README-DATA.md, docs/README-SUSPENSE.md, docs/README-SCAPI-NON-PERSONALIZED-RESPONSES.md and docs/README-SHOPPER-CONTEXT.md, plus the "Performance & Data Rules" in AGENTS.md; this skill is the quick path, those are authoritative.

The rules (same as AGENTS.md)

  1. Fetch on the server in loader (reads) and action (writes). There is no clientLoader or clientAction.
  2. Classify every piece of data:
    • Critical (needed for SEO, LCP, layout stability or the HTTP status): await it in the loader.
    • Non-critical (below the fold, recommendations, reviews, secondary panels): start the request, do not await it, and return the unresolved promise so it streams.
    • Interaction-driven (only after a click, hover or input): fetch on demand with a fetcher.
  3. Never block a loader on non-critical data.
  4. Pass the promise through loaderData and read it under its own <Suspense> with use() or <Await>. Keep the promise identity stable (compose it in the loader, never Promise.all or .then in render).
  5. Export shouldRevalidate on routes whose loaders depend on URL filters (see storefront-next:sfnext-revalidation).

Loader with critical and streamed data

import { Suspense } from 'react';
import { Await } from 'react-router';
import type { Route } from './+types/_app.example';
import { createApiClients } from '@/lib/api-clients.server';
import { fetchProductById } from '@/lib/api/products.server';
import { NormalizedApiError } from '@/lib/api/normalized-api-error';

export async function loader({ context, params }: Route.LoaderArgs) {
    const clients = createApiClients(context);

    // Non-critical: start now, do not await.
    const related = clients.shopperSearch
        .productSearch({ params: { query: { q: 'shirt', limit: 8 } } })
        .then(({ data }) => data.hits ?? []);

    // Critical: needed for status, SEO and LCP.
    try {
        const product = await fetchProductById(context, params.id ?? '', { expand: ['images', 'prices'] });
        if (!product) throw new Response('Not found', { status: 404 });
        return { product, related };
    } catch (e) {
        if (e instanceof NormalizedApiError && e.status) throw new Response(e.message, { status: e.status });
        throw e;
    }
}

export default function Example({ loaderData }: Route.ComponentProps) {
    return (
        <>
            <h1>{loaderData.product.name}</h1>
            <Suspense fallback={<div className="h-40" aria-busy="true" />}>
                <Await resolve={loaderData.related}>{(hits) => <ul>{hits.map((h) => <li key={h.productId}>{h.productName}</li>)}</ul>}</Await>
            </Suspense>
        </>
    );
}

Read the full file on GitHub · 141 lines

Files

What ships with it

5 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. 15d ago Changed · -50 lines · +149 tokens per session 4c20956cee09
  2. 1mo ago First seen · 191 lines · 75 tokens per session scan A 247b77fb8035

Subscribe to this mod's changes

sfnext-data-fetching is a skill published in the GitHub repository SalesforceCommerceCloud/b2c-developer-tooling (56 stars, last pushed today), licensed Apache-2.0. It adds 224 tokens to every session and 2,456 once invoked, about $0.0009 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-09-03.

Related

Other skills, from other repositories

grow-payment-gateway

Integrate Grow by Meshulam payment gateway into Israeli applications -- covers payment pages (iframe/redirect/SDK), tokenization, recurring billing, payment links, refunds, invoices, webhooks, and 3DS authentication via the Grow Light API. Use when user asks to accept payments via Grow or Meshulam, set up "slikat…

squadcodercom/squadcoder · 274 tokens

shopify-app-development

Build embedded Shopify apps using the Remix framework, App Bridge for UI integration, Polaris components, and OAuth authentication flow.

finsilabs/awesome-ecommerce-skills · 27 tokens

israeli-shipping-manager

Build and manage shipping integrations with Israeli carriers, including Israel Post, Cheetah, HFD, Mahir Li, GetPackage, and UPS Israel, plus locker pickup services (BOX2GO, Shlager, Done, UPS lockers). Use when user asks about "shipping Israel", "Cheetah delivery", "meshloach", "shipping label", "HFD", "locker pickup…

squadcodercom/squadcoder · 207 tokens

sfcc-ocapi-scapi

Integrate with Salesforce Commerce Cloud's headless APIs (OCAPI and Shopper APIs) to build custom storefronts and mobile commerce experiences.

finsilabs/awesome-ecommerce-skills · 34 tokens

convex-billing

Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).

openclaw/clawhub · 29 tokens

wikipedia

Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.

x-cmd/x-cmd · 49 tokens