40rty-ai/shopify-admin-skills/shopify-admin-loyalty-segment-export
Claude Code and agent skill by 40rty-ai/shopify-admin-skills
- community
Checking that the SKILL.md file is still in the repository.
Identify high-LTV customers by order count and lifetime spend, tag them, and export a loyalty-ready contact list.
Install
npx vskill@latest install 40rty-ai/shopify-admin-skills/shopify-admin-loyalty-segment-exportSKILL.md
The same SKILL.md was published earlier as 40rty-ai/shopify-admin-skills/shopify-admin-loyalty-segment-export.
Purpose
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: 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
GraphQL Operations
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
After each step, emit:
If dry_run: true, prefix mutation steps with [DRY RUN] and do not execute.
On completion, for format: human:
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.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/marketing/shopify-admin-loyalty-segment-export/SKILL.md
Popularity
- Repository stars
- 151
- Repository forks
- 12
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/40rty-ai/shopify-admin-skills/shopify-admin-loyalty-segment-export)