guia-matthieu/cohort-analysis
Analyze user retention by cohort. Use when: measuring customer retention; understanding lifecycle patterns; comparing acquisition cohorts; tracking engagement over time; identifying churn risks
npx skills add https://github.com/guia-matthieu/clawfu-skills --skill cohort-analysis
> Analyze retention and behavior patterns by grouping users into cohorts - understand how different customer groups behave over time.
| Claude Does | You Decide |
|-------------|------------|
| Structures analysis frameworks | Metric definitions |
| Identifies patterns in data | Business interpretation |
| Creates visualization templates | Dashboard design |
| Suggests optimization areas | Action priorities |
| Calculates statistical measures | Decision thresholds |
pip install pandas plotly click
python scripts/main.py retention data.csv --date-col signup --event-col purchase
python scripts/main.py retention data.csv --date-col signup --periods week
python scripts/main.py visualize cohorts.csv --output retention_chart.html
python scripts/main.py report data.csv --date-col signup --event-col active --output report.html
python scripts/main.py retention users.csv --date-col signup_date --event-col last_active
# Output:
# Cohort Retention Analysis
# ──────────────────────────────────
# Cohort Users M1 M2 M3 M4
# Jan 2024 1,234 65% 48% 42% 38%
# Feb 2024 1,456 62% 45% 41% --
# Mar 2024 1,321 68% 52% -- --
# Apr 2024 1,567 64% -- -- --
#
# Avg Retention: 65% → 48% → 42% → 38%
# Best Cohort: Mar 2024 (68% M1)
python scripts/main.py report transactions.csv \
--date-col signup \
--event-col purchase_date \
--output retention_report.html
# Generates interactive HTML with:
# - Retention heatmap
# - Cohort size chart
# - Trend analysis
| Cohort | Size | Period 0 | Period 1 | Period 2 | Period 3 |
|--------|------|----------|----------|----------|----------|
| 2024-01 | 1234 | 100% | 65% | 48% | 42% |
| 2024-02 | 1456 | 100% | 62% | 45% | - |
| 2024-03 | 1321 | 100% | 68% | - | - |
category: analytics
subcategory: retention
dependencies: [pandas, plotly]
difficulty: intermediate
time_saved: 4+ hours/week
Take guia-matthieu/cohort-analysis from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.