shopify-admin-loyalty-segment-export
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-loyalty-segment-export" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-daddef7fcf138cfcdab14e6275f06c20a5b0589e5f92102896e7e0ab986628d6. 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
Identify high-LTV customers by order count and lifetime spend, tag them, and export a contact list usable for a loyalty program.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Identify high-LTV customers by order count and lifetime spend, tag them, and export a loyalty-ready contact list.
- Inputs and outputs
- CSV `loyalty_segment_<YYYY-MM-DD>.csv` with columns: `customer_id`, `email`, `first_name`, `last_name`, `orders_count`, `total_spent`, `currency`, `tag_applied`
- Software, accounts and paid services
- Authenticated Shopify CLI session: `shopify auth login --store <domain>` API scopes: `read_customers`, `write_customers`
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-loyalty-segment-export
role: marketing
description: "Identify high-LTV customers by order count and lifetime spend, tag them, and export a loyalty-ready contact list."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- customers:query
- tagsAdd:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
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.
Prerequisites
- Authenticated Shopify CLI session:
shopify auth login --store <domain> - API scopes:
read_customers,write_customers
Parameters
| 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 |
Workflow Steps
-
OPERATION:
customers— query Inputs: filterorders_count:>=(min_orders),total_spent:>=(min_spend),first: 250, pagination Expected output: List withid,defaultEmailAddress { emailAddress },firstName,lastName,ordersCount,totalSpentV2; paginate untilhasNextPage: false -
OPERATION:
tagsAdd— mutation Inputs: Customerid, tag fromtagparameter Expected output: Confirmation per customer; collectuserErrors
GraphQL Operations
# 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 }
}
}
Session Tracking
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.
Output Format
CSV loyalty_segment_<YYYY-MM-DD>.csv with columns:
customer_id, email, first_name, last_name, orders_count, total_spent, currency, tag_applied
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
Rate limit | Wait 2s, retry up to 3 times |
userErrors on tagsAdd |
Invalid customer ID | Log, skip, continue |
Best Practices
- Before running, check if customers already have the loyalty tag — add
NOT tag:loyalty-vipto your query filter to skip already-enrolled customers. - Export and review the customer list before tagging if you're unsure about the threshold values — use
dry_run: trueto see the count, then adjustmin_ordersandmin_spendbefore committing. - Combine with
customer-win-back: tag high-LTV lapsed customers with bothloyalty-vipand a win-back tag to identify your highest-priority re-engagement targets.
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
- 解决电商运营中识别高LTV客户的明确业务痛点
- 提供从数据查询到标记导出的完整闭环流程
- 适用于广泛的Shopify商家忠诚度计划场景
Highlights
- 触发描述完整覆盖核心功能关键词
- 参数化设计支持灵活调整筛选阈值
- dry_run模式有效防止误操作
Areas to improve
-
缺少显式When to Use章节标题 Reported severity: Minor
文档内容已包含使用场景说明但未使用标准章节名
Recommendation: 建议添加显式的## When to Use章节以提升可读性
Highlights
- Workflow Steps分步清晰,GraphQL操作代码完整
- Session Tracking输出格式标准化,便于调试
- frontmatter元数据完整,API版本声明明确
Highlights
- GraphQL操作已通过api_version兼容性验证
- 异常处理覆盖限流和用户错误等关键场景
- 分页逻辑完整,支持大数据量处理
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 auth login --store <domain>` API scopes: `read_customers`, `write_customers`
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.