← ClaudeAtlas

shopify-functionslisted

Build WebAssembly functions for the Shopify checkout and order pipeline. Rust or JavaScript, 5ms execution window, 256KB binary limit. Targets cart transform, discount, validation, payment customization, delivery customization, order routing, fulfillment constraints, and localization. Triggers include: 'Shopify Function', 'WASM', 'Rust function', 'JavaScript function', 'function-runner', 'cart.transform.run', 'discount.run', 'cart.checkout-validation.run', 'cart.delivery-customization.run', 'cart.payment-customization.run', 'cart.lines.discounts.generate.run', 'order.routing.location.rank.run', 'fulfillment-constraints.run', 'localization.generate.run', 'metafield function', 'shopify function'.
khadinakbarlabs/shopify-app-builder · ★ 1 · AI & Automation · score 62
Install: claude install-skill khadinakbarlabs/shopify-app-builder
# 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:** 1. Merchant installs your app; metafield definitions are registered 2. App reads merchant configuration from metafields (Shop, Product, Collection scopes) 3. On checkout/order event, Shopify invokes your function with Input JSON payload 4. Function executes WASM bytecode, applies business logic, returns JSON output 5. Output mutations are applied atomically to the checkout/order state **Execution Constraints (Hard Limits):** - Max execution time: 5ms (timeout failure = no operation) - Max binary size: 256KB gzipped - Max instructions: 11 million - Max memory: 256KB heap - Max output JSON: 256KB - Max GraphQL query complexity: 30 points (estimate 1pt per simple field) - No async I/O, no event loops, no multi-threading - No network access except allowed_hosts (NEW 2025-01) - Deterministic execution only **Why WASM?** Shopify Functions run in Wasmtime, a fast WebAssembly runtime. This provides: - Language flexibility: Compile Rust, JavaScript (via AssemblyScript), or Go to WASM - Isolation: No access to host filesystem, process, or network (except