cohort-analysis

Cohort analysis of retention and behavior: retention curves, feature adoption trends and segment differences.

cohort-analysis compares retention and behavior across cohorts by signup week or feature adoption. It shows correlation, not causation.

Research & synthesisagents 2MIT downloadable Scan upstream repo ↗

Upstream:phuryn/pm-skills · ★ 28369 · last commit 2026-11-08 (20d)

What it is

Read data with cohort identifiers and a time dimension, compute retention curves, drop-off points, and feature-adoption trends, produce heatmaps and comparison charts, then recommend follow-up research. For product and growth analysts diagnosing retention across user batches. It makes no causal claims and does not replace event-tracking governance.

Core workflow

StageContent
TriggerYou need cohort retention, feature adoption, churn patterns, or engagement trends analyzed
InputCSV, Excel, JSON, or SQL results with a cohort identifier, time periods, and engagement metrics; optional context on launches and redesigns
StepsValidate structure and missing values → compute retention and trends, flag anomalies → build a retention heatmap, cohort curves, and adoption comparisons → extract 2–3 significant patterns → suggest interviews, surveys, session replays, win/loss review
OutputData summary and quality check, quantitative findings, charts, 2–3 patterns, follow-up research and experiment ideas, optional pandas/numpy scripts, and prioritized next steps
BoundaryNeeds a time dimension and at least 3–4 cohorts; defines no tracking; no significance testing or causal conclusions

Getting started: Write the cohort definition as one sentence, then confirm you cover 3+ batches.

Traits

  • Accepts CSV, Excel, JSON, and SQL results, checking structure and missing values first
  • A fixed chart set: retention heatmap, cohort progression curves, adoption comparison charts
  • Only 2–3 significant patterns are reported, with surprising findings called out
  • Every round pairs with follow-up research: churning-user interviews, feature surveys, session replays, high- vs low-retention comparisons

Who it is for and who it is not for

Good fitPoor fit
You already have cohort and time-series dataA single point-in-time snapshot
Judging which cohort retains worseProving a change caused a retention shift
Handing charts and recommendations to a teamData-warehouse modeling or a tracking plan

How it differs

NeedUse
Compare batches using retention datacohort-analysis
Experience and emotion stage by stagephuryn-pm-skills-pm-market-research-customer-journey-map
Define target customers and disqualifiersphuryn-pm-skills-pm-go-to-market-ideal-customer-profile
Pick one leading metric and break it downphuryn-pm-skills-pm-marketing-growth-north-star-metric

Source-level risks

RiskSourceImpact
No significance testing stepThe five steps mention neither significance tests nor confidence intervalsSmall cohort differences may read as real patterns
A low sample thresholdThe tips ask only for “at least 3–4 cohorts”Trends are unstable with few batches
Scripts depend on a runtimepandas/numpy scripts are optional output, but no data or environment ships with the skillYou must supply an environment to reproduce anything
Findings are correlationalThe last step uses qualitative research to explain patternsA chart difference is not a cause

Python example: weekly cohort retention

Compute a retention matrix from an event table with pandas. Synthetic data; swap in your own.

import pandas as pd

# events: user_id, event_date
df = pd.read_csv("events.csv", parse_dates=["event_date"])
df["cohort"] = df.groupby("user_id")["event_date"].transform("min").dt.to_period("W")

# weeks since the user's first activity
df["week"] = ((df["event_date"] - df["cohort"].dt.start_time).dt.days // 7)

# matrix: rows = cohort, columns = week N, values = distinct users
matrix = (df.groupby(["cohort", "week"])["user_id"]
            .nunique()
            .unstack(fill_value=0))

# retention rate: divide each row by its week 0
retention = matrix.div(matrix[0], axis=0)

print(retention.round(3))

Reading it:

ColumnMeaning
W0baseline, always 1.0
W1 / W4 / W12usually the three points worth watching
emptythat cohort has not reached the week yet, not zero

Caveat: with weekly cohorts, the most recent rows are incomplete; compare cohorts at the same age.

Example: input and output

Input

Analyze 12 weeks of retention data, cohort by signup week.

Output

Writes retention curves, week-4 differences per cohort, and correlation between feature adoption and retention.

Check: cohort definitions consistent; small cohorts flagged.

FAQ

How do I define cohorts?

By signup time or first use of a feature.

What if cohorts are small?

Flag sample size and avoid over-reading.

Does it prove causation?

No — it suggests correlation.

Common tasks

CategoryResearch & synthesis
Version2026-10-16
Agent supportClaude Code, Generic (reads SKILL.md)
OSmacOS / Linux / Windows
Dependenciesnone
Environmentnone
Scriptsnone
LicenseMIT
Sourcephuryn/pm-skills ↗
Verification✓ verified
Get itDownload zip
SHA256: 5fc9ec484da2ad0e6a6327f0713f6d768c79b7fe7683abbe9f715daee1ad032e · 0.0 MB

"Generic (agents that read SKILL.md)" means any agent that discovers and loads SKILL.md; support level (auto-discovery, manual config, script execution) varies by agent.

Install
unzip phuryn-pm-skills-pm-data-analytics-cohort-analysis-2026-10-16.zip -d ~/.claude/skills/

Skills directory example: ~/.claude/skills/ for Claude Code; other agents use wherever SKILL.md is discovered.