Agent skill

Shopify Storefront Headless

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Build headless storefronts with Shopify's Storefront API and Cart API.

MITAuto-check passedFrontend & Design

Install Shopify Storefront Headless

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill shopify-storefront-headless -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace shopify-storefront-headless --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/shopify-storefront-headless .claude/skills/shopify-storefront-headless && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shopify-storefront-headless
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
365 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Build headless storefronts with Shopify's Storefront API and Cart API.

  • Works in 4 steps: Storefront API Client Setup → Cart Operations → Query Products (Storefront Schema) → …
  • Building custom frontends
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Needs INVALID_STOREFRONT_ACCESS_TOKEN

What it does

Shopify Storefront Headless is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build headless storefronts with Shopify's Storefront API and Cart API. Use when building custom frontends, setting up Hydrogen, querying products for customer-facing apps, or managing cart operations programmatically. Trigger with phrases like "shopify headless", "shopify storefront api", "shopify hydrogen", "shopify cart api", "headless commerce shopify".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/cart-api.md`, `references/hydrogen-patterns.md` and `references/storefront-vs-admin.md`). Compatibility notes: Designed for Claude Code

It sits in Frontend & Design. It works with Shopify. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Building custom frontends
  • Setting up Hydrogen
  • Querying products for customer-facing apps
  • Managing cart operations programmatically

Example prompts

  • “shopify headless”
  • “shopify storefront api”
  • “shopify hydrogen”
  • “/shopify-storefront-headless”

Requirements

  • Node.js
  • A credential in INVALID_STOREFRONT_ACCESS_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Grep

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Storefront API Client Setup
  2. Cart Operations
  3. Query Products (Storefront Schema)
  4. Storefront vs Admin API Decision Guide

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • shopify.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • INVALID_STOREFRONT_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Shopify Storefront Headless loads about 1.3k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 365 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 365 words, ~1,284 tokens.

Download SKILL.mdSave it as .claude/skills/shopify-storefront-headless/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
shopify-storefront-headless
description
Build headless storefronts with Shopify's Storefront API and Cart API. Use when building custom frontends, setting up Hydrogen, querying products for customer-facing apps, or managing cart operations programmatically. Trigger with phrases like "shopify headless", "shopify storefront api", "shopify hydrogen", "shopify cart api", "headless commerce shopify".
allowed-tools
Read, Write, Edit, Bash(npm:*), Grep
compatibility
Designed for Claude Code
version
2.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, ecommerce, shopify

Shopify Storefront & Headless Commerce

Overview

The Storefront API is Shopify's public-facing GraphQL API for customer experiences. Unlike the Admin API (server-side, privileged), it uses a public access token safe for client-side code. Paired with the Cart API, it powers headless storefronts, mobile apps, and custom buying experiences.

Prerequisites

  • Shopify store with a Storefront API access token (Headless channel or custom app)
  • For Hydrogen: Node.js 18+ and Shopify CLI 3.x+
  • Storefront API scopes: unauthenticated_read_products, unauthenticated_read_collections

Instructions

Step 1: Storefront API Client Setup
typescript
import { createStorefrontApiClient } from "@shopify/storefront-api-client";

const client = createStorefrontApiClient({
  storeDomain: "my-store.myshopify.com",
  apiVersion: LATEST_API_VERSION,
  publicAccessToken: "your-storefront-public-token", // Safe in browser
});
Step 2: Cart Operations
typescript
const { data } = await client.request(CART_CREATE, {
  variables: {
    input: {
      lines: [{ merchandiseId: "gid://shopify/ProductVariant/123", quantity: 2 }],
      buyerIdentity: { email: "customer@example.com", countryCode: "US" },
    },
  },
});
// Redirect to data.cartCreate.cart.checkoutUrl to complete purchase

Full cart mutations (cartLinesAdd, cartLinesUpdate, cartLinesRemove, cartDiscountCodesUpdate) in cart-api.md.

Step 3: Query Products (Storefront Schema)
typescript
// Storefront API schema differs from Admin API — field names are NOT the same
const { data } = await client.request(`
  query { products(first: 10) { edges { node {
    id title handle availableForSale
    priceRange { minVariantPrice { amount currencyCode } }
    variants(first: 5) { edges { node {
      id title availableForSale
      price { amount currencyCode }  // MoneyV2 object, not a string
      selectedOptions { name value }
    }}}
  }}}}
`);
Step 4: Storefront vs Admin API Decision Guide
ConcernStorefront APIAdmin API
Token typePublic (safe in browser)Private (server-only)
Rate limitingRequest-basedQuery cost-based (1000 pts/sec)
Cart/CheckoutFull cart + checkout URLNo cart operations
Product dataCustomer-facing fields onlyFull data + inventory
MutationsCart, customer, checkoutFull CRUD on all resources

Detailed comparison in storefront-vs-admin.md. Hydrogen framework setup in hydrogen-patterns.md.

Output

  • Storefront API client configured with public access token
  • Cart created with line items and checkout URL
  • Product catalog queryable from client-side code
  • Clear separation of Storefront (public) vs Admin (privileged) API usage
Show full SKILL.md (170 more words)Show less

Error Handling

