Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

hydrogen-customer-account

Skill by Shopify

Explains how to set up the Shopify Customer Account API in Hydrogen storefronts. Covers customer sessions, OAuth route handlers, account pages and cart buyer identity sync for developers building account features.

  • Score 87
  • 2.2k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install hydrogen-customer-account

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-customer-account ~/.claude/skills/hydrogen-customer-account

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install hydrogen-customer-account in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill guides the setup of the Shopify Customer Account API in a Hydrogen storefront. It covers customer sessions, the login, authorize, refresh and logout route handlers, Customer Account GraphQL queries, and syncing the cart's buyer identity with the signed-in customer. It also describes how to build a minimal account page.

Hydrogen provides typed GraphQL helpers and OAuth and session primitives, while the app owns framework integration, UI and session storage. The skill sets rules for separating read-only session checks from token refresh, and for committing cookies on response boundaries. It is a SKILL.md file from Shopify, intended for developers building account features on Hydrogen storefronts.

Written from the project's SKILL.md and checked against it.

What it can do

  • Customer sessionsCreates request-scoped session managers, with read-only and writable variants for different render paths.
  • Route handlersWires login, authorize, refresh and logout routes through createCustomerAccountServerHandlers.
  • Cart buyer identity syncAttaches the signed-in customer to the cart and detaches on logout or definitive refresh rejection.
  • Server rendering rulesSeparates isLoggedIn() reads from getAccessToken() calls and handles refresh redirects.
  • Minimal account pageDescribes a /account route with a sign-in panel, a profile view and a plain HTML logout form.
  • Typed Customer Account queriesUses gql and createCustomerAccountClient for server-side Customer Account GraphQL calls.
  • GraphQL document checkValidates gql() documents with the hydrogen gql check command and the ts-plugin setup.

What you need

  • A Hydrogen storefront
  • Numeric Shopify shop ID
  • Customer Account API client ID
  • A session secret for encrypted cookies or server-side session storage
  • A public HTTPS origin for local OAuth testing

Try asking

  • Wire Customer Account login and logout route handlers into my Hydrogen store
  • Add a minimal /account page showing the customer's name and email
  • Sync the cart's buyer identity with the signed-in customer session

Good to know

  • Hydrogen ships no account UI, so the app must build the account page.
  • Cart sync is best-effort and does not block the route redirect.
  • Next.js edge routes need an AbortSignal.any polyfill.
  • Customer Account OAuth needs a public HTTPS origin for local development.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: packages/hydrogen/skills/hydrogen-customer-account/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB

Alternatives to hydrogen-customer-account

All alternatives →

Compare with shopify, shopify-development or ticketmaster

hydrogen-customer-account: common questions

Does Hydrogen include an account page?

No. The source says Hydrogen ships no account UI yet, so the app owns it. It recommends building at least a minimal /account route.

What does cart buyer identity sync do?

It attaches the signed-in customer to the cart from the request's cart cookie and detaches on logout or definitive refresh rejection. Failures are logged and do not block the redirect.

Why does the logout form need to be plain HTML?

The handler returns a raw redirect that a native browser submit follows. A client-side form component or fetch call does not follow it, so the logout would fail.

How do I install hydrogen-customer-account?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is hydrogen-customer-account free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is hydrogen-customer-account safe to use?

It scores 87 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-customer-account?

Similar skills: shopify, shopify-development, ticketmaster, seo-ecommerce.

hydrogen-customer-account Install

Add to stack

Loading.