/storefront-next:sfnext-quality-gatesfrom storefront-next
Runs Storefront Next quality gates before PR/deploy: OxLint, Biome formatting, typecheck, bundle-size budgets, Lighthouse CI, and pre-PR checklist. Use when lint/format/typecheck/bundlesize/lighthouse CI fails.
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.
Your project enforces style, types, size and accessibility with a few commands. CI runs the same ones, and lint is strict: any warning fails.
pnpm lint # OxLint (type-aware, --max-warnings 0) then Biome format check
pnpm typecheck # route typegen + tsc --noEmit
pnpm test # unit tests
pnpm storybook:test --type=snapshot # if you touched components or stories
pnpm bundlesize # if you added dependencies or large components
If you changed UI, also run pnpm storybook:test --type=interaction and --type=a11y (needs pnpm exec playwright install chromium). Fix formatting and auto-fixable lint in one go with pnpm lint:fix.
| Command | What it does |
|---|---|
pnpm lint | oxlint --type-aware --report-unused-disable-directives --max-warnings 0 (e2e excluded) then biome format check, then the e2e package's own lint |
pnpm lint:fix | oxlint --fix then biome format --write |
pnpm format / pnpm format:check | Biome formatting only (4-space indent, 120 columns, single quotes in JS, double in JSX) |
pnpm lint:a11y | Reports only jsx-a11y/* findings; exit 1 if any (see storefront-next:sfnext-accessibility) |
pnpm lint:css | After a build, checks the built app stylesheet for Tailwind candidates that only come from stories, tests or docs (dead or story-only classes). Run pnpm build first |
pnpm typecheck | react-router typegen then tsc --noEmit (uses extra heap) |
node scripts/check-typescript-only.js | Fails if .js/.jsx/.mjs/.cjs exist under src/ |
pnpm bundlesize | Builds with BUNDLES_SIZE_CHECK=true; fails if chunks exceed limits in package.json#bundlesize (client and server lists) |
pnpm bundlesize:compare | Compares two bundle metadata files: node scripts/compare-bundlesize.mjs --baseline <path> --candidate <path> [--tolerance <pct>] |
pnpm lighthouse:ci | lhci autorun using lighthouserc.cjs (build first; it starts the preview server itself) |
pnpm config:inspect | Prints the resolved config to debug env overrides |
ESLint and Prettier are not used. OxLint owns all linting (including type-aware rules and custom plugin rules); Biome owns only formatting.
custom/color-linter: use design tokens (bg-primary, text-muted-foreground), not hard-coded colors. See storefront-next:sfnext-theming.custom/header-format: every TS/JS file needs the Apache 2.0 license header. Copy it from any existing source file.jsx-a11y/* recommended set at error, plus no-aria-hidden-on-focusable, anchor-ambiguous-text, no-redundant-roles (allows role="list" on ul) and alt-text extended to DynamicImage and ProductImage.no-restricted-imports: browser-only @salesforce/storefront-next-runtime/i18n/client is blocked from server modules.src/.Fix the code rather than disabling. If a suppression is truly needed, use a scoped // oxlint-disable-next-line <rule> -- reason. --report-unused-disable-directives fails stale ones. Generated and vendored trees (SCAPI generated clients, src/components/ui/**, build output) are skipped by lint and format.
More: references/lint-and-budgets.md and docs/README-LINTING.md (skip the sections about repository internals that do not apply to your project).
| Symptom | Fix |
|---|---|
pnpm lint fails only at the end on formatting | pnpm format |
| Warning count > 0 | Warnings are errors here; fix or justify with a scoped disable |
jsx-a11y/... error | Fix markup; run pnpm lint:a11y while iterating |
Type errors about +types/... routes | Run pnpm typecheck (it regenerates route types) |
pnpm lint:css cannot find stylesheet | Run pnpm build first |
| Lighthouse/bundle budget exceeded after adding a feature | See the budget notes in the reference; look for eager imports before raising a limit |
storefront-next:sfnext-testing - unit, story and e2e tests (the test half of the checklist)storefront-next:sfnext-accessibility - fixing a11y lint and scan findingsstorefront-next:sfnext-performance - reducing bundle and page weightstorefront-next:sfnext-theming - design tokens behind color-linterstorefront-next:sfnext-deployment - build and push after the gates passWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
quality-gates, pre-pr-checklist, oxlint, biome, lighthouse-ci, bundle-size
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