spree-testing

spree-testing is a skill for Claude Code from spree/agent-skills. It costs 195 tokens per session (3,605 once invoked), scanned A, original, MIT.

A guide to automated testing for Spree Commerce applications. It uses RSpec for tests, Factory Bot for test data, Capybara for browser-based tests, and Spree-specific helpers.

In plain words
What is it for?
Use it to write model, controller, API-integration, admin-feature, and browser tests, including Spree factories, fixtures, authorization stubs, and shared test helpers.
Why use it?
It clarifies which testing tools and project conventions to use instead of Rails’ alternative Minitest and fixture setup.

Skill for Claude Code

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

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

Good fit Use it to write model, controller, API-integration, admin-feature, and browser tests, including Spree factories, fixtures, authorization stubs, and shared test helpers.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/spree/agent-skills/spree-testing"><img src="https://agentmods.dev/badge/skills/spree/agent-skills/spree-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,605 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.00195 $0.03605
Opus 5.5 $0.00078 $0.01442
Sonnet 5.5 $0.00039 $0.00721
Haiku 4.5 $0.00019 $0.00361

Measured 1mo ago against content hash f0974aacc680, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spree-testing 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 1mo 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-testing/SKILL.md · 261 lines

How it starts

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

Spree Testing

Layer Tooling
Rails app (server/) RSpec + Factory Bot + spree_dev_tools — not Minitest, not fixtures
Dashboard (apps/dashboard) Vitest (unit) + Playwright (e2e), preconfigured
Storefront (apps/storefront) whatever the Next.js app ships with

Spree has no server-rendered admin or storefront, so there are no Capybara feature specs to write for Spree screens. Browser coverage belongs to Playwright against the dashboard/storefront.

Setup

Projects from create-spree-app arrive with RSpec configured. For a classic app:

# Gemfile
group :development, :test do
  gem 'spree_dev_tools'
end
bin/rails g spree_dev_tools:install

The generator runs rspec:install if needed and writes spec/support/{spree,factory_bot,database_cleaner,active_job}.rb. spec/support/spree.rb loads:

  • Spree's factories (spree/testing_support/factories) + FactoryBot syntax
  • spree/testing_support/store — a default USD store (@default_store) created before each group and cleaned after each example
  • Spree::TestingSupport::Preferences (reset_spree_preferences before each example)
  • spree/api/testing_support/v3/base — the API v3 shared contexts and JWT helper
  • json_response for type: :request and type: :controller
  • ActiveJob::TestHelper, DatabaseCleaner (transaction strategy)

Factory decorators in spec/factories/spree/**/*_decorator.rb are loaded automatically.

Running

spree rspec                                       # whole suite, in the web container, RAILS_ENV=test
spree rspec spec/models/spree/brand_spec.rb:15    # file / line; any rspec flags pass through
bundle exec rspec …                               # classic app, from the app root

spree rspec works from a cold stack (it falls back to a one-off container). After adding migrations in a classic app: bin/rails db:test:prepare.

Factories you'll use

Read the source when in doubt: $(bundle show spree_core)/lib/spree/testing_support/factories/.

Read the full file on GitHub · 261 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. 1mo ago Changed · -139 lines · +37 tokens per session f0974aacc680
  2. 2mo ago First seen · 400 lines · 158 tokens per session scan A 2113e27f9d4a

Subscribe to this mod's changes

spree-testing is a skill published in the GitHub repository spree/agent-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 195 tokens to every session and 3,605 once invoked, about $0.0008 per session on Opus 5.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

sf-testing

Test Salesforce Commerce code — B2C (Node.js unit testing, sfcc-ci CI/CD, sandbox management, linting) and B2B (Apex test classes with 75% coverage minimum, Jest for LWC, sf CLI deployment and validation). Use when writing tests or setting up CI/CD.

OrcaQubits/agentic-commerce-skills-plugins · 66 tokens

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 tokens

axiom-testing

Use when writing ANY test, debugging flaky tests, making tests faster, or choosing Swift Testing vs XCTest. Covers unit tests, UI tests, async testing, test architecture.

CharlesWiltgen/Axiom · 38 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

designing-tests

Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.

CloudAI-X/claude-workflow-v2 · 48 tokens

test-automation-expert

Comprehensive test automation specialist covering unit, integration, and E2E testing strategies. Expert in Jest, Vitest, Playwright, Cypress, pytest, and modern testing frameworks. Guides test pyramid design, coverage optimization, flaky test detection, and CI/CD integration. Activate on 'test strategy', 'unit tests'…

curiositech/some_claude_skills · 133 tokens