customer-analytics

Analyze customer behavior with RFM scoring, cohort retention, and churn prediction across ecommerce platforms.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill customer-analytics-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: customer-analytics
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/analytics-reporting/finsilabs/data-analytics/customer-analytics
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill customer-analytics-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Ecommerce teams often treat all customers identically because raw order data is hard to turn into actionable segments. This Skill converts order history into RFM scores, cohort retention matrices, and churn risk flags so retention and marketing teams can target the right customers before they lapse. ## Core Features & Use Cases - RFM Segmentation: Score customers on recency, frequency, and monetary value using Shopify segments, Klaviyo, Metorik, or SQL with NTILE(5) window functions, then classify them into named segments like champions, at_risk, and lost. - Cohort & Channel Analysis: Build month-by-month retention grids and compare 12-month CLV by acquisition channel using first-touch attribution in PostgreSQL. - Churn Prediction: Compute churn risk scores with a linear formula for single-purchase customers and a z-score sigmoid for repeat buyers, with seasonal-buyer handling to avoid false alarms. - Use Case: A DTC brand preparing for a loyalty program launch runs the RFM pipeline nightly, exports champion and at-risk segments with email addresses to Klaviyo, and triggers win-back flows for customers flagged before they churn. ## Quick Start Ask the AI to build an RFM scoring SQL pipeline that segments your customers and identifies high-value at-risk customers for a win-back campaign.

Frequently Asked Questions about customer-analytics

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

FAQPage Schema
How do I build an RFM scoring model in SQL?▼

Use NTILE(5) window functions over recency days (descending), frequency, and monetary value to assign 1-5 scores per dimension, then map score combinations to named segments like champions, at_risk, and lost. Exclude cancelled and refunded orders before computing any metrics.

What tools work for customer analytics on Shopify?▼

Shopify's built-in customer segments handle basic filters like order count and days since last order. Klaviyo adds RFM-style behavioral segments and flows, while Lifetimely or Triple Whale provide true cohort LTV and retention curves by acquisition channel.

How do I predict customer churn for repeat buyers?▼

Compute a z-score of how many standard deviations the customer is past their average purchase interval, then apply a sigmoid function to produce a 0-1 churn score. Single-purchase customers use a simpler linear formula based on days since their order.

Does cohort retention analysis work in WooCommerce?▼

Yes, Metorik connects to WooCommerce via API and provides customer cohort retention reports, RFM segmentation, and churn identification. Klaviyo for WooCommerce also offers cohort analysis under its Analytics section.

Why does my cohort retention show zero percent after month 6?▼

The query is likely including cohorts that have not yet had six months of data. Filter with a HAVING clause or date condition to exclude cohorts acquired too recently to measure retention at the period being reported.

How do I avoid flagging seasonal buyers as churned?▼

Apply a seasonal purchase pattern flag before running churn analysis so customers who only buy in specific periods, like Q4 gift buyers, are not marked as churned during their off-season. This prevents false alarms in win-back campaigns.