spree-storefront

spree-storefront is a skill for Claude Code from spree/agent-skills. It costs 110 tokens per session (2,512 once invoked), scanned A, original, MIT.

Guidance for working on Spree's optional Next.js storefront, the customer-facing web shop that communicates with the Spree Rails backend through an API.

In plain words
What is it for?
Use it when changing product pages, checkout, carts, or other frontend features in a Spree Next.js storefront.
Why use it?
It explains how the storefront connects to the store system, handles customer and guest carts, and uses the required environment settings.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the spree plugin — 26 skills, 2 commands, 1 agent, 2 hooks shipped together

Good fit Use it when changing product pages, checkout, carts, or other frontend features in a Spree Next.js storefront.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spree/agent-skills/spree-storefront
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add spree/agent-skills --skill spree-storefront
Clone the repo
git clone --depth 1 https://github.com/spree/agent-skills

Made for: Claude Code.

Or install spree, the plugin that ships this one along with the rest of its 26 skills, 2 commands, 1 agent, 2 hooks.

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 spree-storefront

README.md
[![agentmods](https://agentmods.dev/badge/skills/spree/agent-skills/spree-storefront.svg)](https://agentmods.dev/skills/spree/agent-skills/spree-storefront)
Your own site
<a href="https://agentmods.dev/skills/spree/agent-skills/spree-storefront"><img src="https://agentmods.dev/badge/skills/spree/agent-skills/spree-storefront.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,512 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.00110 $0.02512
Opus 5 $0.00055 $0.01256
Sonnet 5 $0.00022 $0.00502
Haiku 4.5 $0.00011 $0.00251

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

Security

Grade A, and why

spree-storefront 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/spree-storefront/SKILL.md · 223 lines

How it starts

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

Spree Storefront (Next.js)

The Spree Next.js storefront is a separate application that talks to the Spree backend over the v3 Store API. It lives at github.com/spree/storefront; create-spree-app clones it into apps/storefront/ for you, or fork it directly for deeper customization.

The storefront is optional. Headless deployments may use a custom frontend — React Native, Astro, Remix, or hand-rolled. Spree's job is to expose a clean API; what consumes it is your choice. This skill assumes the official Next.js storefront, but the API contract is identical for any frontend.

How it connects to Spree

Browser ──HTTPS──> Next.js storefront ──API──> Spree backend (Rails)
                          │
                          └── @spree/sdk for typed API calls

The storefront authenticates against the Spree backend via a publishable API key (pk_… prefix). Customer-bound operations (their cart, their account) use additional auth — JWT for logged-in customers, cart tokens for guest carts.

# .env.local — server-side only (the storefront makes all API calls via Server Actions)
SPREE_API_URL=http://localhost:3000
SPREE_PUBLISHABLE_KEY=pk_…

@spree/sdk — the canonical client

Don't hand-write fetch calls. Use @spree/sdk for typed access to the Store API:

import { createClient } from '@spree/sdk'

const spree = createClient({
  baseUrl: process.env.SPREE_API_URL!,
  publishableKey: process.env.SPREE_PUBLISHABLE_KEY!,
})

// List products
const { data, meta } = await spree.products.list({
  expand: ['media', 'default_variant'],
})

// Get a single product by slug or prefixed ID
const product = await spree.products.get('cool-shirt')

// Create a cart
const cart = await spree.carts.create()

// Add item to cart — cart ID positional, token via options.spreeToken
await spree.carts.items.create(cart.id, {
  variant_id: 'variant_k5nR8xLq',
  quantity: 1,
}, { spreeToken: cart.token })

The SDK includes:

  • Full TypeScript types generated from the Spree serializers (Product, Order, Cart, etc.)
  • Runtime Zod schemas in @spree/sdk/zod if you want validation
  • Automatic retry with exponential backoff
  • Ransack query param transformation
  • Webhook signature verification in @spree/sdk/webhooks

Read the full file on GitHub · 223 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 · 223 lines · 110 tokens per session scan A fccc535a9237

Subscribe to this mod's changes

spree-storefront is a skill published in the GitHub repository spree/agent-skills (4 stars, last pushed 2mo ago), licensed MIT. It adds 110 tokens to every session and 2,512 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories

shopify-expert

Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing…

Jeffallan/claude-skills · 117 tokens

shopify-theme-optimization

Theme speed and UX optimization — Core Web Vitals, Liquid code, image loading, mobile responsiveness.

nexscope-ai/eCommerce-Skills · 25 tokens

commerce-app-admin-ui

Add or modify Adobe Commerce Admin UI extensions on the commerce/backend-ui/2 extension point: custom grid columns, mass actions, order view buttons, and a custom Admin menu entry. Use whenever the user wants to extend the Commerce Admin — add a column to the order, product, or customer grid, add a bulk/mass action to…

adobe/skills · 102 tokens

shopify

Expert Shopify theme development guidelines for Liquid, Online Store 2.0, CSS, JavaScript, and UX best practices.

Mindrally/skills · 27 tokens

shopify-theme-development-guidelines

Expert Shopify theme development with Liquid, Online Store 2.0, and performance best practices.

Mindrally/skills · 25 tokens

b2c-page-designer

Define Page Designer page types and component types with regions, attributes, and rendering scripts. Use this skill whenever the user needs to create a new page or component type, configure regions with allowed component constraints, define attributedefinitiongroups, debug why a component does not appear in the…

SalesforceCommerceCloud/b2c-developer-tooling · 99 tokens