Skip to content
Skills Library
Programming · Building & coding

shopify-performance-tuning

/shopify-performance-tuning

Optimize Shopify API performance with GraphQL query cost reduction, bulk operations, caching strategies, and Storefront API for high-traffic storefronts. Use when queries are slow or hitting THROTTLED errors, exporting large datasets, or optimizing API throughput for a high-traffic storefront. Trigger with phrases like "shopify performance", "optimize shopify", "shopify slow", "shopify caching", "shopify bulk operation", "shopify query cost".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Optimize Shopify API performance with GraphQL query cost reduction, bulk operations, caching strategies, and Storefront API for high-traffic storefronts. Use when queries are slow or hitting THROTTLED errors, exporting large datasets, or optimizing API throughput for a high-traffic storefront. Trigger with phrases like "shopify performance", "optimize shopify", "shopify slow", "shopify caching", "shopify bulk operation", "shopify query cost".

Triggers from the description

shopify performanceoptimize shopifyshopify slowshopify cachingshopify bulk operationshopify query cost
Original author description

Optimize Shopify API performance with GraphQL query cost reduction, bulk operations, caching strategies, and Storefront API for high-traffic storefronts. Use when queries are slow or hitting THROTTLED errors, exporting large datasets, or optimizing API throughput for a high-traffic storefront. Trigger with phrases like "shopify performance", "optimize shopify", "shopify slow", "shopify caching", "shopify bulk operation", "shopify query cost".

How it works

  1. Overview
  2. Prerequisites
  3. Instructions
  4. Output
  5. Error Handling
  6. Examples
  7. Resources
Original SKILL.md headings · 81 lines, 448 words
SKILL.md preview
---
name: shopify-performance-tuning
description: 'Optimize Shopify API performance with GraphQL query cost reduction,
  bulk operations,

  caching strategies, and Storefront API for high-traffic storefronts.

  Use when queries are slow or hitting THROTTLED errors, exporting large datasets,

  or optimizing API throughput for a high-traffic storefront.

  Trigger with phrases like "shopify performance", "optimize shopify",

  "shopify slow", "shopify caching", "shopify bulk operation", "shopify query cost".

  '
allowed-tools: Read, Write, Edit
version: 2.7.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- ecommerce
- shopify
compatibility: Designed for Claude Code
---
# Shopify Performance Tuning

## Overview

Optimize Shopify API performance through GraphQL query cost reduction, bulk operations for large data exports, response caching, and Storefront API for high-traffic public-facing queries.

## Prerequisites

- Understanding of Shopify's calculated query cost system
- Access to the `Shopify-GraphQL-Cost-Debug: 1` header for cost analysis
- Redis or in-memory cache available (optional)

## Instructions

### Step 1: Analyze and Reduce Query Cost

Use the debug header to inspect `requestedQueryCost` vs `actualQueryCost`. Reduce cost by selecting only needed fields and lowering `first:` page sizes (250 to 50 can cut cost by 5x).

See [Query Cost Optimization](references/query-cost-optimization.md) for debug commands and before/after examples.

### Step 2: Use Bulk Operations for Large Exports

Bulk operations bypass rate limits and are designed for exporting large datasets. Start a mutation, poll for completion, then download JSONL results.

See [Bulk Operations](references/bulk-operations.md) for the complete mutation/poll/download flow and performance comparison table.

### Step 3: Cache Frequently Accessed Data

LRU cache layer with webhook-driven invalidation. Cache product data for 5 minutes, then clear on `products/update` webhook events.

See [Response Caching](references/response-caching.md) for the complete implementation.

### Step 4: Use Storefront API for Public Queries

The Storefront API has separate rate limits and is designed for high-traffic public storefronts. Uses `LATEST_API_VERSION` from `@shopify/shopify-api`.

See [Storefront API Usage](references/storefront-api-usage.md) for the complete implementation.

## Output

- Query costs reduced through field selection and page size optimization
- Bulk operations configured for large data exports
- Response caching with webhook-driven invalidation
- Storefront API used for public-facing high-traffic queries

## Error Handling

| Issue | Cause | Solution |
|-------|-------|----------|
| `THROTTLED` on every query | `requestedQueryCost` too high | Reduce `first:` and remove unused fields |
| Bulk operation FAILED | Query syntax error | Test query in GraphiQL first |
| Stale cache data | Cache not invalidated | Add webhook handlers to clear cache |
| Storefront API 403 | Wrong token type | Use Storefront API access token, not Admin |

## Examples

### Reducing Query Cost on a Product Sync

A product sync job hits THROTTLED errors. Analyze the cost breakdown, reduce `first:` page sizes, and remove unused fields.

See [Query Cost Optimization](references/query-cost-optimization.md) for debug commands and before/after examples.

### Exporting Orders with Bulk Operations

Export 50,000 orders with line items using a bulk operation that bypasses rate limits and returns JSONL results.

See [Bulk Operations](references/bulk-operations.md) for the complete mutation, polling, and download flow.

### Caching Product Data with Webhook Invalidation

Add an LRU cache layer for product queries that auto-invalidates when `products/update` webhook events fire.

See [Response Caching](references/response-caching.md) for the complete caching implementation.

## Resources

- [GraphQL Rate Limits](https://shopify.dev/docs/api/usage/rate-limits#graphql-admin-api-rate-limits)
- [Bulk Operations](https://shopify.dev/docs/api/usage/bulk-operations/queries)
- [Storefront API](https://shopify.dev/docs/api/storefront)
- [Query Cost Debug Header](https://shopify.dev/docs/api/usage/rate-limits#query-cost)
Files in this package (5)
  • SKILL.md 4 KB
  • references/bulk-operations.md 2 KB
  • references/query-cost-optimization.md 2 KB
  • references/response-caching.md 1 KB
  • references/storefront-api-usage.md 1 KB

Versions

The database has no other skills named shopify-performance-tuning.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 0e62a9d1cbbc (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100shopify-graphql-cost-optimizer
    Master Shopify''s calculated query cost system to avoid throttling. Use when hitting THROTTLED errors, optimizing GraphQL queries, or deciding when to use bulk operations instead. Trigger with phrases like "shopify query cost", "shopify graphql cost", "shopify rate limit…
  • 100shopify-api-graphql
    Use Shopify GraphQL APIs — Admin API for server-side CRUD, Storefront API for client-side queries, versioning, cost-based rate limiting, bulk operations, pagination. Use when integrating with Shopify data.
  • 100shopify-rate-limits
    Handle Shopify API rate limits for both REST (leaky bucket) and GraphQL (calculated query cost). Use when hitting 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "shopify rate limit", "shopify throttling", "shopify 429",…
  • 95shopify-storefront-graphql
    Use for custom storefronts requiring direct GraphQL queries/mutations for data fetching and cart operations. Choose this when you need full control over data fetching and rendering your own UI. NOT for Web Components - if the prompt mentions HTML tags like <shopify-store>,…
  • 100shopify-hydrogen
    Build headless Shopify storefronts with Hydrogen — Remix-based framework, Oxygen deployment, storefront.query(), caching strategies, cart, customer accounts, SEO, and analytics. Use when building custom Shopify storefronts.
  • 100shopify-expert
    Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.