/shopify-admin-skills:shopify-admin-loyalty-segment-exportfrom shopify-admin-skills
Segments high-LTV Shopify customers by order count and lifetime spend, tags them, and exports a loyalty-ready contact list.
Ships in shopify-admin-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Segments your highest-value customers by order count and total lifetime spend, tags them in Shopify, and exports a list ready for loyalty program enrollment or VIP campaign targeting. This skill handles the data layer; managing rewards points or sending loyalty emails requires an external tool.
shopify auth login --store <domain>read_customers, write_customers| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain |
| format | string | no | human | human or json |
| dry_run | bool | no | false | Preview without tagging |
| min_orders | integer | no | 3 | Minimum lifetime order count |
| min_spend | float | no | 200 | Minimum lifetime spend (store currency) |
| tag | string | no | loyalty-vip | Tag applied to qualifying customers |
OPERATION: customers — query
Inputs: filter orders_count:>=(min_orders), total_spent:>=(min_spend), first: 250, pagination
Expected output: List with id, defaultEmailAddress { emailAddress }, firstName, lastName, ordersCount, totalSpentV2; paginate until hasNextPage: false
OPERATION: tagsAdd — mutation
Inputs: Customer id, tag from tag parameter
Expected output: Confirmation per customer; collect userErrors
# customers:query — validated against api_version 2025-04
query LoyaltyCustomers($first: Int!, $after: String, $query: String) {
customers(first: $first, after: $after, query: $query) {
edges {
node {
id
defaultEmailAddress {
emailAddress
}
firstName
lastName
ordersCount
totalSpentV2 {
amount
currencyCode
}
tags
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
# tagsAdd:mutation — validated against api_version 2025-01
mutation TagsAdd($id: ID!, $tags: [String!]!) {
tagsAdd(id: $id, tags: $tags) {
node { id }
userErrors { field message }
}
}
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Loyalty Segment Export ║
║ Store: <store domain> ║
║ Started: <YYYY-MM-DD HH:MM UTC> ║
╚══════════════════════════════════════════════╝
After each step, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary>
→ Result: <count or outcome>
If dry_run: true, prefix mutation steps with [DRY RUN] and do not execute.
On completion, for format: human:
══════════════════════════════════════════════
OUTCOME SUMMARY
VIP customers found: <n>
Customers tagged: <n>
Errors: <n>
Output: loyalty_segment_<date>.csv
══════════════════════════════════════════════
For format: json, emit the standard JSON schema with outcome keys: vip_customers_found, customers_tagged, errors, output_file.
CSV loyalty_segment_<YYYY-MM-DD>.csv with columns:
customer_id, email, first_name, last_name, orders_count, total_spent, currency, tag_applied
| Error | Cause | Recovery |
|---|---|---|
THROTTLED | Rate limit | Wait 2s, retry up to 3 times |
userErrors on tagsAdd | Invalid customer ID | Log, skip, continue |
NOT tag:loyalty-vip to your query filter to skip already-enrolled customers.dry_run: true to see the count, then adjust min_orders and min_spend before committing.customer-win-back: tag high-LTV lapsed customers with both loyalty-vip and a win-back tag to identify your highest-priority re-engagement targets.What SKILL.md sets; muted values are Claude Code's defaults
116 skills in this plugin
/shopify-admin-abandoned-cart-recoveryQuery checkouts abandoned in the last N days, generate unique discount codes per customer, and tag them for re-engagement./shopify-admin-address-correctionUpdate the shipping address on an unfulfilled order before it ships./shopify-admin-agentic-crawler-accessEdit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Amazonbot) so AI assistants are permitted to read the catalog.npx claudepluginhub 40rty-ai/shopify-admin-skills --plugin shopify-admin-skillsOther plugins' skills for the same job