shopify-functions

shopify-functions is a skill for Claude Code, Codex from dragnoir/Shopify-agent-skills. It costs 50 tokens per session (2,987 once invoked), scanned A, original, MIT.

A guide for Shopify Functions, which are small programs that change selected parts of Shopify's backend behavior. They run on Shopify's infrastructure and can be written in Rust or JavaScript.

In plain words
What is it for?
Use it to create custom discounts, hide or reorder delivery and payment methods, validate carts and checkouts, change cart contents, or route orders to fulfillment locations.
Why use it?
It provides a defined way to add store rules without running that logic on your own server. This helps handle checkout checks, discounts, delivery choices, payment rules, and fulfillment decisions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { DiscountApplicationStrategy } from "../generated/api";.

Good fit Use it to create custom discounts, hide or reorder delivery and payment methods, validate carts and checkouts, change cart contents, or route orders to fulfillment locations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dragnoir/Shopify-agent-skills
agentmods
npx agentmods add skills/dragnoir/shopify-agent-skills/shopify-functions

Made for: Claude Code, Codex.

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 shopify-functions

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dragnoir/shopify-agent-skills/shopify-functions"><img src="https://agentmods.dev/badge/skills/dragnoir/shopify-agent-skills/shopify-functions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,987 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.00050 $0.02987
Opus 5 $0.00025 $0.01494
Sonnet 5 $0.00010 $0.00597
Haiku 4.5 $0.00005 $0.00299

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

Security

Grade A, and why

shopify-functions 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 11d 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/shopify-functions/SKILL.md · 532 lines

How it starts

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

Shopify Functions

When to use this skill

Use this skill when:

  • Creating custom discount logic
  • Customizing delivery options
  • Implementing payment method rules
  • Validating cart or checkout
  • Building order routing logic
  • Extending Shopify's backend behavior

What are Shopify Functions?

Functions are serverless WebAssembly modules that extend Shopify's backend logic. They:

  • Run on Shopify's infrastructure
  • Execute in milliseconds
  • Scale automatically
  • Are upgrade-safe

Function Types

API Purpose
Discounts Product, order, and shipping discounts
Delivery Customization Rename, reorder, hide shipping options
Payment Customization Filter, reorder payment methods
Cart & Checkout Validation Block checkout with errors
Order Routing Control fulfillment locations
Cart Transform Modify cart contents

Getting Started

1. Create a Function

# In an existing app
shopify app generate extension

# Select from function types:
# - Delivery customization
# - Product discount
# - Order discount
# - Cart & Checkout Validation
# - etc.

2. Choose a Language

Rust (Recommended) - Best performance, handles large carts

JavaScript - Easier to learn, good for simpler logic

3. Function Structure

extensions/
└── my-discount/
    ├── src/
    │   └── run.rs (or run.js)
    ├── input.graphql
    ├── shopify.extension.toml
    └── Cargo.toml (for Rust)

Function Anatomy

Configuration (shopify.extension.toml)

api_version = "2025-01"

[[extensions]]
name = "Volume Discount"
handle = "volume-discount"
type = "function"

[[extensions.targeting]]
target = "purchase.product-discount.run"
input_query = "src/run.graphql"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/volume-discount.wasm"

Read the full file on GitHub · 532 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. 11d ago First seen · 532 lines · 50 tokens per session scan A 1ca764da594e

Subscribe to this mod's changes

shopify-functions is a skill published in the GitHub repository dragnoir/Shopify-agent-skills (48 stars, last pushed 7mo ago), licensed MIT. It adds 50 tokens to every session and 2,987 once invoked, about $0.0003 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-30.

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

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

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