shopify-admin-repeat-purchase-rate
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "shopify-admin-repeat-purchase-rate" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f7927dfc5fa1a179ed672ec84cc9d607bcfd4493d9658f43b3fad00cd9da462a. Verify the upstream source and version against https://github.com/40RTY-ai/shopify-admin-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Read-only: Calculates the percentage of customers who placed two or more orders within a given N-day window, segmented by product or product family.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Read-only: calculates what percentage of customers place 2+ orders within N days, segmented by product or collection.
- Inputs and outputs
- CSV file `repeat_purchase_<YYYY-MM-DD>.csv` with columns: `customer_id`, `first_order_date`, `first_product`, `total_orders`, `is_repeat`, `days_to_repeat`, `total_spent`
- Software, accounts and paid services
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_customers,read_orders` API scopes: `read_customers`, `read_orders`
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-repeat-purchase-rate
role: order-intelligence
description: "Read-only: calculates what percentage of customers place 2+ orders within N days, segmented by product or collection."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- customers:query
- orders:query
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
Calculates the repeat purchase rate — the percentage of customers who return to place at least one more order within a defined window — and segments it by first-purchase product or collection. Identifies which products drive the highest repeat purchase behavior. Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_customers,read_orders - API scopes:
read_customers,read_orders
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| days_back | integer | no | 90 | Acquisition window — customers first purchased in this period |
| repeat_window | integer | no | 90 | Days after first purchase to look for a repeat order |
| segment_by | string | no | none | Segment repeat rate by: product, none |
| format | string | no | human | Output format: human or json |
Safety
ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
Workflow Steps
-
OPERATION:
customers— query Inputs:query: "created_at:>='<NOW - days_back days>'",first: 250, selectid,numberOfOrders,createdAtExpected output: Customers acquired in window -
OPERATION:
orders— query Inputs:query: "created_at:>='<NOW - days_back + repeat_window days>'",first: 250, selectcustomer { id },createdAt,lineItems { product { id, title } }, pagination cursor Expected output: Orders to build per-customer purchase history and first-product mapping -
For each acquired customer: if they have ≥ 2 orders within
repeat_windowdays → repeat purchaser -
Calculate overall rate; if
segment_by: product, group by first-purchased product
GraphQL Operations
# customers:query — validated against api_version 2025-01
query AcquiredCustomers($query: String!, $after: String) {
customers(first: 250, after: $after, query: $query) {
edges {
node {
id
createdAt
numberOfOrders
defaultEmailAddress {
emailAddress
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
# orders:query — validated against api_version 2025-01
query CustomerOrderHistory($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
id
createdAt
customer {
id
}
lineItems(first: 5) {
edges {
node {
product {
id
title
}
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Repeat Purchase Rate ║
║ 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):
══════════════════════════════════════════════
REPEAT PURCHASE RATE
Acquisition window: <days_back> days
Repeat window: <repeat_window> days
Customers acquired: <n>
Repeat purchasers: <n>
Repeat rate: <pct>%
By First Product:
"<product>" Acquired: <n> Repeat: <pct>%
Output: repeat_purchase_<date>.csv
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "repeat-purchase-rate",
"store": "<domain>",
"acquisition_days": 90,
"repeat_window_days": 90,
"customers_acquired": 0,
"repeat_purchasers": 0,
"repeat_rate_pct": 0,
"by_product": [],
"output_file": "repeat_purchase_<date>.csv"
}
Output Format
CSV file repeat_purchase_<YYYY-MM-DD>.csv with columns:
customer_id, first_order_date, first_product, total_orders, is_repeat, days_to_repeat, total_spent
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
| Guest checkout customers | No customer record to link orders | Exclude from analysis |
| Insufficient history | Store newer than window | Analyze available period |
Best Practices
- A repeat rate of 25–35% within 90 days is a healthy baseline for most non-subscription ecommerce stores.
- Products with high repeat rates are your "gateway" products — prioritize them in acquisition campaigns.
- Use
segment_by: productto identify which products create loyal customers vs. one-time buyers. - Pair with
customer-cohort-analysisfor a deeper view of long-term retention trends.
Version history
-
v1.1.0
GitHub ↗
Original release notes
## 🤖 New category: Agentic Commerce Readiness The fix-it side of the [**agentiq.report**](https://agentiq.report) audit. The audit tells operators *where* AI shopping agents (ChatGPT, Gemini, Perplexity, agentic checkout) can't find, read, or recommend their store. This release adds **10 skills that remediate those findings** via the native Shopify Admin GraphQL toolkit — closing the loop: **audit finds the gap → run the matching skill → re-audit confirms.** Every skill declares the audit **signals** it fixes (`audit_signals` frontmatter), so a finding in the report maps directly to the skill that resolves it. ### Skills - **`agentic-readiness-audit`** — flagship, read-only store-side scorecard that routes each gap to its fix skill - **`agentic-product-jsonld-backfill`** — barcode/GTIN, vendor, product type for complete Product JSON-LD - **`agentic-image-alt-text`** — descriptive alt text on product media - **`agentic-description-enrichment`** — fact-rich descriptions for AI quoting - **`agentic-metafields-setup`** — define + populate agentic metafields for filtering - **`agentic-product-taxonomy`** — Shopify Standard Product Taxonomy categories - **`agentic-crawler-access`** — allow GPTBot/ClaudeBot/PerplexityBot… in `robots.txt.liquid` - **`agentic-llms-txt`** — publish a curated `/llms.txt` for AI assistants - **`agentic-organization-schema`** — Organization JSON-LD (sameAs, contactPoint) into the theme - **`agentic-policy-readability`** — machine-readable shipping/returns policies Plus a weekly **`agentic-readiness-monitor`** routine that re-audits and alerts on regressions. ### Stats **116 skills across 11 categories** (was 106/10), **21 routines** (was 20). All GraphQL validated against the live Admin 2025-01 schema; `pnpm validate:index` passes (116 skills, 64 operations). ### Notes Theme-editing and policy skills default to `dry_run`/`audit` mode, write inside managed `# BEGIN/END` blocks, and recommend duplicating the theme first.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决电商运营高频刚需场景,直接识别高复购产品以优化营销策略
- 提供按商品细分的复购率分析,具有明确商业价值
Highlights
- 触发描述清晰完整,覆盖核心功能边界,无歧义
Highlights
- 结构完整,包含完整工作流、参数定义、错误处理和最佳实践
- Session Tracking 规范明确,输出格式标准化
Highlights
- 只读操作,安全可靠
- 覆盖主要异常场景并有明确恢复机制
- GraphQL 操作已针对指定 API 版本验证
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_customers,read_orders` API scopes: `read_customers`, `read_orders`
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.