shopify-admin-agentic-…
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended,…
Read-only: groups customers by first-purchase month and tracks repeat purchase rate and revenue per cohort.
Claude Code
$ npx -y skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis --agent claude-code
Codex
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a codex -y
Cursor
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a cursor -y
Gemini CLI
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a gemini-cli -y
GitHub Copilot
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a github-copilot -y
OpenCode
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a opencode -y
Windsurf
$ npx skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-customer-cohort-analysis -a windsurf -y
name: shopify-admin-customer-cohort-analysis role: customer-ops description: "Read-only: groups customers by first-purchase month and tracks repeat purchase rate and revenue per cohort." toolkit: shopify-admin, shopify-admin-execution api_version: "2025-01" graphql_operations: - customers:query - orders:query status: stable compatibility: Claude Code, Cursor, Codex, Gemini CLI
Groups customers by the month of their first purchase and tracks how each cohort performs over time: how many customers repurchase, how many orders they place, and how much revenue each cohort generates in subsequent months. Cohort analysis is the gold standard for measuring retention and the health of a subscription or loyalty program. Read-only — no mutations.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | cohort_months | integer | no | 6 | Number of months of cohorts to analyze | | follow_months | integer | no | 3 | Number of months to follow each cohort after acquisition | | format | string | no | human | Output format: `human` or `json` |
> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
1. **OPERATION:** `customers` — query **Inputs:** `query: "created_at:>='<NOW - cohort_months months>'"`, `first: 250`, select `id`, `createdAt`, `numberOfOrders`, pagination cursor **Expected output:** Customers acquired in the cohort window
2. **OPERATION:** `orders` — query **Inputs:** `query: "created_at:>='<NOW - cohort_months + follow_months months>'"`, `first: 250`, select `customer { id }`, `createdAt`, `totalPriceSet`, pagination cursor **Expected output:** All orders to build per-customer purchase timeline
3. Group customers by first-order month (cohort); for each cohort, calculate repeat purchase rate and total revenue in months 1, 2, 3+
# customers:query — validated against api_version 2025-01
query CohortCustomers($query: String!, $after: String) {
customers(first: 250, after: $after, query: $query) {
edges {
node {
id
createdAt
numberOfOrders
amountSpent {
amount
currencyCode
}
defaultEmailAddress {
emailAddress
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}# orders:query — validated against api_version 2025-01
query CohortOrders($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
id
createdAt
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
customer {
id
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}**Claude MUST emit the following output at each stage. This is mandatory.**
**On start**, emit:
╔══════════════════════════════════════════════╗ ║ SKILL: Customer Cohort Analysis ║ ║ Store: <store domain> ║ ║ Started: <YYYY-MM-DD HH:MM UTC> ║ ╚══════════════════════════════════════════════╝
**After each step**, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary of key inputs>
→ Result: <count or outcome>**On completion**, emit:
For `format: human` (default):
══════════════════════════════════════════════ CUSTOMER COHORT ANALYSIS Cohort months analyzed: <n> Total customers tracked: <n> Cohort Acquired M+1 Repeat M+2 Repeat M+3 Repeat ────────────────────────────────────────────────────────── 2026-01 <n> <pct>% <pct>% <pct>% 2026-02 <n> <pct>% <pct>% <pct>% Output: cohort_analysis_<date>.csv ══════════════════════════════════════════════
For `format: json`, emit:
{
"skill": "customer-cohort-analysis",
"store": "<domain>",
"cohorts": [],
"output_file": "cohort_analysis_<date>.csv"
}CSV file `cohort_analysis_<YYYY-MM-DD>.csv` with columns: `cohort_month`, `customers_acquired`, `repeat_purchasers`, `repeat_rate_pct`, `total_revenue`, `revenue_per_customer`, `month_offset`
| Error | Cause | Recovery | |-------|-------|----------| | `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times | | Insufficient history | Store newer than cohort window | Analyze available months only | | Guest checkout orders | No customer record | Exclude from cohort tracking |
Community-maintained AI agent skills for operating Shopify stores — workflows, optimization, reports and more
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended,…
Rewrite thin product descriptions into structured, fact-rich copy (materials, fit, use-cases, the words shoppers actually type)…
Generate and set descriptive alt text on product images so AI agents (which can't 'see' pixels) can understand and recommend what…
Generate and publish an /llms.txt guide (brand summary, flagship products, key policies, contact) via a theme template so AI…
Define and populate agentic-commerce metafields (material, attributes, key features, specs, sizing) so AI agents can filter and…
Inject an Organization JSON-LD block (name, logo, sameAs social links, contactPoint) into the theme so AI agents can verify the…
Set up, connect, validate, and repair Claude Desktop and MCP servers using Desktop Commander — inspecting and fixing mcp.json /…