
Shopify Functions
Install this when you are building Shopify Function extensions (discounts, cart transforms, delivery customization) and need agent-guided workflows against official Shopify.dev documentation.
Overview
Shopify-functions is an agent skill for the Build phase that guides solo builders through Shopify Function extensions and official Shopify.dev documentation search.
Install
npx skills add https://github.com/shopify/shopify-ai-toolkit --skill shopify-functionsWhat is this skill?
- Guides creation and configuration of Shopify Function extension targets (discount, cart, delivery, payment, and related
- Uses Shopify.dev documentation search to ground answers in current platform contracts and examples
- Supports staging vs production doc bases via environment-driven Shopify dev URLs and Minerva auth for internal staging
- Fits solo and indie builders shipping custom checkout and cart logic on Shopify
- Pairs with Shopify app scaffolding, CLI deploy, and extension versioning in a typical build pipeline
Adoption & trust: 5.3k installs on skills.sh; 373 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need custom cart, discount, or checkout logic on Shopify but the Functions APIs, targets, and deployment steps are easy to mix up without anchored docs.
Who is it for?
Indie developers and small teams building Shopify apps or extensions that require Functions rather than only theme Liquid or Storefront API tweaks.
Skip if: Merchants who only need theme edits, non-Shopify stacks, or teams that already have an approved Functions spec and only want generic code review with no Shopify context.
When should I use this skill?
When implementing or debugging Shopify Function extensions and you need answers grounded in current Shopify.dev documentation.
What do I get? / Deliverables
You leave with a clearer Functions implementation path—targets, schemas, and doc-backed steps—ready to code and deploy with the Shopify CLI.
- Doc-backed implementation notes for a specific Function target
- Extension configuration and handler outline aligned with Shopify schemas
- Checklist of deploy and validation steps before Partner submission
Recommended Skills
Journey fit
Shopify Functions are shipped as part of a Shopify app or extension during product build, not during idea validation or post-launch growth. The skill centers on platform integration with Shopify’s Functions runtime, schemas, and deployment—not generic frontend UI or PM docs alone.
How it compares
Use this for Shopify Functions and platform docs grounding, not as a generic Node backend generator or a storefront-only theme skill.
Common Questions / FAQ
Who is shopify-functions for?
It is for solo builders and small teams developing Shopify apps or extensions who need Functions-specific guidance tied to Shopify.dev documentation.
When should I use shopify-functions?
Use it in the build phase while designing and implementing Function extensions—for example discount functions before launch, cart transforms during checkout customization, or delivery rules as you integrate shipping logic—whenever you need doc-accurate Shopify platform steps.
Is shopify-functions safe to install?
Treat it like any third-party agent skill: review what your agent can access (network, repo files) and check the Security Audits panel on this Prism catalog page before enabling it in production Shopify Partner accounts.
SKILL.md
READMESKILL.md - Shopify Functions
#!/usr/bin/env node // <define:__SUPPORTED_VERSIONS__> var define_SUPPORTED_VERSIONS_default = []; // src/agent-skills/scripts/search_docs.ts import { parseArgs } from "util"; // src/http/index.ts var PROD_BASE_URL = "https://shopify.dev/"; var SHOP_DEV_BASE_URL = "https://shopify-dev.shop.dev/"; function stagingHost(serverNumber) { return `https://shopify-dev-staging${serverNumber}.shopifycloud.com/`; } function resolveShopifyDevBaseUrl(options) { const env = options?.env ?? process.env; const stagingRaw = env.SHOPIFY_DEV_STAGING_SERVER_NUMBER?.trim(); if (stagingRaw) { if (!/^\d+$/.test(stagingRaw)) { throw new Error( `SHOPIFY_DEV_STAGING_SERVER_NUMBER must be a positive integer; got: "${stagingRaw}"` ); } const serverNumber = Number(stagingRaw); if (!Number.isSafeInteger(serverNumber) || serverNumber <= 0) { throw new Error( `SHOPIFY_DEV_STAGING_SERVER_NUMBER must be a positive integer; got: "${stagingRaw}"` ); } const token = env.MINERVA_TOKEN; if (!token) { const audience = stagingHost(serverNumber).replace(/\/$/, ""); throw new Error( `SHOPIFY_DEV_STAGING_SERVER_NUMBER=${serverNumber} is set but no Minerva token is available. Staging servers are behind Minerva. Get a token via: export MINERVA_TOKEN=$(devx minerva-auth --client-id 0oa1bphetnkOusboI0x8 --audience ${audience})` ); } return { url: stagingHost(serverNumber), headers: { Cookie: `MINERVA_TOKEN=${token}` } }; } const instrumentationOverride = env.SHOPIFY_DEV_INSTRUMENTATION_URL?.trim(); if (instrumentationOverride && options?.uri?.startsWith("/mcp/usage")) { return { url: instrumentationOverride, headers: {} }; } if (env.DEV && env.DEV !== "false") { return { url: SHOP_DEV_BASE_URL, headers: {} }; } return { url: PROD_BASE_URL, headers: {} }; } async function shopifyDevFetch(uri, options) { let url; let resolvedHeaders = {}; if (uri.startsWith("http://") || uri.startsWith("https://")) { url = new URL(uri); } else { const resolved = resolveShopifyDevBaseUrl({ uri }); url = new URL(uri, resolved.url); resolvedHeaders = resolved.headers; } if (options?.parameters) { Object.entries(options.parameters).forEach(([key, value]) => { url.searchParams.append(key, value); }); } const response = await fetch(url.toString(), { method: options?.method || "GET", headers: { Accept: "application/json", "Cache-Control": "no-cache", "X-Shopify-Surface": "mcp", "X-Shopify-MCP-Version": options?.instrumentation?.packageVersion || "", "X-Shopify-Timestamp": options?.instrumentation?.timestamp || "", ...resolvedHeaders, ...options?.headers }, ...options?.body && { body: options.body } }); if (!response.ok) { let errorBody; try { errorBody = await response.text(); } catch { } throw new Error( errorBody ? `HTTP ${response.status}: ${errorBody}` : `HTTP error! status: ${response.status}` ); } return await response.text(); } // src/data/supported-versions-schema.json var supported_versions_schema_default = { admin: [ { name: "unstable" }, { name: "2026-07", releaseCandidate: true }, { name: "2026-04", latestVersion: true }, { name: "2026-01" }, { name: "2025-10" }, { name: "2025-07" } ], "storefront-graphql": [ { name: "unstable" }, { name: "2026-07", releaseCandidate: true }, { name: "2026-04", latestVersion: true }, { name: "2026-01" }, { name: "2025-10" }, { name: "2025-07" } ], partner: [ { name: "unstable" }, { name: "2026-07", releaseCandidate: true }, { name: "2026-04", latestVersion: true }, { name: "2026-01" }, {