Churn Risk Scorer

/digital-marketing-pro:churn-risk

by indranilbanerjee · MIT license · ★ 866 on GitHub

/digital-marketing-pro:churn-risk cover

Score churn risk per segment by script, with tiered retention playbooks.

---
name: churn-risk
description: "Score churn risk per segment by script, with tiered retention playbooks. \"which customers are about to churn\""
---

# /digital-marketing-pro:churn-risk

> **Script location.** If your host does not set `${CLAUDE_PLUGIN_ROOT}`, the scripts are in this plugin's `scripts/` folder, next to `skills/`. Run them with Python 3.10 or newer: `python`, or `python3` where `python` is not found (macOS, many Linux systems).

## Purpose

Assess churn risk across customer segments and generate intervention strategies. Score segments using behavioral signals — email engagement decline, purchase frequency drops, login pattern changes, support ticket escalations — to categorize each segment into risk tiers and produce actionable intervention playbooks. This command bridges the gap between knowing customers are churning and knowing what to do about it. Instead of reactive "win-back" campaigns after customers have already left, it identifies at-risk segments early enough to intervene while the relationship is still recoverable. Each intervention playbook includes specific actions, timing windows, channel recommendations, and messaging approaches calibrated to the risk tier and customer value.

## Input Required

The user must provide (or will be prompted for):

- **Customer segments to score**: The segments to evaluate — can be predefined CRM segments (e.g., "Enterprise accounts," "Monthly subscribers," "First-time buyers") or behavioral cohorts (e.g., "Users who haven't purchased in 60 days," "Users with declining email opens"). Each segment should include available behavioral signals: email engagement trends (open rate, click rate, unsubscribe rate over time), purchase frequency and recency, login or product usage patterns, support ticket volume and sentiment, and any other engagement indicators tracked in the CRM

Overview

Assess churn risk across customer segments and generate intervention strategies. Score segments using behavioral signals — email engagement decline, purchase frequency drops, login pattern changes, support ticket escalations — to categorize each segment into risk tiers and produce actionable intervention playbooks. This command bridges the gap between knowing customers are churning and knowing what to do about it. Instead of reactive "win-back" campaigns after customers have already left, it identifies at-risk segments early enough to intervene while the relationship is still recoverable. Each intervention playbook includes specific actions, timing windows, channel recommendations, and…

What you get

  • Churn risk scorecardAll segments ranked by composite risk score — showing segment name, size, risk score (0-100), risk tier (Low/Medium/High/Critical), primary churn signals driving the score, and trend direction (improving, stable, or deteriorating)
  • Risk tier distributionSummary view showing how many customers and what percentage of total base fall into each tier — with comparison to industry benchmarks and the brand's historical distribution if available
  • Contributing factors per segmentFor each scored segment, the specific behavioral signals driving the risk assessment — which signals are deteriorating, how fast, and how they compare to the segment's historical baseline and to healthy-segment benchmarks
  • Intervention playbook per tierDetailed action plans for Medium, High, and Critical tiers — each with specific actions (what to do), timing (when to act and sequence duration), channels (where to reach them), messaging framework (what to say and how to say it), success metrics (what improvement looks like), and escalation triggers (when to escalate to the next intensity level)
  • LTV at risk calculationTotal lifetime value at risk across all segments, broken down by tier — quantifying the business impact of inaction and the maximum justifiable investment in retention for each tier
  • ROI estimate for intervention programsProjected retention lift and revenue saved per intervention, based on industry retention benchmarks and the brand's historical win-back rates — showing expected ROI for each playbook to justify budget allocation
Manual install (npx, ZIP)
Claude Codenpx skills add indranilbanerjee/digital-marketing-pro --skill churn-risk -g -a claude-code
Claude Code (degit)npx degit indranilbanerjee/digital-marketing-pro/skills/churn-risk#main ~/.claude/skills/churn-risk
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md8.9 KB
Read SKILL.md here
indranilbanerjee/main1 file shown
SKILL.md
Show the full text49 lines

