From marketing-analytics
Use when the user mentions segmentation, customer segments, cohort analysis, RFM analysis, behavioral clustering, K-Means, DBSCAN, customer personas, segment profiles, retention curves, cohort retention, segment migration, customer tiers, high-value customers, at-risk segment, churn cohort, acquisition cohort, engagement tiers, or audience definition. Also trigger on 'group our customers' or 'which customers should we target.' If CLV scores are available from clv-modeling, they enrich segment profiles. Segments feed into experimentation (stratification), email-analytics (targeting), paid-media (lookalike audiences), and reporting skills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/marketing-analytics:audience-segmentationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automated RFM scoring, behavioral clustering, and cohort retention analysis.
Automated RFM scoring, behavioral clustering, and cohort retention analysis.
| Field | Value |
|---|---|
| Skill ID | audience-segmentation |
| Priority | P1 — Strategic (used by most downstream skills) |
| Category | Customer Analytics |
| Depends On | data-extraction, clv-modeling (value enrichment) |
| Feeds Into | experimentation (stratification), email-analytics (targeting), paid-media (lookalike), reporting |
Automate customer segmentation through RFM scoring, behavioral K-Means/DBSCAN clustering with silhouette-based cluster count optimization, and cohort-based retention analysis. Assign interpretable segment labels, track segment migration over time, generate cohort retention curves, and produce segment profiles suitable for targeting in email campaigns and paid media lookalike audiences.
scripts/rfm_scoring.py.references/rfm_methodology.md.| Segment | RFM Pattern | Description |
|---|---|---|
| Champions | High R, High F, High M | Best customers — recent, frequent, high spend |
| Loyal | Mid-High R, High F, Mid-High M | Consistent repeat buyers |
| Potential Loyalists | High R, Low-Mid F, Low-Mid M | Recent customers showing growth potential |
| At-Risk | Low R, High F, High M | Previously valuable, lapsing |
| Hibernating | Low R, Low F, Low-Mid M | Inactive but previously engaged |
| Lost | Very Low R, Low F, Low M | Long-inactive, minimal spend |
Quintile boundaries should be recomputed monthly to account for distribution
drift. See references/rfm_methodology.md for detailed boundary guidance.
Derive features from raw behavioral event data:
K-Means
StandardScaler.random_state=42.DBSCAN
StandardScaler.min_samples relative to dataset size (heuristic: 1% of rows, minimum 5).See references/clustering_guide.md for detailed optimization guidance.
Use scripts/behavioral_clustering.py for execution.
Cohorts can be defined by:
Use scripts/cohort_retention.py for computation.
Each segment (RFM-based or cluster-based) must include:
Profiles are written to workspace/analysis/segment_profiles.json.
Track how customers move between segments across consecutive analysis periods.
Use scripts/segment_migration.py for computation.
Output to workspace/analysis/segment_migration.json.
| File | Description | Required |
|---|---|---|
workspace/raw/transactions.csv | Transaction data: customer_id, date, amount, product | Yes |
workspace/raw/behavioral_events.csv | Web/app events: user_id, event, timestamp, properties | Optional |
workspace/analysis/clv_predictions.json | CLV scores from clv-modeling for value enrichment | Optional |
| File | Description |
|---|---|
workspace/processed/segments.json | Customer-level segment assignments with profiles |
workspace/analysis/segment_profiles.json | Aggregate statistics per segment |
workspace/analysis/cohort_retention.json | Retention matrices by cohort definition |
workspace/analysis/segment_migration.json | Transition matrices showing segment movement |
workspace/reports/segmentation_report.html | Interactive segment explorer with charts |
{
"customer_id": "string",
"rfm_segment": "string",
"rfm_scores": {"recency": 1-5, "frequency": 1-5, "monetary": 1-5},
"cluster_id": "int | null",
"cluster_label": "string | null",
"cohort": "string",
"clv_score": "float | null"
}
Segmentation is a foundational enabler for most downstream skills:
When integrating, read segment assignments from workspace/processed/segments.json
and segment profiles from workspace/analysis/segment_profiles.json.
scikit-learn for all clustering; provide deterministic random seeds (random_state=42) for reproducibility.StandardScaler) before distance-based algorithms.references/rfm_methodology.md — RFM scoring rules, segment label mapping, quintile boundary guidance.references/clustering_guide.md — K-Means, DBSCAN, silhouette optimization, feature scaling best practices.scripts/rfm_scoring.py — RFM computation, quintile assignment, segment labeling.scripts/behavioral_clustering.py — Feature engineering, scaling, clustering, silhouette optimization.scripts/cohort_retention.py — Cohort definition, retention matrix generation, churn rate calculation.scripts/segment_migration.py — Period-over-period segment transition matrix computation.npx claudepluginhub weisberg/agile_agentic_analytics --plugin marketing-analyticsAnalyze customer cohorts for acquisition, retention, LTV, and behavioral segmentation using time-based, channel-based, behavioral, or revenue-tier analysis.
Identify and prioritize customer segments based on shared needs, behaviors, and contexts.
Use this skill when the user asks about "cohort analysis", "retention cohorts", "how to read cohort data", "analyze my retention", "what does my cohort data say", "cohort retention curves", "D7/D30 retention", "how to improve cohort retention", or has cohort data they want to interpret and act on.