agentleFS
remix-runremix-run/remix-store/.agents/skills/hydrogen-smoke-test/SKILL.md

hydrogen-smoke-test

Skill218 starsChanged 4 days agoMITView on GitHub

Smoke-test checklist for Hydrogen storefronts built by agents. Use after creating or modifying a Hydrogen storefront, setup flow, cart, product page, collection/search browsing, analytics, request handlers, Shopify redirects, robots.txt, Shop Pay, or framework middleware integration.

  • Sends data out

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the app in the framework's dev server and, when practical, in a production build.

    line 16
  2. Distinctive:

    If any check below fails, fix the app and re-run the failing check before treating verification as complete.

    line 18
  3. Distinctive:

    Run the app's available scripts:

    line 91
  4. Very specific:

    Run this check when the app serves /robots.txt.

    line 137
  5. Very specific:

    Add-to-cart is enabled only when canAddToCart(product, options) is true.

    line 169
  6. Distinctive:

    Add-to-cart can open the drawer after a successful submit when the product UX chooses that behavior.

    line 182
  7. Very specific:

    Search filters preserve q.

    line 196
  8. Distinctive:

    No browser module reads private env variables.

    line 205
  9. Distinctive:

    No client-side subtotal/total arithmetic exists.

    line 212

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hydrogen Storefront Smoke Tests

Run the app in the framework's dev server and, when practical, in a production build. Type checks are not enough for Hydrogen wiring.

If any check below fails, fix the app and re-run the failing check before treating verification as complete.

Copyable checklist (details for each check are in the sections below):

Static checks:
- [ ] Formatting fixer, if present
- [ ] lint, typecheck, or check
- [ ] GraphQL validation (`hydrogen gql check`) when `gql()` documents changed
- [ ] build
- [ ] test
- [ ] Formatting check, if distinct from the fixer

Request handlers:
- [ ] POST /api/{api-version}/graphql.json returns Storefront API JSON, not the framework 404
- [ ] GET /api/cart returns cart handler JSON (no cart cookie -> {cart: null})
- [ ] GET /admin redirects to the configured shop/admin domain
- [ ] Unknown path returns framework 404 unless a Shopify URL redirect matches
- [ ] When the app serves /robots.txt: 200 text/plain, publicly cacheable, no Set-Cookie

Navigation:
- [ ] Every navbar and footer link href returns 200 when curled directly (no invented routes)

Product page:
- [ ] Server-renders title, gallery, price, variant options, add-to-cart form, and related products when available
- [ ] URL option params select the expected variant on reload
- [ ] Selecting same-product options updates the URL without scroll reset
- [ ] Combined-listing values navigate to the target product handle instead of calling selectOption
- [ ] Sold-out values remain selectable and show sold-out text
- [ ] Non-existent combinations are disabled
- [ ] Add-to-cart is enabled only when canAddToCart(product, options) is true
- [ ] Shop Pay renders only when a selected variant exists and is disabled when add-to-cart is disabled or pending

Cart:
- [ ] /cart works without JavaScript and is reachable via a real /cart link in the footer
- [ ] Header cart trigger is a `/cart` anchor that opens the drawer via `showModal()` after hydration
- [ ] window.Shopify.actions.openCart() opens the drawer after Standard Actions loads
- [ ] A mutation driven through the real Add to cart UI or framework cart action issues `Set-Cookie` and propagates expected response headers
- [ ] Add-to-cart can open the drawer after a successful submit when the product UX chooses that behavior
- [ ] Each line item form includes hidden set, scoped lineId, and editable quantity
- [ ] Quantity Enter key submits a set action
- [ ] Rapid quantity clicks settle to the final expected quantity
- [ ] Line, discount, note, attribute, network, and cart-level errors appear in the right scope
- [ ] Attribute editing submits the complete list, preserves unrelated attributes, and shows scoped pending UI
- [ ] Totals are server-provided and visually pending during cart mutations

Collection and search:
- [ ] Collection filters and sort update the URL and product grid
- [ ] Checkbox filters and price min/max controls both render, apply, and persist after reload
- [ ] Reloading a filtered URL server-renders the same filter/sort state
- [ ] Active filter chips remove one filter and preserve unrelated params
- [ ] Search filters preserve q
- [ ] JavaScript-disabled filter forms still submit with GET
- [ ] Back/forward navigation does not leave browse state stuck in loading

Analytics:
- [ ] Page view fires on initial load and client navigations
- [ ] Product/collection/search/cart view events fire once per route data change
- [ ] Cart tracking is wired once via trackCartAnalytics(cartStore) (React/Vue: useCartAnalytics()), and delta events fire on confirmed cart data changes
- [ ] No browser module reads private env variables
- [ ] Production does not bypass Customer Privacy consent gating (no forced-always-true consent checks)

Markets and money:
- [ ] Market-aware Storefront API queries declare $country, $language, and @inContext
- [ ] Money renders from Storefront API money fields via formatMoney()
- [ ] No client-side subtotal/total arithmetic exists

Production pass:
- [ ] Build and run the production bundle and repeat the request-handler checks against production mode

Static Checks

Run the app's available scripts:

  1. Formatting fixer, if present.
  2. lint, typecheck, or check.
  3. GraphQL validation (hydrogen gql check) when gql() documents changed.
  4. build.
  5. test.
  6. Formatting check, if distinct from the fixer.

Request Handlers