/digital-marketing-pro:churn-risk

Script location. If your host does not set ${CLAUDE_PLUGIN_ROOT}, the scripts are in this plugin's scripts/ folder, next to skills/. Run them with Python 3.10 or newer: python, or python3 where python is not found (macOS, many Linux systems).

Purpose

Assess churn risk across customer segments and generate intervention strategies. Score segments using behavioral signals — email engagement decline, purchase frequency drops, login pattern changes, support ticket escalations — to categorize each segment into risk tiers and produce actionable intervention playbooks. This command bridges the gap between knowing customers are churning and knowing what to do about it. Instead of reactive "win-back" campaigns after customers have already left, it identifies at-risk segments early enough to intervene while the relationship is still recoverable. Each intervention playbook includes specific actions, timing windows, channel recommendations, and messaging approaches calibrated to the risk tier and customer value.

Input Required

The user must provide (or will be prompted for):

  • Customer segments to score: The segments to evaluate — can be predefined CRM segments (e.g., "Enterprise accounts," "Monthly subscribers," "First-time buyers") or behavioral cohorts (e.g., "Users who haven't purchased in 60 days," "Users with declining email opens"). Each segment should include available behavioral signals: email engagement trends (open rate, click rate, unsubscribe rate over time), purchase frequency and recency, login or product usage patterns, support ticket volume and sentiment, and any other engagement indicators tracked in the CRM
  • CRM data source: Which CRM system holds the customer data — Salesforce, HubSpot, or another connected CRM MCP. The command will pull behavioral data directly from the CRM if connected, or the user can provide exported data
  • Intervention budget (optional): Total budget available for retention interventions — used to prioritize which segments and actions to focus on based on LTV-at-risk versus intervention cost. If not provided, all recommendations are generated without budget filtering
  • Lookback period (optional): How far back to analyze behavioral trends — defaults to 90 days. Shorter windows catch rapid deterioration, longer windows identify slow-burn churn patterns
  • Custom churn signals (optional): Brand-specific behavioral indicators beyond the defaults — e.g., "stopped using feature X," "downgraded plan tier," "removed payment method," "decreased order size" — that have historically preceded churn for this brand

Process

  1. Load brand context: Read ~/.claude-marketing/brands/_active-brand.json for the active slug, then load ~/.claude-marketing/brands/{slug}/profile.json. Apply customer lifecycle data, historical churn rates, known retention patterns, and industry benchmarks. Also check for guidelines at ~/.claude-marketing/brands/{slug}/guidelines/_manifest.json — if present, load any communication frequency limits or channel restrictions that constrain intervention options. Check for agency SOPs at ~/.claude-marketing/sops/. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with industry defaults.
  2. Gather customer behavioral data: Connect to the CRM MCP (Salesforce or HubSpot) and pull behavioral signal data for each segment — email engagement metrics over the lookback period, purchase history with frequency and recency calculations, product usage or login patterns, support interactions with sentiment indicators, and any custom churn signals the user specified. If CRM MCP is not connected, prompt the user to provide exported segment data or configure the integration.
  3. Score each segment for churn risk: Execute python "${CLAUDE_PLUGIN_ROOT}/scripts/churn-predictor.py" --brand {slug} --action score-segment --segment-name {name} --signals '{...behavioral signals...}' with the behavioral signal data. The scoring model applies weighted signals — recent engagement decline is weighted more heavily than historical patterns, and signals are combined using a composite risk score. Each signal contributes based on its predictive strength: purchase frequency (highest weight, 0.25), engagement trend direction and velocity, support sentiment trajectory, and usage pattern breaks. Scores are normalized to 0-100 for comparability across segments.
  4. Categorize into risk tiers: Map composite scores to four risk tiers — Low (0-25, stable engagement, no intervention needed beyond standard nurture), Medium (26-50, early warning signals present, proactive engagement recommended), High (51-75, multiple deteriorating signals, targeted intervention required within 2 weeks), and Critical (76-100, imminent churn risk, immediate high-touch intervention needed within 48 hours). These cutoffs are fixed heuristic bands, not learned from your data — the script computes the 0-100 score and these bands map score→tier. Recalibrate the band edges against your own realized churn before treating a tier as predictive; apply brand-specific thresholds where historical data suggests different cutoffs.
  5. Generate intervention playbook per tier: For each risk tier with active segments, create a specific intervention playbook — the actions to take (personalized outreach, special offer, product education, account review, executive touch), timing window (how quickly to act and how long the intervention sequence runs), channels to use (email, phone, in-app, direct mail based on segment preferences and tier urgency), messaging approach (tone, value proposition emphasis, urgency level), and escalation path if the initial intervention doesn't shift engagement within the defined window.
  6. Calculate LTV at risk: For each segment, estimate the lifetime value at risk if churn occurs — based on segment average LTV, segment size, and churn probability from the risk score. Aggregate to show total LTV at risk across all segments and per tier. This quantifies the business case for intervention investment.
  7. Prioritize interventions by LTV impact: Rank all interventions by the ratio of LTV-at-risk to intervention cost — high-value segments in Critical and High tiers that can be retained with relatively low-cost interventions rank highest. If the user provided an intervention budget, apply it as a constraint and show which interventions fit within budget and which require additional investment, ordered by expected retention ROI.

