shopify-storefront-api

shopify-storefront-api is a skill for Claude Code, Codex from finsilabs/awesome-ecommerce-skills. It costs 32 tokens per session (2,541 once invoked), scanned A, original, MIT.

A guide to building a custom Shopify storefront with the Storefront API, Shopify’s public API for products, collections, carts, and checkout. A headless storefront uses Shopify for commerce while a separate frontend controls the customer-facing pages.

In plain words
What is it for?
Use it to build custom websites, Hydrogen or Next.js stores, mobile shopping apps, embedded product widgets, and persistent carts.
Why use it?
It lets you keep Shopify’s product and checkout services while building the storefront with a different web framework or mobile app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions Gemini CLI; mentions OpenCode.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { cartCreate, cartLinesAdd } from "../lib/cart";.

Good fit Use it to build custom websites, Hydrogen or Next.js stores, mobile shopping apps, embedded product widgets, and persistent carts.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/finsilabs/awesome-ecommerce-skills
agentmods
npx agentmods add skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api

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 shopify-storefront-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api/github.svg)](https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api)
Your own site
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api/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 shopify-storefront-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/shopify-storefront-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,541 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00032 $0.02541
Opus 5 $0.00016 $0.01270
Sonnet 5 $0.00006 $0.00508
Haiku 4.5 $0.00003 $0.00254

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

Security

Grade A, and why

shopify-storefront-api scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/platform-shopify/shopify-storefront-api/SKILL.md · 333 lines

How it starts

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

Shopify Storefront API

Overview

The Shopify Storefront API is a public-facing GraphQL API that provides read and write access to a store's products, collections, cart, and checkout from any frontend. It uses a Storefront Access Token (distinct from Admin API tokens) and is safe to expose in client-side JavaScript. Use it to build headless storefronts with Next.js, Remix/Hydrogen, or any JS framework.

When to Use This Skill

  • When building a headless Shopify storefront with a custom frontend framework
  • When creating a React Native or Flutter mobile app that needs product and cart data
  • When embedding a Shopify buy button or product widget in a non-Shopify site
  • When using Shopify Hydrogen (Remix-based) for a fully custom storefront experience
  • When needing real-time product availability or pricing without the Admin API overhead
  • When implementing cart persistence across sessions with Shopify's hosted cart

Core Instructions

  1. Create a Storefront Access Token

    In Shopify Admin → Apps → Develop apps → Your App → API credentials → Storefront API access token. Or via the Admin API:

    // Via Admin API (one-time setup)
    const token = await admin.graphql(`
      mutation {
        storefrontAccessTokenCreate(input: { title: "Headless Frontend" }) {
          storefrontAccessToken {
            accessToken
            title
          }
          userErrors { field message }
        }
      }
    `);
    

    Storefront Access Tokens do not use the shpat_ prefix (that prefix is for Admin API tokens). Storefront tokens are opaque strings safe to use in browser code — they only allow storefront-scoped operations.

  2. Set up the Storefront API client

    Using the official @shopify/storefront-api-client:

    npm install @shopify/storefront-api-client
    
    // lib/shopify.ts
    import { createStorefrontApiClient } from "@shopify/storefront-api-client";
    
    export const storefront = createStorefrontApiClient({
      storeDomain: process.env.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN!, // e.g. "mystore.myshopify.com"
      apiVersion: "2025-01",
      publicAccessToken: process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_TOKEN!,
    });
    

Read the full file on GitHub · 333 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. 7d ago First seen · 333 lines · 32 tokens per session scan A 11a24e3caf92

Subscribe to this mod's changes

shopify-storefront-api is a skill published in the GitHub repository finsilabs/awesome-ecommerce-skills (52 stars, last pushed 6mo ago), licensed MIT. It adds 32 tokens to every session and 2,541 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.