ErrorCauseSolution
INVALID_STOREFRONT_ACCESS_TOKENToken missing, expired, or wrong storeRegenerate in Shopify admin under Headless channel
THROTTLEDExceeded request rate limitRetry with backoff; cache product data
PRODUCT_NOT_AVAILABLEProduct not published to Headless channelPublish product to the Headless sales channel
CART_DOES_NOT_EXISTCart ID expired (10-day inactivity)Create a new cart; don't persist IDs long-term

Examples

Building a Custom Cart Experience

Create a cart, add line items, apply discount codes, and redirect to Shopify's hosted checkout using the Storefront Cart API.

See Cart API for the complete cart lifecycle mutations and response shapes.

Scaffolding a Hydrogen Storefront

Set up a new Hydrogen project with Remix loaders, Storefront client configuration, and server-side product queries.

See Hydrogen Patterns for the framework setup and loader patterns.

Choosing Between Storefront and Admin APIs

Decide which API to use based on token type, rate limiting model, available mutations, and data access scope.

See Storefront vs Admin for the detailed comparison.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/shopify-storefront-headless of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/cart-api.md
  • references/hydrogen-patterns.md
  • references/storefront-vs-admin.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Shopify Storefront Headless next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shopify Storefront Headless compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shopify Storefront Headless this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Better Designmarvkr/better-design254—~1.2kAutomated safety check: PassMIT
Liquid Theme A11ybenjaminsehl/liquid-skills120—~3.2kAutomated safety check: PassNone
Liquid Theme Standardsbenjaminsehl/liquid-skills120—~3kAutomated safety check: PassNone
Shopify Liquid Themesbenjaminsehl/liquid-skills120—~2.9kAutomated safety check: PassNone
Shopify Developer Referencetech-leads-club/agent-skills7k—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Better Design

    marvkr/better-design

    Build, improve, and review production interfaces with the Better Design MCP.

    254 GitHub stars~1.2k tokensUpdated 18 days ago
    Frontend & DesignAuto-check passed
  • Liquid Theme A11y

    benjaminsehl/liquid-skills

    Implement WCAG 2.2 accessibility patterns in Shopify Liquid themes.

    120 GitHub stars~3.2k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Liquid Theme Standards

    benjaminsehl/liquid-skills

    CSS, JavaScript, and HTML coding standards for Shopify Liquid themes.

    120 GitHub stars~3k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Shopify Liquid Themes

    benjaminsehl/liquid-skills

    Generate Shopify Liquid theme code (sections, blocks, snippets) with correct schema JSON, LiquidDoc headers, translation keys, and CSS/JS patterns.

    120 GitHub stars~2.9k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Shopify Developer Reference

    tech-leads-club/agent-skills

    Reference for Shopify work: Liquid templates, OS 2.0 themes, Admin and Storefront GraphQL APIs, apps, Functions and Hydrogen, on API version 2026-01.

    7k GitHub stars~1.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • 12 Landing Page Brief Global

    minhnv0807/ai-business-skills

    A skill your agent uses when a NEW landing page, sales page, or single-product page has to be built — seven-section structure, one page one goal one CTA, copy per block, mobile-first rules…

    609 GitHub stars~3.9k tokensUpdated 29 days ago
    Frontend & DesignAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Shopify Storefront Headless

What does Shopify Storefront Headless do?

Build headless storefronts with Shopify's Storefront API and Cart API. Shopify Storefront Headless is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build headless storefronts with Shopify's Storefront API and Cart API.

When should I use Shopify Storefront Headless?

Shopify Storefront Headless fits situations like: building custom frontends; setting up Hydrogen; querying products for customer-facing apps; managing cart operations programmatically.

How do I install Shopify Storefront Headless in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill shopify-storefront-headless -a claude-code`. Or copy the skill folder (skills/.curated/shopify-storefront-headless in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/shopify-storefront-headless in your project. Claude Code loads it when a task matches its description.

How do I install Shopify Storefront Headless in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill shopify-storefront-headless -a codex`. Or copy the skill folder (skills/.curated/shopify-storefront-headless in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/shopify-storefront-headless in your project. Codex loads it when a task matches its description.

Can I use Shopify Storefront Headless in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill shopify-storefront-headless -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shopify-storefront-headless, .gemini/skills/shopify-storefront-headless, .github/skills/shopify-storefront-headless and .opencode/skills/shopify-storefront-headless in your project.

What does Shopify Storefront Headless need to run?

Going by SKILL.md and its folder, Shopify Storefront Headless needs credentials named INVALID_STOREFRONT_ACCESS_TOKEN. Our summary lists: Node.js; A credential in INVALID_STOREFRONT_ACCESS_TOKEN. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Shopify Storefront Headless access the network?

SKILL.md names 1 domain. As links in the text: shopify.dev. This is read from the text; nothing was executed.

Is Shopify Storefront Headless safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shopify Storefront Headless use?

Shopify Storefront Headless is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shopify Storefront Headless use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Shopify Storefront Headless?

Skills that share tags, products or a category with Shopify Storefront Headless: Better Design (marvkr/better-design, 254 stars), Liquid Theme A11y (benjaminsehl/liquid-skills, 120 stars), Liquid Theme Standards (benjaminsehl/liquid-skills, 120 stars) and Shopify Liquid Themes (benjaminsehl/liquid-skills, 120 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shopify Storefront Headless?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.