Output

A comprehensive churn risk assessment containing:

  • Churn risk scorecard: All segments ranked by composite risk score — showing segment name, size, risk score (0-100), risk tier (Low/Medium/High/Critical), primary churn signals driving the score, and trend direction (improving, stable, or deteriorating)
  • Risk tier distribution: Summary view showing how many customers and what percentage of total base fall into each tier — with comparison to industry benchmarks and the brand's historical distribution if available
  • Contributing factors per segment: For each scored segment, the specific behavioral signals driving the risk assessment — which signals are deteriorating, how fast, and how they compare to the segment's historical baseline and to healthy-segment benchmarks
  • Intervention playbook per tier: Detailed action plans for Medium, High, and Critical tiers — each with specific actions (what to do), timing (when to act and sequence duration), channels (where to reach them), messaging framework (what to say and how to say it), success metrics (what improvement looks like), and escalation triggers (when to escalate to the next intensity level)
  • LTV at risk calculation: Total lifetime value at risk across all segments, broken down by tier — quantifying the business impact of inaction and the maximum justifiable investment in retention for each tier
  • ROI estimate for intervention programs: Projected retention lift and revenue saved per intervention, based on industry retention benchmarks and the brand's historical win-back rates — showing expected ROI for each playbook to justify budget allocation

Agents Used

  • marketing-scientist — Churn scoring model design with weighted behavioral signal analysis, composite risk score calculation and tier threshold calibration, LTV-at-risk estimation using segment value and churn probability, intervention prioritization by retention ROI, and statistical validation of signal predictive strength against historical churn outcomes
  • crm-manager — CRM data extraction from Salesforce or HubSpot via connected MCP servers, customer segment definition and behavioral data structuring, engagement metric aggregation over lookback periods, and data quality validation to ensure scoring inputs are complete and reliable
