add-webhook

add-webhook is a command for coding agents from mentilead/shopify-app-skill. It costs 0 tokens per session (454 once invoked), scanned A, original, MIT.

A command that creates the files and registration needed for a Shopify webhook handler. A webhook is an HTTP message Shopify sends when an event, such as an order or product change, occurs.

In plain words
What is it for?
It helps add handlers for Shopify topics such as order creation, product updates, and app removal, using the project's expected route names.
Why use it?
It avoids repeatedly setting up request verification, duplicate-event protection, structured logs, successful responses, and privacy-related requirements by hand.

Command

Part of the shopify-app-skill plugin — 1 skill, 10 commands 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 commands/mentilead/shopify-app-skill/add-webhook
Clone the repo
git clone --depth 1 https://github.com/mentilead/shopify-app-skill

Or install shopify-app-skill, the plugin that ships this one along with the rest of its 1 skill, 10 commands.

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 add-webhook

README.md
[![agentmods](https://agentmods.dev/badge/commands/mentilead/shopify-app-skill/add-webhook.svg)](https://agentmods.dev/commands/mentilead/shopify-app-skill/add-webhook)
Your own site
<a href="https://agentmods.dev/commands/mentilead/shopify-app-skill/add-webhook"><img src="https://agentmods.dev/badge/commands/mentilead/shopify-app-skill/add-webhook.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 454 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.00000 $0.00454
Opus 5 $0.00000 $0.00227
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00045

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

Security

Grade A, and why

add-webhook 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 5d 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.

commands/add-webhook.md · 30 lines

What it actually says

Add Webhook Handler

Scaffold a new Shopify webhook handler with proper authentication, idempotency, and GDPR compliance.

Arguments

$ARGUMENTS = the Shopify webhook topic (e.g., "orders/create", "products/update", "app/uninstalled")

Instructions

  1. Parse the webhook topic from $ARGUMENTS. If empty, ask the user which webhook topic to handle.
  2. Read .claude/skills/shopify-app/references/webhook-patterns.md for the handler pattern and GDPR requirements.
  3. Read .claude/skills/shopify-app/references/react-router-patterns.md for file-naming conventions (webhooks use the webhooks. prefix).
  4. Determine the route filename from the topic:
    • orders/createapp/routes/webhooks.app.orders-create.tsx
    • products/updateapp/routes/webhooks.app.products-update.tsx
    • Replace / with . in the prefix, - in the specific topic part.
  5. Create the webhook handler route file with:
    • authenticate.webhook(request) for verification
    • Structured logging with shop, topic, and relevant payload fields
    • Idempotency check (query for existing record before processing)
    • Always return new Response(null, { status: 200 })
  6. Register the webhook in app/shopify.server.ts by adding the topic to the webhooks configuration if not already present.
  7. If the webhook needs to store data, create or update the relevant service function in app/services/*.server.ts with shopDomain as the first parameter.
  8. If the webhook needs new DynamoDB keys, read .claude/skills/shopify-app/references/dynamodb-patterns.md and update app/services/dynamodb/keys.ts.
  9. Create a unit test in tests/ for the service function logic (not the route handler itself).
  10. Remind the user to:
    • Run shopify app dev to register the webhook with Shopify
    • Test delivery via Shopify CLI: shopify app webhook trigger --topic <TOPIC> --address <URL>
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. 5d ago First seen · 30 lines · 0 tokens per session scan A fc62d00a486f

Subscribe to this mod's changes

add-webhook is a command published in the GitHub repository mentilead/shopify-app-skill (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 454 tokens. 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.