mcpField
S
segmentation-analysis

segmentation-analysis

github.com/nimrodfisherData & databases504238 installsUpdated 5w ago
Repository

About segmentation-analysis

A data-analysis skill for teams that need actionable customer segments for marketing, product, or retention decisions. It supports k-means and rule-based approaches, then profiles and validates segments before mapping them to strategies.

Key features

  1. 01Goal-led variable selection and preparation
  2. 02K-means and rule-based segmentation
  3. 03Segment profiling and descriptive labels
  4. 04Silhouette-based clustering validation
  5. 05Strategy mapping and report templates

Use cases

  1. 01Identify high-value customer groups
  2. 02Target marketing with distinct offers
  3. 03Prioritize product features by user behavior
  4. 04Find segments for retention or win-back efforts

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/nimrodfisher/data-analytics-skills --skill segmentation-analysis

After installing, type/segmentation-analysisin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
segment_profile_template.md
references/
segmentation_approaches.md
scripts/
segmentation_runner.py

Details

From the project README

Segmentation Analysis

When to use

  • The team needs to understand who the best customers are and what distinguishes them
  • Marketing wants distinct groups to target with different messages or offers
  • Product needs to prioritise features based on high-value user behaviour patterns
  • Churn is high and the team needs to identify at-risk users before they leave
  • An existing segmentation feels arbitrary and needs data validation or improvement

Process

  1. Define the segmentation goal — clarify what decisions the segments will inform (product roadmap, marketing campaigns, retention programs). The goal determines which variables matter and how many segments are useful (typically 3–7). See references/segmentation_approaches.md.
  2. Select and prepare variables — choose 3–7 attributes or behaviours that vary across users and relate to the business outcome. Handle missing values and scale continuous variables. Remove outliers only if they would distort cluster centroids.
  3. Run the segmentation — for data-driven segmentation, use k-means clustering via scripts/segmentation_runner.py. For rule-based segmentation, apply the business logic rules and validate that segments are distinct and non-overlapping.
  4. Profile each segment — compute the mean and median for each variable by segment, expressed as % above/below the overall average. Identify the 2–3 defining characteristics of each segment and assign a descriptive name.
  5. Validate and interpret — confirm segments are meaningfully different (silhouette score > 0.3 for clustering) and make business sense. Sanity-check by asking whether you would actually treat each segment differently.
  6. Map to strategy and report — assign each segment to a recommended strategy (Retain & Expand, Monetise, Activate, Win-Back, Sunset). Produce assets/segment_profile_template.md with the profiles and strategic priorities.

Inputs the skill needs

  • User-level data with attributes (demographics, plan type) and behavioural metrics (sessions, revenue, feature usage, recency)
  • Business goal the segmentation will serve
  • Any existing segmentation to validate or replace
  • Minimum of ~100 users per expected segment for clustering to be meaningful

Output

  • scripts/segmentation_runner.py — runs k-means clustering, produces elbow and silhouette plots, assigns segment labels
  • references/segmentation_approaches.md — when to use k-means vs. RFM vs. rule-based; interpretation guide
  • assets/segment_profile_template.md — filled segment profiles with size, key characteristics, recommended strategy, and tracking plan

Comments

Markdown supported