1---
2name: churn-risk
3description: "Score churn risk per segment by script, with tiered retention playbooks. \"which customers are about to churn\""
4---
5 
6# /digital-marketing-pro:churn-risk
7 
8> **Script location.** If your host does not set `${CLAUDE_PLUGIN_ROOT}`, the scripts are in this plugin's `scripts/` folder, next to `skills/`. Run them with Python 3.10 or newer: `python`, or `python3` where `python` is not found (macOS, many Linux systems).
9 
10## Purpose
11 
12Assess churn risk across customer segments and generate intervention strategies. Score segments using behavioral signals — email engagement decline, purchase frequency drops, login pattern changes, support ticket escalations — to categorize each segment into risk tiers and produce actionable intervention playbooks. This command bridges the gap between knowing customers are churning and knowing what to do about it. Instead of reactive "win-back" campaigns after customers have already left, it identifies at-risk segments early enough to intervene while the relationship is still recoverable. Each intervention playbook includes specific actions, timing windows, channel recommendations, and messaging approaches calibrated to the risk tier and customer value.
13 
14## Input Required
15 
16The user must provide (or will be prompted for):
17 
18- **Customer segments to score**: The segments to evaluate — can be predefined CRM segments (e.g., "Enterprise accounts," "Monthly subscribers," "First-time buyers") or behavioral cohorts (e.g., "Users who haven't purchased in 60 days," "Users with declining email opens"). Each segment should include available behavioral signals: email engagement trends (open rate, click rate, unsubscribe rate over time), purchase frequency and recency, login or product usage patterns, support ticket volume and sentiment, and any other engagement indicators tracked in the CRM
19- **CRM data source**: Which CRM system holds the customer data — Salesforce, HubSpot, or another connected CRM MCP. The command will pull behavioral data directly from the CRM if connected, or the user can provide exported data
20- **Intervention budget (optional)**: Total budget available for retention interventions — used to prioritize which segments and actions to focus on based on LTV-at-risk versus intervention cost. If not provided, all recommendations are generated without budget filtering
21- **Lookback period (optional)**: How far back to analyze behavioral trends — defaults to 90 days. Shorter windows catch rapid deterioration, longer windows identify slow-burn churn patterns
22- **Custom churn signals (optional)**: Brand-specific behavioral indicators beyond the defaults — e.g., "stopped using feature X," "downgraded plan tier," "removed payment method," "decreased order size" — that have historically preceded churn for this brand
23 
24## Process
25 
261. **Load brand context**: Read `~/.claude-marketing/brands/_active-brand.json` for the active slug, then load `~/.claude-marketing/brands/{slug}/profile.json`. Apply customer lifecycle data, historical churn rates, known retention patterns, and industry benchmarks. Also check for guidelines at `~/.claude-marketing/brands/{slug}/guidelines/_manifest.json` — if present, load any communication frequency limits or channel restrictions that constrain intervention options. Check for agency SOPs at `~/.claude-marketing/sops/`. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with industry defaults.
272. **Gather customer behavioral data**: Connect to the CRM MCP (Salesforce or HubSpot) and pull behavioral signal data for each segment — email engagement metrics over the lookback period, purchase history with frequency and recency calculations, product usage or login patterns, support interactions with sentiment indicators, and any custom churn signals the user specified. If CRM MCP is not connected, prompt the user to provide exported segment data or configure the integration.
283. **Score each segment for churn risk**: Execute `python "${CLAUDE_PLUGIN_ROOT}/scripts/churn-predictor.py" --brand {slug} --action score-segment --segment-name {name} --signals '{...behavioral signals...}'` with the behavioral signal data. The scoring model applies weighted signals — recent engagement decline is weighted more heavily than historical patterns, and signals are combined using a composite risk score. Each signal contributes based on its predictive strength: purchase frequency (highest weight, 0.25), engagement trend direction and velocity, support sentiment trajectory, and usage pattern breaks. Scores are normalized to 0-100 for comparability across segments.
294. **Categorize into risk tiers**: Map composite scores to four risk tiers — Low (0-25, stable engagement, no intervention needed beyond standard nurture), Medium (26-50, early warning signals present, proactive engagement recommended), High (51-75, multiple deteriorating signals, targeted intervention required within 2 weeks), and Critical (76-100, imminent churn risk, immediate high-touch intervention needed within 48 hours). **These cutoffs are fixed heuristic bands, not learned from your data** — the script computes the 0-100 score and these bands map score→tier. Recalibrate the band edges against your own realized churn before treating a tier as predictive; apply brand-specific thresholds where historical data suggests different cutoffs.
305. **Generate intervention playbook per tier**: For each risk tier with active segments, create a specific intervention playbook — the actions to take (personalized outreach, special offer, product education, account review, executive touch), timing window (how quickly to act and how long the intervention sequence runs), channels to use (email, phone, in-app, direct mail based on segment preferences and tier urgency), messaging approach (tone, value proposition emphasis, urgency level), and escalation path if the initial intervention doesn't shift engagement within the defined window.
316. **Calculate LTV at risk**: For each segment, estimate the lifetime value at risk if churn occurs — based on segment average LTV, segment size, and churn probability from the risk score. Aggregate to show total LTV at risk across all segments and per tier. This quantifies the business case for intervention investment.
327. **Prioritize interventions by LTV impact**: Rank all interventions by the ratio of LTV-at-risk to intervention cost — high-value segments in Critical and High tiers that can be retained with relatively low-cost interventions rank highest. If the user provided an intervention budget, apply it as a constraint and show which interventions fit within budget and which require additional investment, ordered by expected retention ROI.
33 
34## Output
35 
36A comprehensive churn risk assessment containing:
37 
38- **Churn risk scorecard**: All segments ranked by composite risk score — showing segment name, size, risk score (0-100), risk tier (Low/Medium/High/Critical), primary churn signals driving the score, and trend direction (improving, stable, or deteriorating)
39- **Risk tier distribution**: Summary view showing how many customers and what percentage of total base fall into each tier — with comparison to industry benchmarks and the brand's historical distribution if available
40- **Contributing factors per segment**: For each scored segment, the specific behavioral signals driving the risk assessment — which signals are deteriorating, how fast, and how they compare to the segment's historical baseline and to healthy-segment benchmarks
41- **Intervention playbook per tier**: Detailed action plans for Medium, High, and Critical tiers — each with specific actions (what to do), timing (when to act and sequence duration), channels (where to reach them), messaging framework (what to say and how to say it), success metrics (what improvement looks like), and escalation triggers (when to escalate to the next intensity level)
42- **LTV at risk calculation**: Total lifetime value at risk across all segments, broken down by tier — quantifying the business impact of inaction and the maximum justifiable investment in retention for each tier
43- **ROI estimate for intervention programs**: Projected retention lift and revenue saved per intervention, based on industry retention benchmarks and the brand's historical win-back rates — showing expected ROI for each playbook to justify budget allocation
44 
45## Agents Used
46 
47- **marketing-scientist** — Churn scoring model design with weighted behavioral signal analysis, composite risk score calculation and tier threshold calibration, LTV-at-risk estimation using segment value and churn probability, intervention prioritization by retention ROI, and statistical validation of signal predictive strength against historical churn outcomes
48- **crm-manager** — CRM data extraction from Salesforce or HubSpot via connected MCP servers, customer segment definition and behavioral data structuring, engagement metric aggregation over lookback periods, and data quality validation to ensure scoring inputs are complete and reliable
49 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 866
Checked
Source
indranilbanerjee/digital-marketing-pro ↗
Creator
indranilbanerjee · 114 listings
View creator

