headless-hydrogen

headless-hydrogen is a skill for Claude Code, Codex from dragnoir/Shopify-agent-skills. It costs 62 tokens per session (2,729 once invoked), scanned A, original, MIT.

A guide to Hydrogen, Shopify’s React framework for building a custom storefront separately from Shopify’s standard theme system, and Oxygen, Shopify’s hosting service for it.

In plain words
What is it for?
Use it to create headless Shopify stores, fetch storefront data, build custom React pages and components, connect custom technology stacks, and deploy to Oxygen.
Why use it?
It explains the tools and structure needed when the storefront needs a React-based implementation while still using Shopify’s commerce data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create headless Shopify stores, fetch storefront data, build custom React pages and components, connect custom technology stacks, and deploy to Oxygen.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dragnoir/shopify-agent-skills/headless-hydrogen
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 dragnoir/Shopify-agent-skills --skill headless-hydrogen
Clone the repo
git clone --depth 1 https://github.com/dragnoir/Shopify-agent-skills

Made for: Claude Code, Codex.

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 headless-hydrogen

README.md
[![agentmods](https://agentmods.dev/badge/skills/dragnoir/shopify-agent-skills/headless-hydrogen/github.svg)](https://agentmods.dev/skills/dragnoir/shopify-agent-skills/headless-hydrogen)
Your own site
<a href="https://agentmods.dev/skills/dragnoir/shopify-agent-skills/headless-hydrogen"><img src="https://agentmods.dev/badge/skills/dragnoir/shopify-agent-skills/headless-hydrogen/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 headless-hydrogen

Your own site · 80×15
<a href="https://agentmods.dev/skills/dragnoir/shopify-agent-skills/headless-hydrogen"><img src="https://agentmods.dev/badge/skills/dragnoir/shopify-agent-skills/headless-hydrogen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00062 $0.02729
Opus 5 $0.00031 $0.01365
Sonnet 5 $0.00012 $0.00546
Haiku 4.5 $0.00006 $0.00273

Measured 11d ago against content hash 7abf211fc0bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

headless-hydrogen scanned grade A with 1 finding 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 11d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(endpoint, {
skills/headless-hydrogen/SKILL.md · 472 lines

How it starts

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

Headless Commerce with Hydrogen

When to use this skill

Use this skill when:

  • Building a custom headless storefront
  • Using Hydrogen framework for e-commerce
  • Deploying to Oxygen (Shopify's edge hosting)
  • Working with the Storefront API
  • Creating high-performance, custom storefronts
  • Integrating Shopify with custom tech stacks

What is Hydrogen?

Hydrogen is Shopify's official headless commerce framework built on:

  • React Router - For routing and data loading
  • React - Component-based UI
  • GraphQL - Data fetching from Storefront API
  • Oxygen - Global edge deployment (free hosting)

Key Benefits

  • Build-ready components - Pre-built commerce components
  • Free hosting - Deploy to Oxygen at no extra cost
  • Fast by default - SSR, progressive enhancement, nested routes
  • Shopify-native - Deep integration with Shopify APIs

Getting Started

1. Create a Hydrogen App

# Create new Hydrogen project
npm create @shopify/hydrogen@latest

# Follow the prompts:
# - Choose a template (Demo store, Hello World, Skeleton)
# - Enter your store URL
# - Select JavaScript or TypeScript

2. Project Structure

hydrogen-app/
├── app/
│   ├── components/        # React components
│   ├── routes/            # Page routes
│   │   ├── _index.tsx     # Home page
│   │   ├── products.$handle.tsx  # Product page
│   │   └── collections.$handle.tsx
│   ├── styles/            # CSS files
│   ├── entry.client.tsx   # Client entry
│   └── entry.server.tsx   # Server entry
├── public/                # Static assets
├── .env                   # Environment variables
├── hydrogen.config.ts     # Hydrogen config
└── package.json

3. Environment Setup

# .env
SESSION_SECRET=your-session-secret
PUBLIC_STOREFRONT_API_TOKEN=your-storefront-api-token
PUBLIC_STORE_DOMAIN=your-store.myshopify.com

4. Start Development

npm run dev

Core Concepts

Routes and Data Loading

// app/routes/products.$handle.tsx
import { useLoaderData, type LoaderFunctionArgs } from "@remix-run/react";

export async function loader({ params, context }: LoaderFunctionArgs) {
  const { storefront } = context;
  const { handle } = params;

  const { product } = await storefront.query(PRODUCT_QUERY, {
    variables: { handle },
  });

  if (!product) {
    throw new Response("Not Found", { status: 404 });
  }

  return { product };
}

export default function ProductPage() {
  const { product } = useLoaderData<typeof loader>();

  return (
    <div className="product-page">
      <h1>{product.title}</h1>
      <p>{product.description}</p>
      <ProductPrice data={product} />
      <AddToCartButton variantId={product.variants.nodes[0].id} />
    </div>
  );
}

const PRODUCT_QUERY = `#graphql
  query Product($handle: String!) {
    product(handle: $handle) {
      id
      title
      description
      handle
      variants(first: 1) {
        nodes {
          id
          price {
            amount
            currencyCode
          }
        }
      }
      featuredImage {
        url
        altText
      }
    }
  }
`;

Read the full file on GitHub · 472 lines

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. 11d ago First seen · 472 lines · 62 tokens per session scan A 7abf211fc0bb

Subscribe to this mod's changes

headless-hydrogen is a skill published in the GitHub repository dragnoir/Shopify-agent-skills (48 stars, last pushed 7mo ago), licensed MIT. It adds 62 tokens to every session and 2,729 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sfnext-extensions

Build extensions for Storefront Next using target-config.json, target points, extension routes, and translation namespaces. Use when creating modular features, inserting components into UI targets, adding extension routes, adding a section to an existing page, or using SFDCEXT integration markers. Covers the…

SalesforceCommerceCloud/b2c-developer-tooling · 96 tokens

sfnext-page-designer

Integrate Page Designer with Storefront Next using React decorators, component registry, and Region rendering. Use when creating merchant-editable pages, adding Page Designer components with @Component/@AttributeDefinition decorators, using fetchPageFromLoader, or rendering Regions. This is for the React/Storefront…

SalesforceCommerceCloud/b2c-developer-tooling · 84 tokens

sfnext-project-setup

Create and configure Storefront Next projects. Use when creating a new storefront, understanding project structure, setting up environment variables, or running the sfnext CLI for the first time. Covers project creation, directory layout, .env configuration, and sfnext CLI basics.

SalesforceCommerceCloud/b2c-developer-tooling · 58 tokens

sfnext-routing

Implement file-based routing in Storefront Next with React Router 7. Use when adding new pages, creating layout routes, defining route parameters, or understanding route module exports (loader, action, component, meta). Covers flat-routes conventions, nested layouts, and the app prefix.

SalesforceCommerceCloud/b2c-developer-tooling · 61 tokens

sfnext-state-management

Manage client-side state in Storefront Next using React context providers and feature-level Zustand stores. Use when handling basket/auth UI state, creating extension stores (for example store locator), or syncing client-visible state after server mutations. NOT for server-side data loading — see sfnext-data-fetching…

SalesforceCommerceCloud/b2c-developer-tooling · 66 tokens

vendure-dashboard-migration

Migrates Vendure Admin UI extensions (legacy Angular-based) to the new React Dashboard.

vendurehq/vendure · 24 tokens