Guide for wiring Hydrogen request handlers in server frameworks. Use when adding, modifying, or reviewing handleShopifyRoutes, handleShopifyRedirects, SFAPI proxy routes, cart, predictive search, and Customer Account server handlers, UCP business profiles,…
Guide for Hydrogen route templates and Shopify storefront URL routing. Use when adding, modifying, or reviewing createShopifyRouteTemplates, routeTemplates, custom Shopify resource or utility-page paths, handleShopifyRoutes, standard route redirects,…
Migrate a classic Hydrogen storefront (Remix or React Router 7) to Hydrogen 2026-10 (`@shopify/hydrogen@^2026.10.0`), where Hydrogen is a server-handler library you compose instead of a framework that owns the request. Use when the user asks to migrate or…
Guide for @shopify/hydrogen — the type-safe Storefront API GraphQL client. Use when writing, modifying, or reviewing code that creates a storefront client, writes GraphQL queries with gql(), handles SFAPI errors, or wires up storefront data fetching in any…
Smoke-test checklist for Hydrogen storefronts built by agents. Use after creating or modifying a Hydrogen storefront, setup flow, cart, product page, collection/search browsing, analytics, request handlers, Shopify redirects, Shop Pay, or framework middleware…
Audit and adapt an existing Hydrogen storefront for Shopify Oxygen and local MiniOxygen. Use when asked to make a server-capable Hydrogen project Oxygen-compatible, add or repair its Worker server entrypoint, configure MiniOxygen, remove Node runtime…
Guide for building predictive search with @shopify/hydrogen. Use when adding, modifying, or reviewing autocomplete/search-as-you-type UI, predictive search route handlers, tracking URLs, custom predictive search fragments, or framework predictive search…
Branch map for the Shopify/hydrogen repo: where the new version of Hydrogen (informally "Hydrogen 3") vs classic Hydrogen (informally "Hydrogen 2") live, the June–October 2026 divergence between them, and which branch to target or rebase onto. Use when…
Behavioral guide for building cart UI with @shopify/hydrogen: line items, quantity and remove controls, optimistic updates, discount, note, and cart attribute inputs, and the full-page /cart fallback. Use when writing, modifying, or reviewing cart line-item…
Create, upgrade, or maintain the canonical source for the Oxygen-ready React Router template under templates/react-router. Use for a professional React Router starter with MiniOxygen/Vite dev setup, a Worker server entrypoint, env-driven configuration, Oxygen…
Behavioral guide for building product variant selection UI with @shopify/hydrogen. Use when writing, modifying, or reviewing product option selectors, variant pickers, or add-to-cart forms. Framework agnostic.
Guide for adding or reviewing Hydrogen storefront analytics. Use when working with ShopifyScripts analytics, AnalyticsEvent, consent mode, page/product/ collection/search/cart view events, cart update tracking, custom analytics destinations, or framework…
Customer Account API setup for Hydrogen storefronts. Use when wiring customer sessions, login/logout/OAuth route handlers, account profile, order history, account-gated UI, cart buyer identity sync, or Customer Account GraphQL queries.
Guide for building collection and search browsing UI with @shopify/hydrogen. Use when creating, modifying, or reviewing collection routes, search results, product grids, filters, sort controls, active filter chips, or URL-synced browse state in storefront…
Error handling and logging policy for @shopify/hydrogen: when to throw, when to log through the logging contract, when to expose reactive state, and how tests assert failures. Always use when developing or reviewing runtime logic for the @shopify/hydrogen…
Behavioral guide for reading and writing cart metafields with @shopify/hydrogen. Use when adding, modifying, or reviewing cart metafield reads or writes, an app-owned cart metafield route, cart-to-order metafield copying, or custom cart data such as delivery…
Guide for adding or reviewing Shop Pay buttons in Hydrogen storefronts. Use when working with ShopPayButton, renderShopPayButton, createShopPayButton, product buy buttons, cart checkout acceleration, variant IDs, quantities, or source attribution attributes.
Guide for building an accessible cart drawer using @shopify/hydrogen. Use when creating or reviewing a cart drawer, mini cart, or slide-out cart, including native dialog element (showModal), closedby light dismiss, body scroll lock, exit animations, and…
Use when writing, reviewing, or debugging Playwright tests in this repository. Applies to e2e specs, Playwright fixtures, locator strategy, wait/assertion patterns, test group prerequisite/matcher checks, and Hydrogen storefront test flows.
Helper-only sizing of Shopify CDN image URLs. Use when rendering Storefront API images in product/collection cards, PDP galleries, PLP heroes, cart thumbnails, or other img element surfaces.
Guide for formatting Shopify money values in Hydrogen storefronts. Use when rendering product prices, compare-at prices, cart totals, collection price ranges, Shop Pay prices, or any MoneyV2 amount/currencyCode values.