shopifyql

shopifyql is a skill for Claude Code, Codex from devkindhq/shopifyql-skill. It costs 138 tokens per session (3,922 once invoked), scanned A, original, MIT.

A guide for writing, debugging, and explaining ShopifyQL and Shopify Segment Query Language, languages used to analyse Shopify store data and define customer groups.

In plain words
What is it for?
Use it to query sales, sessions, products, customers, inventory, marketing, or finance data, and to create or troubleshoot customer segments.
Why use it?
It helps avoid query syntax errors and provides the required order and meaning of Shopify analytics clauses.

Skill for Claude CodeCodex

Part of the shopifyql plugin — 1 skill, 1 command, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/devkindhq/shopifyql-skill/shopifyql
Any agent
npx skills add devkindhq/shopifyql-skill --skill shopifyql
Clone the repo
git clone --depth 1 https://github.com/devkindhq/shopifyql-skill

Made for: Claude Code, Codex.

Or install shopifyql, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for shopifyql

README.md
[![agentmods](https://agentmods.dev/badge/skills/devkindhq/shopifyql-skill/shopifyql.svg)](https://agentmods.dev/skills/devkindhq/shopifyql-skill/shopifyql)
Your own site
<a href="https://agentmods.dev/skills/devkindhq/shopifyql-skill/shopifyql"><img src="https://agentmods.dev/badge/skills/devkindhq/shopifyql-skill/shopifyql.svg" alt="Measured on agentmods" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00138 $0.03922
Opus 5 $0.00069 $0.01961
Sonnet 5 $0.00028 $0.00784
Haiku 4.5 $0.00014 $0.00392

Measured 4d ago against content hash 0654af8ba668, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shopifyql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/shopifyql/SKILL.md · 472 lines

How it starts

The opening of the file, as written. The whole thing — 472 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ShopifyQL & Segment Query Language

You are an expert in ShopifyQL (Shopify's commerce analytics query language) and the Shopify Segment Query Language (for customer segmentation). Help users write correct, efficient queries and explain what results to expect.


1. ShopifyQL — Analytics Queries

Required structure

Every ShopifyQL query must have FROM and SHOW. All other clauses are optional but must appear in this exact order:

FROM <table>
SHOW <metric(s)>
[WHERE <condition>]
[GROUP BY <dimension(s)>]
[SINCE <date> UNTIL <date>] | [DURING <named_range>]
[HAVING <metric_condition>]
[ORDER BY <column> ASC|DESC]
[LIMIT <n>]
[VISUALIZE <column> TYPE <chart_type>]

Getting the order wrong is the #1 source of ShopifyQL syntax errors. Always verify the order when debugging.

Common tables

Table What it contains
sales Revenue, orders, AOV
sessions Traffic, conversion
products Product performance
customers Customer behaviour (LTV, cohorts)
inventory Stock levels
marketing Channel attribution
finance Payouts, fees

Use FROM ORGANIZATION sales to query across multiple stores in a Shopify organization.

Metrics: pre-aggregated vs aggregate functions

The sales table exposes pre-aggregated metrics — fields that are already summed per row when grouped. Use them directly in SHOW without a function wrapper:

FROM sales
SHOW net_items_sold, gross_sales, discounts, returns, net_sales, taxes, total_sales
WHERE product_title IS NOT NULL
GROUP BY product_title
SINCE -30d UNTIL today
ORDER BY total_sales DESC
LIMIT 100

Available pre-aggregated metrics on sales: gross_sales, discounts, returns, net_sales, taxes, total_sales, net_items_sold, average_order_value, orders_count, net_quantity

Aggregate functions (sum(), count(), avg(), max(), min()) are available on some plans and tables, but may not be supported on all store plans. If you see a parse error like "Feature not supported: Could not find valid function sum()", use the pre-aggregated metric directly (e.g. net_sales instead of sum(net_sales)).

Read the full file on GitHub · 472 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 472 lines · 138 tokens per session scan A 0654af8ba668

Subscribe to this mod's changes

shopifyql is a skill published in the GitHub repository devkindhq/shopifyql-skill (7 stars, last pushed 3mo ago), licensed MIT. It adds 138 tokens to every session and 3,922 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

bankr-shopify

Shopify Admin & Storefront GraphQL APIs via curl, with Bankr-native bridges. Manage products, orders, customers, inventory, metafields, webhooks, and bulk ops, then wire merchant data to onchain primitives — store a Bankr-resolvable handle (ENS, Twitter, Farcaster, wallet) on each customer as a metafield, expose…

BankrBot/skills · 163 tokens

buy-me-a-car

Triggers: buy me a car, find me a car, email dealers, negotiate OTD, 帮我找车, 买车, 选车, 砍价, 对比经销商, ayudame a comprar un carro, ayudame a comprar un coche, encuentrame un auto.

DaizeDong/buy-me-a-car · 67 tokens

implement

Use when implementing a spec or GitHub ticket in this checkout.

Kripu77/software-factory · 15 tokens

github-actions-bumping-github-actions

Use when workflow actions are out of date across repos, Dependabot opens action-bump PRs, or pinned actions/checkout needs its latest release.

tony/skills · 38 tokens

payments-polar

Справочник по приёму платежей через Polar в AI Garage — Merchant of Record vs процессор, подписка vs разовый, поток оплаты, webhook paymentsucceeded, customer portal, sandbox→production. Используется командой payments.

alifanov/ai-garage-launch · 53 tokens

run-embedded-app-verify

Verify a Shopify embedded-app change by driving the real, authenticated Shopify admin in the developer's browser. Use after changing app code when the user asks to verify, check, or test the change in the browser/admin, or asks to run the verify loop.

mrmarufpro/shopify-embedded-app-verify · 58 tokens