Skip to content
Back to skills

Shop Rfm Segmentation

ASecurity

Segment customers with an RFM model (Recency, Frequency, Monetary) and produce action-ready buckets for growth and retention. Read-only by default; execution is delegated to promo/push skills. Use by default whenever the user wants customer targeting, retention segments, scoring, or high-value/risk buckets, 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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 22, 2026
ai-agentsgoreactrails

Works with

  • mcp

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add goodbarber/goodbarber-skills --skill shop-rfm-segmentation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shop Rfm Segmentation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Shop Rfm Segmentation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goodbarber-shop-rfm-segmentation/badge)](https://www.skillsdirectory.com/skills/goodbarber-shop-rfm-segmentation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: shop-rfm-segmentation
description: |
  Segment customers with an RFM model (Recency, Frequency, Monetary) and
  produce action-ready buckets for growth and retention. Read-only by
  default; execution is delegated to promo/push skills. Use by default
  whenever the user wants customer targeting, retention segments, scoring,
  or high-value/risk buckets, 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

Provide a practical, explainable customer segmentation that directly maps to
marketing actions without spreadsheet work.

## Access contract

- `READ_ONLY` for analysis.
- `READ_WRITE` only if the user explicitly asks to execute follow-up actions
  in another skill.

## Input contract

- Analysis window (default: last 12 months)
- Scoring strategy:
  - quantiles (default) or fixed thresholds
- Optional exclusion: customers with no valid order in window

## Required Tool Workflow (strict order)

Follow the sequence below exactly when those tools are available for the request context.

1. `sales_get` (`type: order`) for the analysis window, with
   `created_from` and `created_to` (exactly `YYYY-MM-DDTHH:MM` in UTC;
   server-side date filters), page by page. Each order carries its
   customer (user id, name, email), its total and its date; leave
   `CANCELLED` orders out. 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`), page by page, only to count the
   customers with no order in the window (the customer list has no
   server-side filter: on large bases, skip it and document the
   exclusion).
3. Aggregate per customer:
   - Recency (days since last order)
   - Frequency (order count)
   - Monetary (total revenue)
4. Score each dimension (1-5) and build RFM score triplets.
5. Map score patterns to business segments:
   - Champions
   - Loyal
   - Potential loyalists
   - At risk
   - Hibernating
6. Produce action recommendations per segment, with delegated execution
   pointers.

## Tools used

- `sales_get` (`type: order`, `type: customer`; one customer with `user_id` as optional enrichment)

## Output contract (exact sections required)

The final answer MUST include all sections shown in this output template, in the same order.

```markdown
## RFM segmentation — last 12 months

### Segment overview
| Segment | Customers | Revenue share | Typical profile |
|---------|-----------|---------------|-----------------|
| Champions | 124 | 38% | Recent, frequent, high spend |
| Loyal | 402 | 34% | Frequent repeat buyers |
| Potential loyalists | 290 | 14% | New-ish repeat potential |
| At risk | 210 | 10% | Historically valuable, not recent |
| Hibernating | 980 | 4% | Old/low activity |

### Priority targets
- Segment: At risk
  - Size: N
  - Revenue at risk: $X
  - Suggested play: targeted comeback incentive

## Recommended actions
- [ ] Champions: reward-only campaign (no heavy discount)
- [ ] At risk: winback code with 7-day expiry
- [ ] Hibernating: low-cost reactivation push
```

Do not replace this output with a one-line answer.

## Guardrails (hard rules)

- Do not export personal data (emails/phones) unless explicitly requested.
- If sample quality is weak (too few orders or very new shop), state the
  limitation before recommendations.
- Keep scoring explainable: show how bins/quantiles were built.
- For very large customer bases, avoid blind full pagination; narrow to
  active window and document exclusions.
- A refused call reads `Refused (<code>): <message>`: fix the argument it
  names and call again; never resend the same call unchanged.

## Next possible actions
- Run `shop-promo-campaign` to create a segment-specific offer.
- Run `shop-push-targeted` to send a reactivation message to one segment,
  or `shop-push-broadcast` for everyone.
- Run `shop-customer-insights` for loyalty-focused follow-up.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.