spree-events-webhooks

spree-events-webhooks is a skill for Claude Code from spree/agent-skills. It costs 145 tokens per session (4,601 once invoked), scanned A, original, MIT.

A guide for making a Spree e-commerce app react when events happen. It covers in-app Ruby subscribers and webhooks, which send HTTP requests to other systems.

In plain words
What is it for?
Use it to sync orders with an ERP, send transactional emails, update analytics, clear caches, notify another service, or configure and verify webhook endpoints.
Why use it?
It helps you choose whether your own application or an external service should receive an event. It also explains when events run and how transaction timing affects connected work.

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 to sync orders with an ERP, send transactional emails, update analytics, clear caches, notify another service, or configure and verify webhook endpoints.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/spree/agent-skills/spree-events-webhooks"><img src="https://agentmods.dev/badge/skills/spree/agent-skills/spree-events-webhooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,601 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.00145 $0.04601
Opus 5 $0.00072 $0.02301
Sonnet 5 $0.00029 $0.00920
Haiku 4.5 $0.00015 $0.00460

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

Security

Grade A, and why

spree-events-webhooks 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 10d 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/api/v3/admin/webhook_endpoints \
skills/spree-events-webhooks/SKILL.md · 505 lines

How it starts

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

Spree Events + Webhooks

Spree has two layered systems for reacting to lifecycle events. Both subscribe to the same events; what differs is the delivery target.

System Lives Use for
Subscribers Ruby code in your Rails app Sync to your own ERP, send transactional email, update analytics, invalidate caches
Webhooks HTTPS POSTs to external URLs Third-party integrations, partner systems, customer-built apps

You pick a subscriber when you are the consumer. You pick a webhook when another system is the consumer.

Part 1: Subscribers (in-process)

Spree::Order.complete!
  ↓
order.publish_event('order.completed', payload)
  ↓
Spree::Subscribers each receive the event
  ↓
Your subscriber: sync to ERP, send email, etc.

Automatic lifecycle events (*.created, *.updated, *.deleted) fire after the transaction commits — if the write fails, those subscribers never run. Custom events published via publish_event(...) (including order.completed) are dispatched at the call site, which may be inside an open transaction: sync subscribers run inline, and async subscriber jobs are enqueued immediately — possibly before the commit. Don't assume the surrounding write has committed.

Writing a subscriber

Use the generator (Spree 5.5+) — it creates the class, a spec stub, and handles registration:

spree generate subscriber OrderComplete order.completed   # native: bin/rails g spree:subscriber …
# flags: --sync (async: false), --skip-spec

Or by hand: put the class anywhere autoloadable (e.g. app/subscribers/), then register it in an initializer — subscribers are NOT auto-discovered, and an unregistered subscriber is a silent no-op:

# config/initializers/spree.rb
Rails.application.config.after_initialize do
  Spree.subscribers << OrderCompleteSubscriber
end
# app/subscribers/order_complete_subscriber.rb
class OrderCompleteSubscriber < Spree::Subscriber
  subscribes_to 'order.completed'

  def handle(event)
    order_id = event.payload['id']
    ExternalErp.sync_order(order_id)
  end
end

Read the full file on GitHub · 505 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. 10d ago First seen · 505 lines · 145 tokens per session scan A 63fb74940421

Subscribe to this mod's changes

spree-events-webhooks is a skill published in the GitHub repository spree/agent-skills (4 stars, last pushed 2mo ago), licensed MIT. It adds 145 tokens to every session and 4,601 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