shopify-functions
Installation
SKILL.md
Shopify Functions
Shopify Functions are WebAssembly (WASM) units of business logic that extend the Shopify checkout, order, and fulfillment pipelines. They execute in a sandboxed runtime on Shopify's servers and have strict constraints: 5ms execution window, 256KB binary limit, no async I/O, no outbound HTTP to unknown hosts, and 30-point GraphQL query complexity ceiling.
Architecture & Execution Model
Function Lifecycle:
- Merchant installs your app; metafield definitions are registered
- App reads merchant configuration from metafields (Shop, Product, Collection scopes)
- On checkout/order event, Shopify invokes your function with Input JSON payload
- Function executes WASM bytecode, applies business logic, returns JSON output
- Output mutations are applied atomically to the checkout/order state