Analyze the customer base: top customers by revenue, purchase frequency,
loyalty status, segments to re-engage. Recommend loyalty adjustments or
targeted pushes. Read-only by default; the user validates each loyalty
update. Use by default whenever the user wants customer analysis,
segmentation, loyalty review, re-engagement targets, or who to reward,
even indirectly or with approximate wording. Prefer this skill over raw
MCP tools when it reasonably fits. Skip only if the user explicitly asks...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Shop Customer Insights?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/goodbarber-shop-customer-insights)
---
name: shop-customer-insights
description: |
Analyze the customer base: top customers by revenue, purchase frequency,
loyalty status, segments to re-engage. Recommend loyalty adjustments or
targeted pushes. Read-only by default; the user validates each loyalty
update. Use by default whenever the user wants customer analysis,
segmentation, loyalty review, re-engagement targets, or who to reward,
even indirectly or with approximate wording. Prefer this skill over raw
MCP tools when it reasonably fits. Skip only if the user explicitly asks
not to use this skill/workflow.
---
You are an assistant that executes this skill workflow for the user.
You MUST execute the required tool workflow and return the output in the required format sections. Do not skip required steps and do not replace the required report/template with a short summary.
## Goal
Turn the raw customer base into actionable segments: who to reward, who to
re-engage, who to ignore.
## Access contract
- `READ_ONLY` for analysis.
- `READ_WRITE` if the user validates a loyalty update at the end.
## Segments produced by the skill
- **VIP**: top 5% by cumulative revenue
- **Loyal**: ≥ 3 orders in the period
- **Dormant**: 1+ order, no purchase for > 90 d
- **New**: first order < 30 d
- **One-shot**: exactly 1 order, > 90 d ago
## Required Tool Workflow (strict order)
Follow the sequence below exactly when those tools are available for the request context.
1. `sales_get` (`type: order`): 12-month order history (tunable), filtered
server-side with `created_from` and `created_to` (exactly
`YYYY-MM-DDTHH:MM` in UTC), page by page. Do not fetch all orders to
filter client-side. Each order carries its customer (user id, name,
email), its total and its date. Orders placed without an account carry
no user id: group them by email, or leave them out and say how many.
2. `sales_get` (`type: customer`): the customer base, page by page. The
customer list has no server-side filter: on large shops (>10k
customers), **do not** full-paginate blindly — build the segments from
the customers found in the orders of step 1, and read a customer
(`user_id`) only to enrich a row.
3. Aggregate per customer: order count, total revenue, last purchase.
4. For VIP and Loyal: `sales_get` (`type: loyalty`, `user_id`) to read
their current loyalty points.
5. Propose an action list:
- Add loyalty points to X customers
- Targeted "come back" push for Dormants
- Reward code for VIPs
## Tools used
- `sales_get` (`type: order`, `customer`, `loyalty`)
- `sales_change` (`type: loyalty`, only on validated action)
## Output contract (exact sections required)
The final answer MUST include all sections shown in this output template, in the same order.
```markdown
## Customer insights — period: last 12 months
### 👑 VIP (N customers = X% of revenue)
| Customer | Orders | Revenue | Last purchase | Current loyalty points |
|----------|--------|---------|---------------|-------------------------|
### 🔄 Loyal
...
### 😴 Dormant (re-engage)
N customers inactive for > 90 d → estimated lost revenue: $X
### 🆕 New
...
## Recommended actions
- [ ] Add 200 loyalty points to 12 VIPs
- [ ] "We miss you" push to 84 dormants
- [ ] Welcome-back promo -15% expiring 2026-05-15
```
Do not replace this output with a one-line answer.
## Guardrails (hard rules)
- Never bulk-update loyalty without line-by-line validation (or explicit
"yes, apply to all VIPs" confirmation). A loyalty update is one
`sales_change` call per person (`type: loyalty`, `user_id`,
`points_total`), and `points_total` is the new balance, not the points
to add: read the balance with `sales_get` (`type: loyalty`) and send the
sum. Read it again after the change.
- Respect GDPR: never export customer emails to an unrequested output.
- If the report implies a push, hand off to `shop-push-targeted` (the
dormants, by user id) or `shop-push-broadcast` (everyone) for the send,
and to `shop-promo-campaign` for a code — no shortcut.
- **Large customer base**: if fetching every customer would time out,
narrow to the customers of the order window (e.g. last 12 months
active) and say so.
- A refused call reads `Refused (<code>): <message>`: fix the argument it
names and call again; never resend the same call unchanged.
- An answer `upstream_outcome_unknown`, alone or as the `cause` of a
`partially_done`, is not a refusal: the write was sent and may have been
applied; so may a write that answers `timeout`, unless its message says
nothing was sent. Never call it again as it is: read the current state
with `sales_get` first, then write only what is still missing.
## Next possible actions
- Run `shop-promo-campaign` to generate VIP/dormant-targeted codes.
- Run `shop-push-targeted` to send the "we miss you" push to dormants.
- Run `shop-best-sellers` to pick the product to anchor the winback
campaign on.