Replace <port> with the running app port, and {api-version} with the Storefront API version configured by the app:

curl -i -X POST http://localhost:<port>/api/{api-version}/graphql.json \
  -H "content-type: application/json" \
  -H "X-Shopify-Storefront-Access-Token: <public-token>" \
  -d '{"query":"{ shop { name } }"}'

Expected: Storefront API JSON, not the framework 404.

The SFAPI proxy forwards the incoming public token header; it does not inject a token from server config.

curl -i http://localhost:<port>/api/cart

Expected: cart handler JSON, not 404. With no cart cookie, the body should be {cart: null}.

curl -i http://localhost:<port>/admin

Expected: redirect to /admin on the configured shop/admin domain.

curl -i http://localhost:<port>/this-does-not-exist

Expected: framework 404 unless Shopify has a matching URL redirect.

curl -i http://localhost:<port>/robots.txt

Run this check when the app serves /robots.txt. Expected: 200 with Content-Type: text/plain, a public Cache-Control, and no Set-Cookie header. The rules themselves are the app's policy; see the hydrogen-robots-txt skill.

Navigation

Extract every href from the rendered navbar and footer and request each one directly:

curl -s -o /dev/null -w "%{http_code} <href>\n" http://localhost:<port><href>

Expected: 200 for every link. A 404 means the link points to a route the app never created or a handle the shop does not have. /collections/all is the classic failure: the Liquid "all" collection does not exist in the Storefront API, so only link to it when the shop really has a collection with that handle.

Account

curl -i http://localhost:<port>/account/login

Expected: a redirect whose location header points at Shopify's hosted login, not a framework 404 or 500.

  • /account renders the signed-out panel when no session exists, without touching access tokens.
  • The logout control is a native <form method="post" action="/account/logout">; the handler enforces same-origin POST and returns a raw redirect only a native browser submit can follow.
  • Completing a real login requires a public HTTPS origin registered for the OAuth callback. To get one locally, follow the hydrogen-local-https skill. On Vite-based frameworks, ask the user to run the dev:https script in a real terminal outside CI, where the localHttps Vite plugin serves trusted HTTPS and registers the Customer Account URLs through Shopify CLI. Next.js needs its HTTPS command and manual URL configuration; see that skill. Agent shells usually run with CI set and no TTY, so don't assume the agent shell can complete local HTTPS or URL registration itself. npx hydrogen certs install only provisions certificate files; it registers no URLs. If the user can't provide a registered HTTPS local origin, verify the signed-out checks and say so instead of faking signed-in ones.

Product Page

  • Product page server-renders title, gallery, price, variant options, add-to-cart form, and related products when available.
  • URL option params select the expected variant on reload.
  • Selecting same-product options updates the URL without scroll reset.
  • Combined-listing values navigate to the target product handle instead of calling selectOption.
  • Sold-out values remain selectable and show sold-out text.
  • Non-existent combinations are disabled.
  • Add-to-cart is enabled only when canAddToCart(product, options) is true.
  • Shop Pay renders only when a selected variant exists and is disabled when add-to-cart is disabled or pending.

Cart

  • /cart works without JavaScript and is reachable via a real /cart link in the footer.
  • The header cart trigger is a /cart anchor that opens the drawer via showModal() after hydration.
  • window.Shopify.actions.openCart() opens the drawer after Standard Actions loads.
  • Exercise a mutation through the real Add to cart UI or the framework's cart action. Do not hand-craft an internal Hydrogen cart payload. Confirm the response issues the expected cart or session Set-Cookie and propagates the action's response headers.
  • handleShopifyRoutes can intercept /api/cart and predictive-search requests, so the absence of a matching route file does not mean the handler is missing.
  • Add-to-cart can open the drawer after a successful submit when the product UX chooses that behavior.
  • Each line item form includes hidden set, scoped lineId, and editable quantity.
  • Quantity Enter key submits a set action.
  • Rapid quantity clicks settle to the final expected quantity.
  • Line, discount, note, attribute, network, and cart-level errors appear in the right scope.
  • Saving one cart attribute submits the complete next list, preserves unrelated attributes, and shows a saving state while pending.attributes is true. Submitting no attribute fields clears the list.
  • Totals are server-provided and visually pending during cart mutations.

Collection And Search

  • Collection filters and sort update the URL and product grid.
  • Checkbox filters and price min/max controls both render, apply, and persist after reload.
  • Reloading a filtered URL server-renders the same filter/sort state.
  • Active filter chips remove one filter and preserve unrelated params.
  • Search filters preserve q.
  • JavaScript-disabled filter forms still submit with GET.
  • Back/forward navigation does not leave browse state stuck in loading.

Analytics

  • Page view fires on initial load and client navigations.
  • Product/collection/search/cart view events fire once per route data change.
  • Cart tracking is wired once per cart store lifecycle via trackCartAnalytics(cartStore) (React/Vue: useCartAnalytics()), and cart delta events fire on confirmed cart data changes.
  • No browser module reads private env variables.
  • Analytics destinations only receive events after Shopify Customer Privacy allows analytics processing.

Markets And Money

  • Storefront API queries that should be market-aware declare $country, $language, and @inContext.
  • Money renders from Storefront API money fields via formatMoney().
  • No client-side subtotal/total arithmetic exists.

Production Pass

Build and run the production bundle. Repeat request-handler checks against production mode because dev-only middleware or development export conditions can hide broken production wiring.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.