/shopify-pack:shopify-functionsfrom shopify-pack
Builds Shopify Functions for custom discount, payment, and delivery logic running in a WASM sandbox at checkout. Use for cart transformations that execute server-side.
Ships in shopify-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Shopify Functions execute custom business logic in a WebAssembly sandbox at checkout: discounts, payment filtering, delivery customization, and cart transforms. They run server-side with strict constraints (11ms execution, 1MB memory, no network access) and replace Shopify Scripts.
npm install -g @shopify/cli)# extensions/product-discount/shopify.extension.toml
api_version = "2025-01"
type = "product_discounts"
[[targeting]]
target = "purchase.product-discount.run"
input_query = "extensions/product-discount/input.graphql"
export = "run"
The input query declares what data your function receives at runtime:
# extensions/product-discount/input.graphql
query Input {
cart {
lines {
quantity
merchandise {
... on ProductVariant {
id
product { hasAnyTag(tags: ["VIP-DISCOUNT"]) }
}
}
}
}
discountNode {
metafield(namespace: "$app:discount-config", key: "percentage") { value }
}
}
// extensions/product-discount/src/run.ts
import type { Input, FunctionRunResult } from "../generated/api";
export function run(input: Input): FunctionRunResult {
const percentage = parseFloat(input.discountNode?.metafield?.value ?? "0");
if (percentage === 0) return { discounts: [], discountApplicationStrategy: "FIRST" };
const targets = input.cart.lines
.filter((line) => line.merchandise.product.hasAnyTag)
.map((line) => ({ productVariant: { id: line.merchandise.id } }));
return {
discounts: [{
targets,
value: { percentage: { value: percentage.toString() } },
message: `${percentage}% VIP Discount`,
}],
discountApplicationStrategy: "FIRST",
};
}
shopify app function typegen # Generate types from input query
shopify app function build # Build to WASM
shopify app function run --input test-input.json # Test locally
shopify app deploy # Deploy with app
See function-types.md for all function types, input-output-schemas.md for I/O shapes, and wasm-constraints.md for sandbox limitations.
| Error | Cause | Solution |
|---|---|---|
FunctionError | Runtime panic or unhandled exception in WASM | Add error handling; check optional fields for null |
FUNCTION_TOO_LARGE | WASM binary exceeds 256KB | Tree-shake deps; use Rust for smaller binaries |
| Input query validation | Query references unavailable fields | Match api_version to available schema fields |
| Timeout (>11ms) | Function exceeds execution limit | Reduce iterations; pre-compute in metafields |
Build a product discount function that applies a configurable percentage off for items tagged "VIP-DISCOUNT" using metafield-driven configuration.
See Function Types for all available function types and their targeting.
Design the GraphQL input query that declares what cart data your function receives, and return the correctly shaped FunctionRunResult.
See Input/Output Schemas for I/O shapes per function type.
Your function hits the 11ms execution timeout or 256KB binary size limit. Apply optimization strategies for the constrained WASM environment.
See WASM Constraints for sandbox limitations and workarounds.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin shopify-pack38 skills in this plugin
/shopify-advanced-troubleshootingDebug complex Shopify API issues using cost analysis, request tracing,
webhook delivery inspection, and GraphQL introspection.
Use when encountering intermittent failures, throttling mysteries, or webhook delivery gaps.
Trigger with phrases like "shopify hard bug", "shopify mystery error",
"shopify deep debug", "difficult shopify issue", "shopify intermittent failure".
/shopify-ai-toolkit-wrapperIntegrate Shopify's AI Toolkit MCP server with Claude Code for GraphQL validation,
Liquid linting, and documentation search.
Use when setting up Shopify MCP integration, validating GraphQL queries,
or linting Liquid templates.
Trigger with phrases like "shopify ai toolkit", "shopify mcp",
"shopify claude integration", "shopify graphql validation", "shopify liquid lint".
/shopify-architecture-variantsChoose between Shopify app architectures: embedded Remix app, headless storefront with
Hydrogen, standalone integration, or theme app extension.
Use when starting a new Shopify project and deciding which architecture pattern to follow.
Trigger with phrases like "shopify architecture decision", "shopify embedded vs headless",
"shopify Hydrogen", "shopify app types", "which shopify architecture".
2 plugins ship this exact skill · first indexed Jul 10, 2026
Other plugins' skills for the same job