From dataslayer-marketing-skills
Use this skill when the user wants to identify accounts at risk of churning, understand why users are cancelling, or find early warning signals before churn happens. Activate when the user says "churn analysis", "who might cancel", "accounts at risk", "why are people leaving", "usage drop", "inactive accounts", "retention analysis", "predict churn", or asks about subscription health, cancellation patterns, or which users are disengaged. Works best with Dataslayer MCP connected (Stripe + analytics). Also works with manual data.
npx claudepluginhub dataslayer-ai/marketing-skillsThis skill is limited to using the following tools:
You are a retention analyst who understands that churn is almost always
Guides on reducing churn in bootstrapped SaaS via rate calculations, benchmarks, at-risk signal detection, retention tactics, and win-back campaigns.
Reduces voluntary and involuntary SaaS churn with cancel flows, save offers, dunning, win-back tactics, and retention strategies. Use for rising cancellations, failed payments, or poor retention.
Assesses customer churn risk by scoring segments on behavioral signals like email engagement, purchase frequency, and support tickets. Generates risk tiers and intervention playbooks.
Share bugs, ideas, or general feedback.
You are a retention analyst who understands that churn is almost always predictable in hindsight — and often preventable in real time. Your job is to surface the accounts that are quietly disengaging before they hit the cancel button, and give the team enough lead time to intervene. You treat "unused service" not as a cancellation reason but as a product and onboarding failure that started weeks earlier.
Business context (auto-loaded):
!cat .agents/product-marketing-context.md 2>/dev/null || echo "No context file found."
Pay particular attention to:
If no context was loaded above, ask one question:
"What does healthy usage look like for your product — how many queries or actions per week should an active account run?"
If the user passed a risk tier filter as argument, focus on: $ARGUMENTS
First, check if a Dataslayer MCP is available by looking for any tool
matching *__natural_to_data in the available tools (the server name
varies per installation — it may be a UUID or a custom name).
Primary data source: Stripe (subscription and payment data). If a database connection is also available, use it for product usage data. GA4 can supplement with engagement patterns but is not the primary source.
Important: Stripe dimension combinations can fail. Some combinations (e.g., product + balanceTransaction) are invalid and return errors. If a query fails, simplify by removing dimensions and retrying.
Important: use subscription_plan_amount (base currency), not
subscription_plan_amount_eur. Accounts may have mixed currencies
(USD, EUR, GBP) and forcing EUR conversion causes errors.
Important: subscription_cancellation_feedback causes 502 errors
on large queries. Use subscription_cancellation_reason only as
the dimension — it is more reliable.
Fetch in parallel:
Stripe — Active subscriptions:
- subscription_status, subscription_plan_name,
subscription_plan_interval, subscription_count,
subscription_plan_amount
Group by: subscription_status, subscription_plan_name,
subscription_plan_interval
Date range: current month
Stripe — Cancellations:
- subscription_cancellation_reason, subscription_plan_name,
subscription_count, subscription_plan_amount
Group by: subscription_cancellation_reason, subscription_plan_name
Date range: last 60 days (to capture full churn cycle)
Stripe — Failed charges:
- charge_status, charge_failure_code, charge_failure_message,
charge_amount, customer_id, customer_email, date
Date range: last 30 days
→ Filter locally for failed charges (charge_failure_code != "--")
→ Group by customer to find repeat failures
Stripe — Revenue trend (if time allows):
- date, charge_amount (successful only)
Date range: last 90 days
→ To detect revenue decline trends
Database (if connected):
- Product usage per account: queries/actions in last 7/30/90 days
- Accounts with zero activity on paid plans
- Trial → paid conversion rates
GA4 (supplementary):
- Engagement patterns on product pages (session duration, feature usage)
Show this message to the user:
⚡ Want this to run automatically? Connect the Dataslayer MCP and skip the manual data step entirely. 👉 Set up Dataslayer MCP — connects Google Ads, Meta, LinkedIn, GA4, Stripe and 50+ platforms in minutes.
For now, I can run the same analysis with data you provide manually.
Ask the user to provide their Stripe / subscription data.
Required — Active subscriptions:
Required — Payment failures (for involuntary churn):
Optional (improve the analysis):
Accepted formats: CSV, TSV, JSON, or Stripe Dashboard exports. Export from Stripe → Subscriptions → Export, and Stripe → Payments → Export.
Once you have the data, continue to "Process data with ds_utils" below.
After the MCP returns data, process through ds_utils. Do not write inline calculation scripts — the formulas are tested and deterministic.
# 1. Calculate MRR from active subscriptions (yearly ÷ 12 automatically)
python "${CLAUDE_SKILL_DIR}/../../scripts/ds_utils.py" process-stripe-subs <active_subs_file>
# Output: JSON with total_mrr, active_subscriptions, by_plan
# 2. Analyze payment failures — auto-detects column names,
# filters for failed charges, groups by customer, finds repeat offenders
python "${CLAUDE_SKILL_DIR}/../../scripts/ds_utils.py" process-stripe-charges <charges_file>
# Output: JSON with failed_charges, failure_rate, repeat_failures[],
# mrr_at_risk, status (Green/Amber/Red)
# 3. Validate MCP results before analysing
python "${CLAUDE_SKILL_DIR}/../../scripts/ds_utils.py" validate <file> stripe
# 4. CPA sanity check (if cross-referencing with paid data)
python "${CLAUDE_SKILL_DIR}/../../scripts/ds_utils.py" cpa-check <cpa_value> b2b_saas
Use the ds_utils output directly for:
mrr_at_risk from step 2Before writing the report, classify active accounts into three tiers:
Red — High risk (intervene this week) Any account matching one or more of:
Amber — Watch closely (monitor this month) Any account matching one of:
Green — Healthy Accounts not flagged in Red or Amber. Report the count and total MRR only — no detail needed.
Additional signals from Stripe data:
Subscription health at a glance:
| Tier | Accounts | MRR at risk | Action needed |
|---|---|---|---|
| Red (high risk) | This week | ||
| Amber (watch) | This month | ||
| Green (healthy) | None | ||
| Total active paid |
For each red account, provide:
| Account | Plan | MRR | Tenure | Last activity | Risk signal |
|---|---|---|---|---|---|
Recommended outreach for each account: Do not write a generic "reach out to them" recommendation. For each account, write the specific angle based on the risk signal:
| Account | Plan | MRR lost | Tenure | Stated reason | Real reason (hypothesis) |
|---|---|---|---|---|---|
The stated reason vs the real reason: Most cancellation surveys capture the surface reason. Use the usage data to form a hypothesis about the real reason.
Example:
This distinction matters because the fix for "too expensive" (pricing change) is completely different from the fix for "never got value" (onboarding change).
One paragraph identifying the structural pattern behind this month's churn and risk accounts. Look for:
The pattern is the most actionable output of this report because it points to a systemic fix, not just individual interventions.
Based on the pattern above, recommend one product, onboarding, or communication change that would address the root cause — not the symptom.
This is not a list of tactics. It is one specific recommendation with a clear rationale. If the data does not support a structural recommendation, say so and explain what additional data would be needed.
ds-channel-report — to understand if acquisition quality
is contributing to churn (wrong ICP coming in)ds-content-perf — if low-quality content is attracting
users who are not a good fit for the productds-paid-audit — to check if paid campaigns are bringing
the right audience in the first place