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.
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-accountRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install hydrogen-customer-account in Claude Code
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-customer-account ~/.gemini/antigravity-cli/skills/hydrogen-customer-accountAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install hydrogen-customer-account in Antigravity CLI
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
ANo 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 →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-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.
