Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

shopify-graphql-cost-optimizer

Skill by jeremylongshore

Explains how to manage Shopify's calculated GraphQL query cost and avoid throttling. Aimed at developers building Shopify apps who hit THROTTLED errors or need to optimize Admin API queries.

  • Score 79
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install shopify-graphql-cost-optimizer

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/shopify-graphql-cost-optimizer ~/.claude/skills/shopify-graphql-cost-optimizer

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install shopify-graphql-cost-optimizer in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill explains how to manage the calculated query cost of Shopify's GraphQL Admin API so that requests avoid throttling. It describes the token bucket model, which has a 1,000 point maximum and refills at 50 points per second for standard plans. It shows how to read cost data in extensions.cost, including requestedQueryCost and actualQueryCost, and how to predict a query's cost before running it.

The skill covers cost reduction techniques such as smaller first values, selecting fewer fields, and avoiding deep nesting. For large exports of 250 or more items, it recommends bulk operations, which bypass the cost system. It also lists common errors such as THROTTLED and MAX_COST_EXCEEDED. It is aimed at developers building Shopify apps who hit throttling or want to optimize GraphQL queries.

Written from the project's SKILL.md and checked against it.

What it can do

  • Read cost headersReads cost data in extensions.cost, including requested and actual query cost and the throttle status.
  • Predict query costEstimates a query's cost using connection and field rules before running it.
  • Cost reduction techniquesLowers cost by reducing first values, selecting fewer fields and avoiding deep nesting.
  • Bulk operationsCovers bulkOperationRunQuery, polling and JSONL download for large data sets.
  • Error handlingExplains THROTTLED, MAX_COST_EXCEEDED, QUERY_TOO_COMPLEX and bulk operation errors and their fixes.

What you need

  • Shopify app with GraphQL Admin API access
  • @shopify/shopify-api package
  • Understanding of GraphQL connections (edges/node pattern)
  • Claude Code

Try asking

  • Estimate the query cost of my Shopify products query with variants
  • Why is my Shopify GraphQL request returning THROTTLED errors?
  • Should I use a bulk operation to export 10,000 Shopify products?

Good to know

  • Only one bulk operation per app per store is allowed at a time.
  • A single query over 1,000 points fails with MAX_COST_EXCEEDED.
  • Designed for Claude Code.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/shopify-graphql-cost-optimizer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditBash(npm:*)Grep

  • SKILL.md5 KB
  • references/bulk-operations.md6 KB
  • references/cost-calculation-rules.md4 KB
  • references/query-splitting.md4 KB

Alternatives to shopify-graphql-cost-optimizer

All alternatives →

Compare with shopify, shopify-development or ticketmaster

shopify-graphql-cost-optimizer: common questions

How does Shopify calculate GraphQL query cost?

Each object field costs 1 point. A connection costs its first or last value multiplied by the child cost, plus 2, and nested connections multiply.

When should I use bulk operations instead of paginated queries?

The skill recommends bulk operations when you need 250 or more items, since bulkOperationRunQuery bypasses the cost system and returns JSONL.

Can I run more than one bulk operation at a time?

No. The source says only one bulk operation per app per store is allowed, so poll the current operation before starting another.

How do I install shopify-graphql-cost-optimizer?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is shopify-graphql-cost-optimizer free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is shopify-graphql-cost-optimizer safe to use?

It scores 79 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to shopify-graphql-cost-optimizer?

Similar skills: shopify, shopify-development, ticketmaster, seo-ecommerce.

shopify-graphql-cost-optimizer Install

Add to stack

Loading.