spree-legacy-api-v2

spree-legacy-api-v2 is a skill for Claude Code from spree/agent-skills. It costs 149 tokens per session (2,862 once invoked), scanned A, original, MIT.

Guidance for working with Spree API v2, an older web API for Spree online stores and administration. It covers the customer-facing Storefront API and the admin Platform API, both of which use JSON:API, a defined format for data, links, and related records.

In plain words
What is it for?
Reading and changing v2 requests, handling carts, products, checkout, and admin records, and planning a v2-to-v3 migration. It helps identify the correct API surface, response structure, and access token.
Why use it?
It helps maintain an existing v2 integration or move it to v3 while accounting for differences in data formats and authentication. It also warns that v2 is no longer the recommended starting point for new integrations.

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 Reading and changing v2 requests, handling carts, products, checkout, and admin records, and planning a v2-to-v3 migration. It helps identify the correct API surface, response structure, and access token.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spree/agent-skills/spree-legacy-api-v2
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-legacy-api-v2
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-legacy-api-v2

README.md
[![agentmods](https://agentmods.dev/badge/skills/spree/agent-skills/spree-legacy-api-v2/github.svg)](https://agentmods.dev/skills/spree/agent-skills/spree-legacy-api-v2)
Your own site
<a href="https://agentmods.dev/skills/spree/agent-skills/spree-legacy-api-v2"><img src="https://agentmods.dev/badge/skills/spree/agent-skills/spree-legacy-api-v2/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 spree-legacy-api-v2

Your own site · 80×15
<a href="https://agentmods.dev/skills/spree/agent-skills/spree-legacy-api-v2"><img src="https://agentmods.dev/badge/skills/spree/agent-skills/spree-legacy-api-v2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,862 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00149 $0.02862
Opus 5 $0.00075 $0.01431
Sonnet 5 $0.00030 $0.00572
Haiku 4.5 $0.00015 $0.00286

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

Security

Grade A, and why

spree-legacy-api-v2 scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://my-spree.example.com/spree_oauth/token \
skills/spree-legacy-api-v2/SKILL.md · 229 lines

How it starts

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

Spree API v2 — Legacy

Default recommendation: don't build new things on v2. Spree 5.4+ ships API v3 as the future-direction API; v2 still works but is feature-frozen. New endpoints, new auth modes (publishable + secret + JWT), prefixed IDs, expand, the typed SDKs — all v3. New integrations should start on v3.

This skill exists for two real reasons:

  1. You inherited a v2 integration and need to maintain it.
  2. You're migrating from v2 to v3 and need to know what changed.

If neither applies, use the spree-api-v3 skill instead.

What v2 looks like

Two distinct API surfaces under /api/v2/:

Surface Path Audience
Storefront API /api/v2/storefront/* Customer-facing — carts, products, checkout
Platform API /api/v2/platform/* Admin/back-office — full CRUD

Both are JSON:API style (https://jsonapi.org/) — strict envelope with data, attributes, relationships, included. Different envelope shape from v3.

Auth in v2

Surface Header Token
Storefront (anonymous browse) None Public access
Storefront (guest cart) X-Spree-Order-Token Cart's order token
Storefront (logged-in customer) Authorization: Bearer <oauth_token> OAuth2 customer token
Platform (admin) Authorization: Bearer <oauth_token> OAuth2 admin token

v2 uses OAuth2 Doorkeeper for token issuance — /spree_oauth/token endpoint with password or client_credentials grants. No publishable keys, no secret keys. OAuth scopes exist but are coarse (admin, write, read — the Platform API requires read/admin to read and write/admin to write); nothing like v3's per-resource read_products/write_orders API-key scopes.

# Get a Platform API token (admin)
curl -X POST https://my-spree.example.com/spree_oauth/token \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data "grant_type=password&[email protected]&password=…"
# => { "access_token": "…", "token_type": "Bearer", "expires_in": 2592000, ... }
# (tokens last 1 month by default — `access_token_expires_in 1.month`)

# Use it
curl -H "Authorization: Bearer …" \
     https://my-spree.example.com/api/v2/platform/orders

Read the full file on GitHub · 229 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. 9d ago First seen · 229 lines · 149 tokens per session scan A 09957e095f8e

Subscribe to this mod's changes

spree-legacy-api-v2 is a skill published in the GitHub repository spree/agent-skills (4 stars, last pushed 2mo ago), licensed MIT. It adds 149 tokens to every session and 2,862 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

convex-billing

Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).

openclaw/clawhub · 29 tokens

cloudbase-wechat-integration

A guide for connecting CloudBase applications to WeChat services, including payments, official accounts, and user identity.

TencentCloudBase/CloudBase-AI-Toolkit · 94 tokens

commerce-app-business-config

Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…

adobe/skills · 80 tokens

baselinker-webhooks

Receive BaseLinker (Base.com) webhooks. Use when building a BaseLinker order or warehouse callback receiver, because BaseLinker is not a normal webhook source: deliveries arrive as HTTP HEAD requests with NO body, the entire payload is in the query string (observed params: orderid, state), there is NO signature…

hookdeck/webhook-skills · 131 tokens

tiktok-shop-webhooks

Receive and verify TikTok Shop webhooks. Use when setting up TikTok Shop webhook handlers, debugging Authorization-header signature verification, or handling events like ORDERSTATUSCHANGE, PACKAGEUPDATE, RECIPIENTADDRESSUPDATE, PRODUCTSTATUSCHANGE, or SELLERDEAUTHORIZATION.

hookdeck/webhook-skills · 59 tokens

b2c-custom-job-steps

Create custom job steps for B2C Commerce batch processing. Use this skill whenever the user needs to write a batch job, data export script, scheduled cleanup task, or any server-side processing that runs on a schedule. Also use when they ask about steptypes.json, chunk-oriented vs task-oriented job steps…

SalesforceCommerceCloud/b2c-developer-tooling · 148 tokens