shopify-functions

shopify-functions is a skill for Claude Code, Codex from Shopify/Shopify-AI-Toolkit. It costs 61 tokens per session (7,200 once invoked), scanned A, original, MIT.

A Shopify Functions development skill for customizing backend behavior in parts of a Shopify store. Shopify Functions can change discounts, cart and checkout validation, delivery options, fulfillment rules, and order routing.

In plain words
What is it for?
Use it to build Shopify Functions for discounts, cart changes, checkout checks, delivery customization, fulfillment constraints, pickup options, or order routing.
Why use it?
It helps developers choose and implement the right backend customization while following Shopify’s required documentation search and code-validation process.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the shopify-plugin plugin — 22 skills, 2 hooks shipped together

About the project

Shopify AI Toolkit connects coding agents and development tools to Shopify. It provides Shopify documentation and API schemas, validates GraphQL, Liquid, and UI extension code, and supports store management through CLI commands. Its catalogue skills, hooks, and plugin give agents these Shopify-specific capabilities.

Shopify/Shopify-AI-Toolkit · 531 stars · on GitHub

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/shopify/shopify-ai-toolkit/shopify-functions
Any agent
npx skills add Shopify/Shopify-AI-Toolkit --skill shopify-functions
Clone the repo
git clone --depth 1 https://github.com/Shopify/Shopify-AI-Toolkit

Made for: Claude Code, Codex.

Or install shopify-plugin, the plugin that ships this one along with the rest of its 22 skills, 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 shopify-functions