Similar skills

See all →
SkillSubscription Lifecycle Managerappeeky/aso-skills · by appeekyWhen the user wants to optimize their subscription business end-to-end — from trial start through renewal, cancellation, and win-back. Use when the user mentions "subscription lifecycle", "trial conversion", "churn", "cancellation", "win-back", "lapsed subscribers", "dunning", "billing retry", "grace period", "renewal rate", "subscriber LTV", or "resubscribe". For paywall design and pricing strategy, see monetization-strategy. For subscription analytics dashboards, see app-analytics.★ 2.2k GitHub starsSkillChurn Prevention Suitecoreyhaines31/marketingskills · by coreyhaines31Tell us about your subscription business and why people quit. Get back a ready-to-use plan to keep more customers and recover failed payments.★ 51.1k GitHub starsAgentRetention Strategy Developerdavila7/claude-code-templates · by davila7Use this agent when you need to assess customer health, develop retention strategies, identify upsell opportunities, or maximize customer lifetime value. Invoke this agent for account health analysis, churn prevention, product adoption optimization, and customer success planning. Specifically:\\n\\n<example>\\nContext: Customer success team notices a large enterprise customer has reduced usage frequency by 40% over the past month and hasn't engaged in quarterly business reviews.\\nuser: "We're concerned about TechCorp's engagement. Usage is down significantly. Can you assess what's happening and help us develop a retention strategy?"\\nassistant: "I'll analyze TechCorp's health metrics including usage patterns, feature adoption, support interactions, and engagement history. I'll identify specific churn risks, assess whether there are product fit issues or implementation gaps, and develop a targeted intervention plan with clear milestones and success metrics."\\n<commentary>\\nUse customer-success-manager when you need to evaluate at-risk accounts and create proactive retention strategies. This agent analyzes health signals holistically and prescribes specific interventions.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: Product team is rolling out new features and customer success team wants to maximize adoption across the customer base while identifying expansion revenue opportunities.\\nuser: "We're launching three new features next month. How do we ensure our customers actually adopt them? And which customers might be willing to upgrade to higher tiers?"\\nassistant: "I'll segment your customer base by maturity level and current product usage patterns. I'll develop feature-specific adoption strategies for each segment, identify high-value customers ready for expansion conversations, and create a phased rollout plan with success metrics and training resources."\\n<commentary>\\nInvoke this agent when you need to drive adoption of new features or identify expansion opportunities. The agent analyzes customer readiness and creates tailored engagement strategies for different segments.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: Quarterly renewal period is approaching and customer success team wants to prepare for renewal conversations with key accounts and identify which customers are at risk of non-renewal.\\nuser: "We have 40 accounts up for renewal in the next 90 days. Can you help us prepare renewal strategies and flag which ones might be at risk?"\\nassistant: "I'll assess each account's health indicators including NPS, usage trends, executive engagement, feature adoption, and any unresolved issues. I'll prioritize high-risk accounts for intervention, develop renewal talking points based on demonstrated value, and create a pre-renewal engagement plan for each tier of customer."\\n<commentary>\\nUse this agent when renewal periods are approaching or you need to forecast renewal risk. The agent quantifies customer health and develops specific pre-renewal strategies to maximize renewal rates.\\n</commentary>\\n</example>\\n\\nDoes not handle individual support tickets or FAQ/help-center content — hand those to customer-support. Does not own pre-sale technical POC/RFP work — hand that to sales-engineer. Does not finalize pricing or discount decisions — route to the account/deal team. Does not review or negotiate contract/legal terms — route to legal-advisor.★ 32.3k GitHub starsSkillCCO Plan Reviewalirezarezvani/claude-skills · by alirezarezvani/cs:cco-review <plan> — Retention-obsessed Chief Customer Officer interrogation of any plan that touches customer retention, segmentation, CS team sizing, or CS team hiring. Use when gross retention is slipping, before approving CSM headcount, or when deciding which customer segments to keep or fire.★ 26.3k GitHub starsSkillChurn Prevention Playbookalirezarezvani/claude-skills · by alirezarezvaniReduce voluntary and involuntary churn through cancel flow design, save offers, exit surveys, and dunning sequences. Use when designing or optimizing a cancel flow, building save offers, setting up dunning emails, or reducing failed-payment churn. Trigger keywords: cancel flow, churn reduction, save offers, dunning, exit survey, payment recovery, win-back, involuntary churn, failed payments, cancel page. NOT for customer health scoring or expansion revenue — use customer-success-manager for that.★ 26.3k GitHub starsSkillCustomer Health Monitoralirezarezvani/claude-skills · by alirezarezvaniMonitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success. Use when analyzing customer accounts, reviewing retention metrics, scoring at-risk customers, or when the user mentions churn, customer health scores, upsell opportunities, expansion revenue, retention analysis, or customer analytics. Runs three Python CLI tools to produce deterministic health scores, churn risk tiers, and prioritized expansion recommendations across Enterprise, Mid-Market, and SMB segments.★ 26.3k GitHub stars

More from indranilbanerjee