hydrogen-markets
Skill by Shopify
Guides developers through adding Shopify Markets to a Hydrogen storefront. It covers market routing, country and language localization, and Storefront API @inContext wiring for path-prefixed or per-market domain setups.
Install hydrogen-markets
Built from the published package, never by AI.
git clone --depth 1 https://github.com/Shopify/hydrogen /tmp/hydrogen && mkdir -p ~/.claude/skills && cp -r /tmp/hydrogen/packages/hydrogen/skills/hydrogen-markets ~/.claude/skills/hydrogen-marketsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/Shopify/hydrogen /tmp/hydrogen && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/hydrogen/packages/hydrogen/skills/hydrogen-markets ~/.gemini/antigravity-cli/skills/hydrogen-marketsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The hydrogen-markets skill is a guide from Shopify for adding Shopify Markets to a Hydrogen storefront. It explains how to define the storefront's locales once with defineShopifyI18n and pass that definition to createShopifyRequestContext, so each request's locale is resolved from the URL. Queries that declare $country and $language with @inContext receive those values from the resolved locale.
It covers two routing types: pathname prefixes such as /fr-ca, and per-market domains or subdomains. It also covers locale switchers, hreflang alternate links, LocaleProvider for browser requests, and Next.js App Router market routing. It is written for developers building Hydrogen storefronts that sell across several countries and languages.
Written from the project's SKILL.md and checked against it.
What it can do
- defineShopifyI18nDefines the storefront's default locale and routing once, validated at module load.
- createShopifyRequestContextResolves the request's locale from the i18n definition for use by the Storefront client.
- Pathname routingEncodes the locale in the first path segment, such as /fr-ca/products/shirt.
- Domain routingMaps each locale to its own hostname, such as example.ca or fr.example.com.
- LocaleProviderPasses the request locale to cart, predictive search and account components in the browser.
- Locale switchers and hreflangUses getLocalizedHref, getSupportedLocales and isSameLocale to build switcher and alternate links.
- @inContext wiringInjects country and language into Storefront API queries that declare them.
What you need
- A Hydrogen storefront
- Storefront API store domain and public token
- Next.js App Router, if using that setup
Try asking
- Set up pathname market routing with /fr-ca for Canada in French
- Add a locale switcher and hreflang links to my Hydrogen storefront
- Wire @inContext country and language into my Storefront API query
Good to know
- Cookie, geolocation and buyer-preference routing are not built-in routing types.
- Changing locale requires a full page load, because the cart is priced for one market per load.
- Next.js Server Components do not receive a full Request, so the locale comes from a header or an explicit override.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/hydrogen/skills/hydrogen-markets/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md17 KB -
references/nextjs.md5 KB
Alternatives to hydrogen-markets
All alternatives →Shopify skill that lets an AI assistant set up and run a Shopify store through Shopify's official MCP server. It is for people who want to sell online, start a store, or manage an existing Shopify store.
Guides an AI assistant through building Shopify apps, extensions and themes. It covers the GraphQL Admin API, Shopify CLI, Polaris UI and Liquid. Intended for Shopify developers.
Searches Ticketmaster events and seat listings with pricing for people looking for event tickets. It returns Ticketmaster checkout links but cannot complete a purchase itself.
Analyzes ecommerce SEO for product pages, product schema, Google Shopping visibility, Amazon marketplace signals and keyword gaps. Built for stores, catalogs and product listings. Live Shopping and Amazon data needs the optional DataForSEO Merchant API.
Drafts replies to customer emails and tickets using order, refund, CRM and support desk data, in the owner's writing voice. Refunds and sends need the owner's approval, and with Shopify it also flags orders needing attention.
Reviews generated or changed WooCommerce code before it ships. It is for developers building extensions, payment and shipping integrations, checkout customizations, and order or product logic.
Compare with shopify, shopify-development or ticketmaster
hydrogen-markets: common questions
How does Hydrogen decide which market a request uses?
The URL is the only input to locale resolution. defineShopifyI18n describes the locales, and createShopifyRequestContext resolves the request's locale from that definition.
Can each market use its own domain?
Yes. Use type domain with a hostname for each locale. Matching is exact on the hostname, and pathPrefix is always empty under domain routing.
Why are hreflang tags not built from language and country directly?
Regional language codes such as PT_BR already include a region, so joining them with the country would produce invalid tags like pt-br-BR. The skill maps them to valid BCP 47 tags.
How do I install hydrogen-markets?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is hydrogen-markets free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is hydrogen-markets safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to hydrogen-markets?
Similar skills: shopify, shopify-development, ticketmaster, seo-ecommerce.
