spree-cli

A command-line skill for using the Spree Admin API, the interface for managing data in a Spree online store. It supports inspecting store records, exploring available endpoints, scripting requests, and changing data.

In plain words
What is it for?
Use it to debug API errors, inspect store state, check product variants, discover endpoint requirements, and automate administrative tasks.
Why use it?
It lets developers investigate orders, products, customers, and failed requests directly from a terminal without writing API-client setup code.

Skill for Claude CodeCodex

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

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.

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

Made for: Claude Code, Codex.

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

Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,045 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00195 $0.02045
Opus 5 $0.00097 $0.01022
Sonnet 5 $0.00039 $0.00409
Haiku 4.5 $0.00019 $0.00204

Measured 2d ago against content hash d1d5a8bba5af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spree-cli 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 2d 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-cli/SKILL.md · 144 lines

How it starts

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

Spree CLI — Admin API from the terminal

@spree/cli ships a spree api command group: a generic Admin API v3 client modeled on gh api. It is the fastest way to inspect and manipulate store data from a terminal, and the most reliable way for an agent to debug — no SDK boilerplate, structured JSON in/out, and offline endpoint discovery.

It works against any Spree 5.5+ instance. Inside a local project it self-provisions a read-only key; for any other server you supply a key.

When to reach for the CLI

  • Debugging — "what state is order ord_x in?", "why did this 403?", "does this product have the variant I expect?". One command, JSON back, pipe to jq.
  • Exploring the API — list endpoints and their required scopes, dump an operation's schema, all offline.
  • Scripting / agents — deterministic, pipeable, exit-coded. No client to instantiate.

For building an app, prefer @spree/admin-sdk (see spree-typescript-sdk). The CLI is for interactive work, scripts, and agents.

Setup

The CLI is @spree/cli (binary: spree). Verify it's available:

spree --version          # or: pnpm exec spree --version

If not installed: npm i -g @spree/cli (or run via pnpm exec spree / npx @spree/cli inside a project).

Credentials — pick the layer that fits

Credentials resolve in this order (first match wins); host and key always resolve together per source:

  1. Explicit flags--api-key sk_xxx, or --profile prod to select a saved profile. Outrank everything below.
  2. Env — set SPREE_API_KEY; the host defaults to http://localhost:3000, so local dev needs only the key. Set SPREE_BASE_URL for a remote store. Note an exported SPREE_API_KEY outranks a local project's saved key:
    SPREE_API_KEY=sk_xxx spree api get /products            # → localhost:3000
    SPREE_BASE_URL=https://store.example.com SPREE_API_KEY=sk_xxx spree api get /orders
    
  3. Inside a local Spree project (a dir with docker-compose.yml, dev stack running): zero config. The first spree api call mints a read-only key via the dev stack and saves it to .spree/credentials.json (gitignored). Just run commands.
  4. Default profile (the first profile you spree auth login becomes the default; key read from a prompt, never a flag):
    spree auth login --profile prod --base-url https://store.example.com
    spree api get /orders --profile prod    # or omit --profile once it's the default
    

Read the full file on GitHub · 144 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. 2d ago First seen · 144 lines · 0 tokens per session scan A d1d5a8bba5af

Subscribe to this mod's changes

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

cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/agent-scripts · 20 tokens

etsy-category-listing

Etsy category page scraper: given an Etsy category URL (e.g. https://www.etsy.com/c/jewelry) and optional page number, returns paginated product listings with listingId, shopId, title, url, image, salePrice, originalPrice, currency, rating, reviewCount, shopName, isAd, freeShipping, badge from category and subcategory…

browser-act/skills · 209 tokens

amazon-reviews-api-skill

This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…

browser-act/skills · 124 tokens

amazon-competitor-analyzer

Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.

browser-act/skills · 48 tokens

shopify-functions

Shopify Functions allow developers to customize the backend logic that powers parts of Shopify. Available APIs: Discount, Cart and Checkout Validation, Cart Transform, Pickup Point Delivery Option Generator, Delivery Customization, Fulfillment Constraints, Local Pickup Delivery Option Generator, Order Routing Location…

Shopify/Shopify-AI-Toolkit · 61 tokens

shopify-shopifyql

Answer a merchant's analytics and reporting questions with ShopifyQL — Shopify's query language for aggregated store metrics that the Admin GraphQL API cannot compute. Choose this (not admin) whenever the ask is for numbers, totals, trends, or breakdowns rather than fetching or mutating individual records: including…

Shopify/Shopify-AI-Toolkit · 216 tokens