/storefront-next:sfnext-seofrom storefront-next
Manages SEO metadata, JSON-LD structured data, canonical URLs, hreflang, and semantic URL builders for Storefront Next apps. Use when adding meta tags, fixing duplicate canonicals, or configuring seoRoutes.
Ships in storefront-next. 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.
Read when SKILL.md points to them.
In-project references: docs/README-SEO.md, docs/README-AEO-GEO.md, docs/README-MULTI-SITE.md (URL Config), docs/README-MULTI-DOMAIN.md, docs/README-BASE-PATH.md, docs/migrations/seo-url-rules/README.md. Read them for depth; this skill is the task map.
import { SeoMeta } from '@/components/seo-meta';
<SeoMeta title={t('meta.title', { defaultValue: 'My Page' })} description={t('meta.description', { defaultValue: '...' })} />
<SeoMeta title="Checkout" noIndex /> {/* private/transactional pages */}
<SeoMeta rawTitle title="Store Name" /> {/* no " | Site Name" suffix */}
<SeoMeta title={name} openGraph={{ type: 'product', url: pageUrl, image }} />
Props (verified in src/components/seo-meta/index.tsx): title, rawTitle, description, noIndex, siteName, twitter, openGraph. Open Graph input auto-derives X card tags unless twitter is set. Use noIndex for cart, checkout, account, and other non-public pages. Root-level canonical and hreflang descriptors come from src/utils/seo.ts and src/utils/canonical-url.ts; routes do not add them.
import { JsonLd } from '@/components/json-ld';
<JsonLd data={productSchema} id="product-schema" nonce={nonce} />
Pass the CSP nonce so the inline script is allowed. Builders live in src/utils/product-schema.ts, category-schema.ts, schema-url.ts. PDP emits Product; PLP emits CollectionPage + ItemList (see docs/README-AEO-GEO.md).
Canonical <link>, og:url and JSON-LD url must agree. In loaders:
import { buildSeoPageUrl } from '@/lib/seo/page-url.server';
import { redirectToCanonicalPath } from '@/lib/seo/canonical-redirect.server';
redirectToCanonicalPath(requestUrl); // 301 for trailing slash
const pageUrl = buildSeoPageUrl(context, requestUrl); // origin + canonical path/query
Only allowlisted query params survive in canonicals (CONTENT_PARAMS in src/utils/canonical-url.ts: q, offset, sort, refine, pid by default). Add a param only if it changes main page content, and add a test next to canonical-url.test.ts.
// config.server.ts
url: {
prefix: '/:siteId/:localeId',
seoRoutes: {
RefArchGlobal: { product: { prefix: 'p' }, category: { prefix: 'c', mode: 'id-suffix' } },
},
}
Key rules (full playbook in references/SEO-ROUTES.md):
seoRoutes requires a rebuild and redeploy (restart the dev server locally).seoRoutes is a manual copy that must be kept in sync./product/... strings:import { createProductUrl, createCategoryUrl } from '@/route-paths';
import { useSeoUrlContext } from '@/hooks/use-seo-url-context';
const ctx = useSeoUrlContext();
<Link to={createProductUrl({ productId, slug }, ctx)} />
seoFallback.sites in config supplies per-site fallback behavior when a SEO URL cannot be resolved; see docs/README-MULTI-SITE.md.
getAppOrigin (honors forwarded host, falls back to EXTERNAL_DOMAIN_NAME). Each custom domain must be attached to the Managed Runtime environment. See references/MULTI-DOMAIN-BASE-PATH.md.X-Site-Id header set by your CDN.MRT_ENV_BASE_PATH, set from the push config) prefixes asset and route URLs; use getBasePath() rather than hardcoding.Crawlers receive full HTML rendering; category pages stay crawlable through a ?page=N parameter with rel prev/next links, while the canonical stays the base category URL. Verify with curl and a crawler user agent. Check docs/README-SEO.md "Crawler Rendering and Pagination" before changing streaming behavior.
storefront-next:sfnext-routing - route modules and URL patternsstorefront-next:sfnext-configuration - config.server.ts and env overridesstorefront-next:sfnext-i18n - locales, hreflang inputsstorefront-next:sfnext-hybrid-storefronts - URLs owned by another storefrontstorefront-next:sfnext-security - CSP nonce for JSON-LDstorefront-next:sfnext-performance - streaming vs crawler renderingWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
seo, structured-data, canonical-urls, json-ld, open-graph, hreflang
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin storefront-next25 skills in this plugin
/sfnext-accessibilityBuild and fix accessible UI in a Storefront Next storefront (WCAG 2.1 AA): jsx-a11y lint findings, missing accessible names and labels, form error association, dialog focus management, aria-live status messages, keyboard behavior, color contrast, and verifying fixes with Storybook a11y/play() tests and the e2e axe scan with its baseline. Use for "accessibility", "a11y", "WCAG", "screen reader", "aria-label", "focus trap", "axe violation", pnpm lint:a11y, pnpm a11y, a11y-baseline.json, skip-a11y, STORYBOOK_A11Y_TEST_MODE, or an accessibility audit finding to fix. Do not use for general lint/typecheck gates (use `storefront-next:sfnext-quality-gates`), writing non-accessibility tests (use `storefront-next:sfnext-testing`), or color/token design (use `storefront-next:sfnext-theming`)./sfnext-analytics-consentStorefront Next analytics: engagement adapters (Einstein, Active Data, Data 360), adding a custom adapter, tracking consent gating, PageViewTracker, useAnalytics events, and first-touch attribution (dw_attribution). Use when configuring engagement.adapters in config.server.ts, writing an adapter with hasConsent, registering it in initializeEngagementAdapters, wiring the consent banner (trackingConsent, consentCategories, dw_dnt), firing trackViewProduct/trackCartItemAdd events, debugging why no analytics events are sent, or passing campaign attribution to orders. Do not use for general config loading or env vars (use `storefront-next:sfnext-configuration`), CSP/script allowlisting of third-party tags (use `storefront-next:sfnext-security`), or SEO meta/JSON-LD (use `storefront-next:sfnext-seo`)./sfnext-authenticationWork with Storefront Next's server-only authentication and session architecture (SLAS guest/registered tokens, httpOnly cookies, auth.server.ts middleware). Use for getAuth, useAuth, updateAuth, destroyAuth, protecting account routes, login/logout actions, guest-to-registered basket/wishlist merge, "session expired" redirects, 401 recovery loops, cc-at/cc-nx/usid/dwsid cookies, cookie names or expiry, passwordless login, social login, OTP email verification, passkeys, guest order lookup, or refresh-token lifetime settings. Do not use for Turnstile, CSP headers or cookie-domain config (use `storefront-next:sfnext-security`), calling SCAPI clients (use `storefront-next:sfnext-scapi`), or sharing sessions with SFRA (use `storefront-next:sfnext-hybrid-storefronts`)./sfnext-commerce-featuresCatalogue and router for optional Storefront Next commerce features: Shopper Context (qualifiers, source codes), Order Management returns/cancel/tracking (SOM/OMS), delivery estimates, feature stubs (@feature-stub), guest order lookup, the app_storefrontnext_base email cartridge, and the shipped extensions (bnpl, bopis, multiship, store-locator, ratings-reviews, customer-preferences, product-content, shipping-delivery, theme-switcher). For each: which flag, SLAS scope, Business Manager setting, cartridge, or extension registry entry it needs, and which in-project doc to read. Use when asked how to enable a feature, why a feature does not render, what prerequisites a feature has, or which stubs are mock data. Do not use for building a new extension (use `storefront-next:sfnext-extensions`), config loading (use `storefront-next:sfnext-configuration`), or SLAS login flows (use `storefront-next:sfnext-authentication`)./sfnext-componentsBuild and modify UI components in a Storefront Next storefront: page components with Suspense and use()/Await, createPage and withSuspense, Tailwind v4 token classes, shape tokens (rounded-ui, shadow-ui, border-ui), shadcn/ui primitives in src/components/ui (sync-shadcn), CVA variants, data-slot, DynamicImage, lazy-loaded overlays, and Storybook stories with snapshot tests. Use when creating or editing a component in src/components, adding a shadcn primitive, fixing styling that ignores the theme, writing a *.stories.tsx file, or running pnpm storybook:test. Do not use for re-branding colors, fonts, or logos (use `storefront-next:sfnext-theming`), route loaders (use `storefront-next:sfnext-data-fetching`), or Page Designer registration (use `storefront-next:sfnext-page-designer`)./sfnext-configurationConfigure a Storefront Next app: config.server.ts (defineConfig, metadata/runtime/app), AppConfig types in src/types/config.ts, PUBLIC__ environment variable overrides, getConfig(context) / useConfig(), extension config (app.extension, app.serverExtension), protected paths, server-only secrets, and multi-site settings (commerce.sites, url.prefix, seoRoutes, siteAliasMap, cookie domain). Use when editing config.server.ts, adding a config value, an env var is ignored or "not applied", `pnpm config:inspect` / `config:push-env`, "Ignoring environment variable" warnings, protected config path errors, setting up a second site or locale URLs, or going through the pre-launch config checklist. Do not use for creating a project or the npm script list (use `storefront-next:sfnext-project-setup`), pushing bundles or MRT env management (use `storefront-next:sfnext-deployment` / `b2c-cli:b2c-mrt`), or hybrid proxy and cookie-sharing with SFRA (use `storefront-next:sfnext-hybrid-storefronts`).Other plugins' skills for the same job