Churn Risk logo

Churn Risk

Community
indranilbanerjee
churn-risk

Score churn risk per segment by script, with tiered retention playbooks. "which customers are about to churn"

Overview

Publisherindranilbanerjee
Repositorydigital-marketing-pro
Skill namechurn-risk
Stars
866
Forks
138
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by indranilbanerjee on GitHub. Read the source before you install it.

Installation

Install the Churn Risk AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/churn-risk
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro.git /tmp/digital-marketing-pro
mkdir -p .claude/skills
cp -r /tmp/digital-marketing-pro/skills/churn-risk .claude/skills/churn-risk
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Churn Risk in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Churn Risk on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Churn Risk is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/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

Frequently asked questions

What does the Churn Risk AI skill do?

Score churn risk per segment by script, with tiered retention playbooks. "which customers are about to churn"

Why use Churn Risk on TypingMind?

Because you install it once and use it with any model. Churn Risk is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Churn Risk in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/churn-risk. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Churn Risk?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Churn Risk?

As many as you like. As long as a model supports skills, you can use Churn Risk with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Churn Risk AI skill free?

Yes. It is published on GitHub by indranilbanerjee under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