shopify-hydrogen

Build custom Shopify storefronts with Hydrogen, Remix routing, and Oxygen edge deployment.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill shopify-hydrogen-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shopify-hydrogen
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/headless-modern/shopify-hydrogen
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill shopify-hydrogen-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a custom headless Shopify storefront requires coordinating the Storefront API, server-side cart state, CDN caching strategies, and edge deployment, which is error-prone without a structured framework guide. ## Core Features & Use Cases - Project Scaffolding & Configuration: Set up a Hydrogen project with createHydrogenContext, Storefront API tokens, and session management wired through server.ts. - Storefront API Querying & Caching: Query products and collections with storefront.query using CacheLong, CacheShort, and CacheNone strategies matched to data volatility. - Server-Side Cart & Deployment: Implement cart actions with CartForm and cookie-based cart IDs, then deploy to Oxygen via the Shopify CLI or GitHub Actions. - Use Case: A fashion brand migrating from a legacy Shopify theme can scaffold a Hydrogen storefront, build product and collection routes with localized pricing via @inContext, and deploy automatically to Oxygen on every push to main. ## Quick Start Ask the AI to scaffold a Shopify Hydrogen storefront with a product detail route, a server-side cart, and an Oxygen deployment workflow.

Frequently Asked Questions about shopify-hydrogen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a headless Shopify storefront with Hydrogen?▼

Scaffold a project with npm create @shopify/hydrogen@latest, configure Storefront API tokens in .env, and wire createHydrogenContext in server.ts. Build routes using Remix file-based routing with storefront.query loaders, then deploy to Oxygen with shopify hydrogen deploy.

How to implement a shopping cart in Shopify Hydrogen?▼

Use Hydrogen's CartForm component and CartForm.getFormInput in a Remix action to handle LinesAdd, LinesUpdate, and LinesRemove. Persist the cart ID server-side in a signed session cookie via cart.setCartId rather than client-side state.

What caching strategy should Hydrogen storefront queries use?▼

Apply storefront.CacheLong() for catalog data like products and collections, CacheShort() for inventory-sensitive fields, and CacheNone() for personalized customer data. These map to CDN cache-control headers on Oxygen's edge network.

Does Hydrogen support international pricing and localization?▼

Yes, Hydrogen supports localization through the Storefront API's @inContext directive, which accepts language and country parameters per request. This returns localized prices and translated content for international markets.

Why does my Hydrogen cart lose state between page navigations?▼

Cart state is lost when the cart ID is stored in React state or localStorage instead of the session cookie. Call cart.setCartId(result.cart.id) and pass the returned headers in your action response to persist the cart server-side.

How do I deploy a Hydrogen storefront to Oxygen with CI/CD?▼

Use the Shopify/hydrogen-action@v1 GitHub Action with secrets for your shop domain and CLI token. Environment variables for production must be configured in the Shopify admin under the Hydrogen deployment settings, not only in .env.