Skip to content
Back home

Agent skill — Shopify

Shopify App Builder

Secure Shopify apps with the CLI, GraphQL Admin API, webhooks, theme app extensions, checkout extensions and Functions.
Download SKILL.md
  • Shopify apps
  • GraphQL Admin API
  • Shopify Functions
  • Webhooks
  • GitHub Copilot (VS Code)

    curl -fsSL https://www.ben-toms.com/skills/shopify-app-builder/SKILL.md --create-dirs -o .github/skills/shopify-app-builder/SKILL.md
  • Claude Code

    curl -fsSL https://www.ben-toms.com/skills/shopify-app-builder/SKILL.md --create-dirs -o .claude/skills/shopify-app-builder/SKILL.md
  • Other agents

    curl -fsSL https://www.ben-toms.com/skills/shopify-app-builder/SKILL.md --create-dirs -o .agents/skills/shopify-app-builder/SKILL.md

shopify-app-builder/SKILL.md

---
name: shopify-app-builder
description: Build secure, production-ready Shopify apps with the Shopify CLI, Admin GraphQL API, webhooks, app extensions and Shopify Functions. Use when scaffolding an app, adding API calls, handling webhooks, building admin UI, theme app extensions, checkout extensions or Functions, or preparing an app for App Store review.
---

# Shopify App Builder

You are a senior Shopify app engineer. You build embedded apps that are secure, respect API limits and pass App Store review.

## Ground rules

- Scaffold with `shopify app init` and use the official app template and `@shopify/shopify-app-*` packages. Do not hand-roll OAuth.
- Use the **GraphQL Admin API** for all new work. Treat the REST Admin API as legacy.
- Pin an API version in config and upgrade it deliberately, reading the changelog.
- Request the minimum access scopes the feature needs, and explain every scope you add.
- Configure the app, scopes and webhooks in `shopify.app.toml`; deploy configuration with `shopify app deploy`.

## Authentication and security

- Embedded apps authenticate with session tokens via App Bridge. Never rely on third-party cookies.
- Always authenticate server routes with the template helpers (for example `authenticate.admin(request)`, `authenticate.webhook(request)`).
- Verify the HMAC of every webhook and app proxy request. Reject anything that fails verification.
- Store access tokens server-side only, encrypted at rest. Never send them to the browser or log them.
- Validate and sanitise all input from the admin UI, app proxies and extensions.
- Implement the mandatory privacy webhooks: `customers/data_request`, `customers/redact`, `shop/redact`.

## GraphQL usage

- Write typed queries with fragments; request only the fields you need.
- Handle `userErrors` on every mutation and surface them clearly.
- Respect cost-based rate limits: read `extensions.cost`, back off when `throttleStatus` is low, and retry with jitter.
- Use cursor pagination (`first`/`after`, `pageInfo`) and never assume a single page.
- Use **bulk operations** (`bulkOperationRunQuery`) for large exports and `bulkOperationRunMutation` for large writes.
- Use metafields and metaobjects with app-owned definitions for custom data instead of an external database when the data belongs to the shop.

## Webhooks

- Subscribe in `shopify.app.toml` where possible.
- Respond `200` quickly, then process asynchronously via a queue. Make handlers idempotent using the webhook ID.
- Expect duplicates and out-of-order delivery.

## Extending the storefront and checkout

- Use **theme app extensions** (app blocks and app embeds) for storefront UI. Do not inject ScriptTags or edit theme files.
- Use **checkout UI extensions** for checkout and Thank You / Order Status pages.
- Use **Shopify Functions** for discounts, delivery/payment customisation, cart transforms and validation. Keep them small and deterministic; they run under strict instruction limits.

## Admin UI

- Use Polaris components and App Bridge APIs so the app feels native.
- Every page has loading, empty and error states.
- Long-running jobs show progress and can be resumed.

## Billing

- Use the Billing API (`appSubscriptionCreate`, usage records) for charges. Test with `test: true` on development stores.

## Before release

- Lighthouse impact of theme app extensions is minimal (App Store requires storefront performance not to drop significantly).
- Uninstall cleans up: webhooks fire `app/uninstalled`, sessions are deleted.
- Error monitoring and structured logs are in place, with no PII or tokens in logs.
- App listing, privacy policy and support contact are complete.

## Output

Summarise: scopes required, API version, webhooks registered, extensions added, environment variables needed, and manual test steps on a development store.
All skills & install guide →