customer-segmentation

Segments customers using RFM scoring, churn prediction, lookalike audiences, and campaign response scoring.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill customer-segmentation-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: customer-segmentation
Source: https://github.com/tapway/shogun-os/tree/main/skills/retail/customer-segmentation
Command: npx skills add https://github.com/tapway/shogun-os --skill customer-segmentation-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Marketing teams often treat all customers the same, wasting budget on untargeted campaigns. This Skill divides the customer base into actionable segments (Champions, Loyal, At Risk, Lost, New) based on purchasing behavior, so campaigns reach the right customers with the right message. ## Core Features & Use Cases - RFM Analysis: Score customers on Recency, Frequency, and Monetary value with configurable buckets and weights to identify high-value segments. - Churn Prediction: Apply logistic or random-forest models to flag customers above a configurable churn-risk confidence threshold for re-engagement. - Lookalike Audiences & Response Scoring: Generate lookalike audiences from seed segments for acquisition campaigns and score per-customer campaign response propensity. - Use Case: Before a quarterly campaign, run RFM analysis over 90 days of transactions, identify 430 customers above 70% churn risk, and launch a targeted win-back campaign for the At Risk segment. ## Quick Start Ask the agent to run an RFM analysis over the last 90 days of customer transactions and list the resulting segment distribution.

Frequently Asked Questions about customer-segmentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run RFM analysis on customer transaction data?

Run the rfm subcommand with an analysis period and bucket count, for example segment rfm --period 90d --buckets 5. It scores customers on recency, frequency, and monetary value using configurable weights and assigns them to segments like Champions, Loyal, At Risk, Lost, and New.

How to predict customer churn from purchase history?

Use the churn subcommand with a model type and confidence threshold, such as segment churn --model logistic --confidence 0.7. It scores each customer's churn risk from recency, frequency, monetary, support ticket, and browsing features, returning customers above the threshold.

What is the minimum data needed for customer segmentation?

You need at least 90 days of customer transaction history and access to order or sales data, typically via a PostgreSQL database set in SEGMENT_DB_URL. Lookalike audiences additionally require a seed segment of at least 5000 customers for acceptable quality.

How often should churn prediction models be retrained?

Churn models degrade over time due to model drift, so retrain every 90 days and monitor AUC scores. Also review RFM bucket boundaries quarterly, since fixed thresholds may not fit all product categories.

When should I not use RFM segmentation?

Do not use it for loyalty points or tier management, individual customer service cases, or product-level analysis; those belong to loyalty-program, CRM, or assortment skills. Segments also do not prescribe actions, so always pair them with specific campaign strategies and A/B tests.