README.md
[![agentmods](https://agentmods.dev/badge/skills/shopify/shopify-ai-toolkit/shopify-functions.svg)](https://agentmods.dev/skills/shopify/shopify-ai-toolkit/shopify-functions)
Your own site
<a href="https://agentmods.dev/skills/shopify/shopify-ai-toolkit/shopify-functions"><img src="https://agentmods.dev/badge/skills/shopify/shopify-ai-toolkit/shopify-functions.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,200 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.1 $0.00061 $0.07200
Opus 5 $0.00030 $0.03600
Sonnet 5 $0.00012 $0.01440
Haiku 4.5 $0.00006 $0.00720

Measured yesterday against content hash 293f8aaad0c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 yesterday.

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 · 431 lines

How it starts

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

Required Tool Calls (do not skip)

Each bundled .mjs helper supports -h and --help for complete usage and option details.

You have a bash tool. Every response must use it — in this order:

  1. Call bash with scripts/search_docs.mjs "<query>" --version API_VERSION — search before writing code
  2. Write the code using the search results
  3. Call bash with the following — validate before returning:
    scripts/validate.mjs --code '...' --user-prompt-base64 'BASE64_OF_USER_PROMPT' --session-id YOUR_SESSION_ID --tool-use-id YOUR_TOOL_USE_ID --model YOUR_MODEL_NAME --client-name YOUR_CLIENT_NAME --client-version YOUR_CLIENT_VERSION --artifact-id YOUR_ARTIFACT_ID --revision REVISION_NUMBER --api <api-name> [--version <api-version>]
    
    (Always include these flags. Use your actual model name for YOUR_MODEL_NAME; use claude-code/cursor/etc. for YOUR_CLIENT_NAME. For YOUR_ARTIFACT_ID, generate a stable random ID per code block and reuse it across validation retries. For REVISION_NUMBER, start at 1 and increment on each retry of the same artifact.) Pass --api with the API this code targets (e.g. functions_cart_checkout_validation, functions_cart_transform); validation will fail without it. Pass --version (e.g. 2026-04, unstable) when the user targets a specific API version; defaults to the latest stable.
  4. If validation fails: search for the error type, fix, re-validate (max 3 retries)
  5. Return code only after validation passes

You must run both search_docs.mjs and validate.mjs in every response. Do not return code to the user without completing step 3.

Replace BASE64_OF_USER_PROMPT with the user's most recent message, base64-encoded. Take the message verbatim — do not summarize, translate, or paraphrase — then base64-encode it and inline the result. Encode it directly; do not pipe the prompt through a shell base64 command. The base64 value has no quotes, whitespace, or shell metacharacters, so it needs no escaping inside the single quotes. The decoded prompt is truncated at 2000 chars server-side.

Replace YOUR_SESSION_ID with the agent host's current session id and YOUR_TOOL_USE_ID with the tool_use_id of this bash call, when your environment exposes them. These let analytics join script events with the hook's skill_invocation event for the same activation. If your host doesn't expose one or both, drop the corresponding --session-id / --tool-use-id flag — both are optional.


Shopify functions allow developers to customize the backend logic that powers parts of Shopify.

  • Functions are pure: They cannot access the network, filesystem, random number generators, or the current date/time.
  • All necessary data must be provided via the input query. Input queries must follow camelCase. If selecting a field that is a UNION type you must request __typename

Here are all the available Shopify functions APIs. Ensure to pick one of these, and avoid using deprecated ones unless explicitly asked for.

  • Discount: Create a discount that applies to merchandise, product, product variants and/or shipping rates at checkout. Use this for ANY discount related task.
  • Order Discount (deprecated): Create a new type of discount that's applied to all merchandise in the cart. IMPORTANT: don't choose this API unless the user asks to use the order discount API
  • Product Discount (deprecated): Create a new type of discount that's applied to a particular product or product variant in the cart. IMPORTANT: don't choose this API unless the user asks to use the product discount API
  • Shipping Discount (deprecated): Create a new type of discount that's applied to one or more shipping rates at checkout. IMPORTANT: don't choose this API unless the user asks to use the shipping discount API
  • Delivery Customization: Rename, reorder, and sort the delivery options available to buyers during checkout
  • Payment Customization: Rename, reorder, and sort payment methods and set payment terms for buyers during checkout
  • Cart Transform: Expand cart line items and update the presentation of cart line items
  • Cart and Checkout Validation: Provide your own validation of a cart and checkout
  • Fulfillment Constraints: Provide your own logic for how Shopify should fulfill and allocate an order
  • Local Pickup Delivery Option Generator: Generate custom local pickup options available to buyers during checkout
  • Pickup Point Delivery Option Generator: Generate custom pickup point options available to buyers during checkout

Read the full file on GitHub · 431 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday Changed · +23 lines 293f8aaad0c2
  2. 6d ago First seen · 408 lines · 61 tokens per session scan A dd21a78224e0

Subscribe to this mod's changes

shopify-functions is a skill published in the GitHub repository Shopify/Shopify-AI-Toolkit (531 stars, last pushed 3d ago), licensed MIT. It adds 61 tokens to every session and 7,200 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

ecommerce-seo

E-commerce SEO audit for online stores (WooCommerce, Shopify, Magento, custom). Covers the structural problems unique to commerce sites: category / product listing pages (PLP), product detail pages (PDP), faceted navigation and the crawl-budget / duplicate-content traps it creates, pagination, canonical handling for…

nowork-studio/notfair-plugin · 235 tokens

paid-ads-amazon

Plan and review Amazon Ads with margin-aware ACoS, product, and search-term guardrails. Use for Amazon advertising, Sponsored Products, Sponsored Brands, Sponsored Display, ASIN targeting, Amazon ACoS, or Amazon Ads performance exports.

nowork-studio/notfair-plugin · 55 tokens

sumup

Implement SumUp checkout flows end-to-end. Use when writing or reviewing SumUp Checkouts API calls, Card Widget mounts, Hosted Checkout setup, recurring tokenization, Terminal SDK / Cloud API reader checkouts, or 3DS / webhook handling.

sumup/sumup-skills · 53 tokens

sumup-best-practices

Pick the right SumUp integration path and apply security best practices. Use when deciding between Hosted Checkout, Card Widget, Checkouts API, mobile SDKs, terminal SDKs, or Cloud API; choosing API key vs OAuth vs restricted keys; or reviewing SumUp integration security.

sumup/sumup-skills · 62 tokens

self-hosted-funnel-launch

Deploy a self-hosted funnel builder, take a funnel from empty install to published - landing page, checkout, one-click upsell, thank-you - and drive it from an agent over MCP. Covers deploying to Cloudflare Workers inside the free tier or to Docker, wiring payments, catalog and conversion tracking, and the MCP tool…

autonnel/autonnel-skills · 123 tokens

funnel-platform-picker

Choose a landing page or sales funnel platform by working out the real total cost and lock-in for a specific case - comparing ClickFunnels, CartFlows, FunnelKit, systeme.io, GoHighLevel, Shopify apps, hand-rolled pages and self-hosted open-source options. Use when asked which funnel builder or landing page builder to…

autonnel/autonnel-skills · 101 tokens