New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Structure a cohort analysis for retention, LTV

Cohort Analysis Skill

by mohitagw15856 · MIT license · ★ 1,395 on GitHub · updated Sep 23

Cohort Analysis Skill cover

Structure a cohort analysis for retention, LTV, or behavioural patterns. Use when asked to run a cohort analysis, analyse retention by cohort, segment users by behaviour over time, or calculate lifetime value by acquisition period.

---
name: cohort-analysis
description: "Structure a cohort analysis for retention, LTV, or behavioural patterns. Use when asked to run a cohort analysis, analyse retention by cohort, segment users by behaviour over time, or calculate lifetime value by acquisition period. Produces a complete cohort analysis framework with methodology, cohort definitions, retention curves, and prioritised interventions."
---

# Cohort Analysis Skill

Produces a structured cohort analysis covering retention curves, LTV estimation, behavioural segmentation, leading churn indicators, and prioritised interventions. Output is ready to present to product leadership or share with growth and data teams.

---

## Required Inputs

**Ask for any of these that are missing before starting. Do not fabricate numbers, benchmarks, or schema details.**

| Input | What to ask if missing |
|---|---|
| **Analysis goal** | Retention improvement / LTV modelling / behavioural segmentation / churn prediction — pick one primary goal |

Overview

Produces a structured cohort analysis covering retention curves, LTV estimation, behavioural segmentation, leading churn indicators, and prioritised interventions. Output is ready to present to product leadership or share with growth and data teams.

Manual install (npx, ZIP)
Claude Codenpx skills add mohitagw15856/pm-claude-skills --skill cohort-analysis -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/mohitagw15856/pm-claude-skills/tar.gz/f6ca79348c55 \ | tar -xz -C ~/.claude/skills --strip-components=2 pm-claude-skills-f6ca79348c55/skills/cohort-analysis
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/01466f803b398a3c4a08/cohort-analysis.zip" -OutFile "$env:TEMP\cohort-analysis.zip"; Expand-Archive "$env:TEMP\cohort-analysis.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP 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.md14.3 KB
  • references/2 files · 16.1 KB
  • templates/1 file · 1.0 KB
Read the files here
mohitagw15856/f6ca7934 files
SKILL.md
Show the full text281 lines

Cohort Analysis Skill

Produces a structured cohort analysis covering retention curves, LTV estimation, behavioural segmentation, leading churn indicators, and prioritised interventions. Output is ready to present to product leadership or share with growth and data teams.


Required Inputs

Ask for any of these that are missing before starting. Do not fabricate numbers, benchmarks, or schema details.

Input What to ask if missing
Analysis goal Retention improvement / LTV modelling / behavioural segmentation / churn prediction — pick one primary goal
Product or feature What is being analysed?
Cohort definition What groups users into a cohort? (acquisition month, signup channel, plan tier, feature adoption date)
Observation window How many periods to track? (e.g. 12 months, 8 weeks)
Key metric What is measured per cohort? (retention rate, revenue, engagement score, feature usage)
Available data Paste schema, table names, or describe what metrics exist — do not assume
Baseline or goal Any existing retention benchmarks or targets to compare against?

If the user cannot supply actual data, produce the framework with clearly marked placeholders ([X%], [£X], [N users]) and note which sections require real data to complete.


Process

Follow these steps in order:

  1. Confirm inputs — surface any ambiguities before producing output (e.g. conflicting cohort definitions, missing observation window).
  2. Define cohorts — establish entry event, exit criteria, and exclusions so cohorts are mutually exclusive.
  3. Build retention table — populate or template the period-by-period matrix; identify the plateau period.
  4. Project LTV — use observed retention data only; flag if data is insufficient.
  5. Segment by behaviour — create mutually exclusive behavioural segments; identify the activation threshold.
  6. Surface leading churn signals — list observable signals with lead time and intervention mapping.
  7. Compare cohorts over time — assess whether product changes are showing up in newer cohorts.
  8. Prioritise recommendations — tie every recommendation to a specific cohort or segment finding.
  9. Provide SQL reference — adapt the template query to the user's actual schema if supplied.
  10. Run quality checks — verify all checklist items before delivering output.

Output Template

Produce the following sections in order. Omit a section only if explicitly out of scope; note the omission.


Cohort Analysis: [Product / Feature]

Analysis goal: [Retention / LTV / Behavioural segmentation / Churn prediction] Cohort definition: [e.g. Acquisition month — users grouped by calendar month of first sign-up] Observation window: [X months / weeks] Primary metric: [Metric name and definition] Data source: [Tables or metrics used — do not invent if not supplied] Date prepared: [Date]


1. Cohort Definitions

Cohort Period Size Description
[Cohort 1] [Jan 2025] [N users] [e.g. Users who signed up in Jan 2025 via organic search]
[Cohort 2] [Feb 2025] [N users] [Description]

Cohort logic:

  • Entry event: [e.g. First sign-up / First purchase / Feature activation]
  • Exit / churn definition: [e.g. No activity matching key retention event for 30 days]
  • Exclusions: [e.g. Internal test accounts, trial users with < 3 days of data, cohorts with < [N] users — see anti-patterns]

Note: If any cohort falls below the minimum size threshold for statistical reliability, flag it explicitly and exclude it from trend conclusions.


2. Retention Curve

How to read: Each cell shows the percentage of the cohort that performed the key retention event in period N. Period 0 = 100% by definition.

Cohort P0 P1 P2 P3 P6 P12
[Jan 2025] 100% [X%] [X%] [X%] [X%] [X%]
[Feb 2025] 100% [X%] [X%] [X%] [X%] [X%]
[Trend vs prior cohort] — [↑/↓ X pp] [↑/↓ X pp] [↑/↓ X pp] [↑/↓ X pp] [↑/↓ X pp]

Retention plateau: [At what period does the curve flatten? What % does it flatten at? If the observation window is too short to show a plateau, state this explicitly.]

Key observations:

  • [e.g. The largest single-period drop is P1 → P2, averaging X pp — this is the primary churn moment to address]
  • [e.g. Cohorts acquired via [channel] show X pp higher retention at P6 vs the overall average]
  • [e.g. Retention at P3 has moved from X% (oldest cohort) to Y% (newest cohort) — a change of Z pp]

Retention chart — render one line per cohort, period on x-axis:

{
  "type": "line",
  "title": "Retention by cohort (%)",
  "labels": ["P0", "P1", "P2", "P3", "P6", "P12"],
  "series": [
    { "name": "[Cohort 1]", "data": [100, "[X]", "[X]", "[X]", "[X]", "[X]"] },
    { "name": "[Cohort 2]", "data": [100, "[X]", "[X]", "[X]", "[X]", "[X]"] }
  ]
}

3. LTV Projection

Skip this section if revenue data is not available. Do not estimate ARPU without a data source — note the gap and ask for it.

ARPU per period: [Currency and amount per active user per period — sourced from: X] Retention curve used: [Which cohort or blended average, and why]

Period Retained % Revenue per retained user Cumulative LTV
Month 1 [X%] [£X] [£X]
Month 3 [X%] [£X] [£X]
Month 6 [X%] [£X] [£X]
Month 12 [X%] [£X] [£X]

Blended LTV at 12M: [£X — specify which cohorts and weighting method]

LTV by segment:

Segment LTV (12M) vs Blended baseline Key driver of difference
[Organic] [£X] [+X%] [e.g. Higher P6 retention]
[Paid] [£X] [-X%] [e.g. Lower activation rate]
[Enterprise] [£X] [+X%] [e.g. Higher ARPU per period]

4. Behavioural Segmentation

Segments are defined by what users did, not when they arrived. Segments must be mutually exclusive and collectively exhaustive within the analysed population.

Segment Definition % of cohort Retention (P6) LTV (12M)
Power users [e.g. Completed core action ≥ 3×/week in first 30 days] [X%] [X%] [£X]
Casual users [e.g. Completed core action 1–2×/week in first 30 days] [X%] [X%] [£X]
Dormant [e.g. Logged in but never completed core action] [X%] [X%] [£X]
Never activated [e.g. Signed up but never completed onboarding step 1] [X%] [X%] [£X]

Activation threshold (the "aha moment"): [What specific action, taken within the first X days, most strongly predicts long-term retention? Source this from the data — do not assume a generic answer.]


5. Leading Indicators of Churn

Signals that appear before users churn, enabling pre-emptive intervention. All signals listed must be observable in production data — flag any that are theoretical only.

Signal Lead time before churn Correlation strength Recommended intervention
[e.g. No login for 7 consecutive days] [7 days] [Strong / Moderate / Weak] [e.g. Automated re-engagement email at day 7]
[e.g. Support ticket with unresolved escalation] [~14 days] [Moderate] [e.g. CSM outreach within 48 hours of escalation]
[e.g. Core feature usage dropped >50% week-on-week] [~10 days] [Strong] [e.g. In-app prompt linking to use-case tutorial]

Data requirement: Correlation strength must come from observed data. If unavailable, mark as [Hypothesis — not yet validated] and recommend an A/B test or survival analysis to confirm.


6. Cohort Comparison: Trend Over Time

Assess whether product changes are visible in retention outcomes for newer cohorts.

Metric [Oldest cohort] [Newest cohort] Change Notes
P1 retention [X%] [X%] [↑/↓ X pp]
P3 retention [X%] [X%] [↑/↓ X pp]
Activation rate [X%] [X%] [↑/↓ X pp]
Avg. sessions, first 30 days [X] [X] [↑/↓]

Verdict: [Are more recent cohorts performing better or worse? What shipped during this period that could explain the change? If no causal explanation is available, state that — do not invent one.]


7. Recommendations

Every recommendation must reference a specific cohort, segment, or signal from sections above. Generic advice that could apply to any product must be cut.

# Recommendation Anchored to finding Target segment Expected impact Effort Priority
1 [Specific action] [Section X, finding Y] [Segment] [e.g. +X pp P1 retention — basis for estimate] [Low / Med / High] P1
2 [Specific action] [Section X, finding Y] [Segment] [e.g. +X pp P3 retention] [Low / Med / High] P1
3 [Specific action] [Section X, finding Y] [Segment] [e.g. +£X LTV at 12M] [Low / Med / High] P2

If expected impact cannot be estimated from available data, say so — do not fabricate a percentage lift.


8. SQL Reference

Adapt this template to the user's actual schema if supplied. Replace placeholder table and column names — do not ship a query the user cannot run.

-- Retention cohort query
-- Replace: users, events, created_at, event_date, user_id, event_type, [start_date], [key_retention_event]
SELECT
  DATE_TRUNC('month', u.created_at)    AS cohort_month,
  DATE_TRUNC('month', e.event_date)    AS activity_month,
  DATEDIFF('month', u.created_at, e.event_date) AS period,
  COUNT(DISTINCT e.user_id)            AS retained_users,
  COUNT(DISTINCT c.user_id)            AS cohort_size,
  ROUND(
    COUNT(DISTINCT e.user_id) * 100.0
    / NULLIF(COUNT(DISTINCT c.user_id), 0), 1
  )                                    AS retention_rate
FROM users u
JOIN (
  SELECT user_id, DATE_TRUNC('month', created_at) AS cohort_month
  FROM users
  WHERE created_at >= '[start_date]'
) c ON u.user_id = c.user_id
   AND DATE_TRUNC('month', u.created_at) = c.cohort_month
JOIN events e
  ON u.user_id = e.user_id
 AND e.event_type = '[key_retention_event]'
GROUP BY 1, 2, 3
ORDER BY 1, 3;

Adapt for your stack: BigQuery uses DATE_DIFF; Redshift uses DATEDIFF; Snowflake uses DATEDIFF or TIMESTAMPDIFF. Confirm dialect before running.


Scoring Rubric (0–40)

Score any output of this skill before handing it over; 32+ is ship-quality.

Dimension 0 5 10
Cohort definition rigor Boundaries ambiguous; a user could sit in two cohorts Mutually exclusive but entry event weakly justified Unambiguous entry event and date boundaries, with the definition's tradeoffs stated
Plateau & window honesty Retention read off a window too short to support it Plateau claimed without showing where Plateau visible and located, or the window explicitly declared too short to confirm one
LTV grounding LTV from assumed retention or assumed ARPU Observed data used but projection method unstated LTV built from observed retention × observed ARPU with the projection method and decay assumption shown
Trend & leading-indicator payoff Cohorts described, nothing compared Cohort-over-cohort trend shown without indicators Trend across acquisition periods read correctly, plus behavioural leading indicators of churn tied to detection

Quality Checks

Run all checks before delivering output. Do not mark a check as passed unless it is verifiably true given the supplied data.

  • Mutual exclusivity: No user can appear in two cohorts — entry event and date boundaries are unambiguous
  • Retention plateau: The curve shows a visible plateau, or the analysis explicitly states the window is too short to confirm one
  • LTV grounding: LTV projections use observed retention and observed ARPU — not assumed figures
  • Behavioural segments: Mutually exclusive and collectively exhaustive — every user in scope falls into exactly one segment
  • Minimum cohort size: Any cohort below the reliability threshold is flagged and excluded from trend conclusions
  • Churn signals: All leading indicators listed are observable in production data, or explicitly marked as hypotheses
  • Recommendations anchored: Every recommendation references a specific finding — no free-floating growth advice
  • SQL adapted: Query uses the user's actual table/column names if schema was provided

Anti-Patterns

Avoid these failure modes — they produce analysis that looks rigorous but cannot be trusted or acted upon.

Anti-pattern Why it fails Correct approach
Overlapping cohort membership Retention numbers across cohorts cannot be compared Define a single, unambiguous entry event; one user, one cohort
Assumed ARPU in LTV projections Hides segment differences; produces a number that sounds precise but isn't Use observed revenue per retained user per period, broken out by segment
Drawing conclusions from undersized cohorts Random variation masquerades as signal Flag minimum cohort size; exclude or caveat cohorts below threshold
Conflating login with retention A user who logs in but does not complete the key event is not retained by definition Retention = completion of the defined key retention event, not a session
Fabricating lift estimates Projected impact numbers without a data basis mislead prioritisation decisions If impact cannot be estimated from data, say so and recommend a test
Generic recommendations Advice that could apply to any SaaS product adds no analytical value Every recommendation must reference a specific cohort, segment, or signal finding

Trigger Phrases

This skill activates on phrases including:

  • "Run a cohort analysis for [product]"
  • "Analyse retention by acquisition month"
  • "What's the LTV of users from [channel] vs [channel]?"
  • "Build a cohort retention model from
1---
2name: cohort-analysis
3description: "Structure a cohort analysis for retention, LTV, or behavioural patterns. Use when asked to run a cohort analysis, analyse retention by cohort, segment users by behaviour over time, or calculate lifetime value by acquisition period. Produces a complete cohort analysis framework with methodology, cohort definitions, retention curves, and prioritised interventions."
4---
5 
6# Cohort Analysis Skill
7 
8Produces a structured cohort analysis covering retention curves, LTV estimation, behavioural segmentation, leading churn indicators, and prioritised interventions. Output is ready to present to product leadership or share with growth and data teams.
9 
10---
11 
12## Required Inputs
13 
14**Ask for any of these that are missing before starting. Do not fabricate numbers, benchmarks, or schema details.**
15 
16| Input | What to ask if missing |
17|---|---|
18| **Analysis goal** | Retention improvement / LTV modelling / behavioural segmentation / churn prediction — pick one primary goal |
19| **Product or feature** | What is being analysed? |
20| **Cohort definition** | What groups users into a cohort? (acquisition month, signup channel, plan tier, feature adoption date) |
21| **Observation window** | How many periods to track? (e.g. 12 months, 8 weeks) |
22| **Key metric** | What is measured per cohort? (retention rate, revenue, engagement score, feature usage) |
23| **Available data** | Paste schema, table names, or describe what metrics exist — do not assume |
24| **Baseline or goal** | Any existing retention benchmarks or targets to compare against? |
25 
26If the user cannot supply actual data, produce the framework with clearly marked placeholders (`[X%]`, `[£X]`, `[N users]`) and note which sections require real data to complete.
27 
28---
29 
30## Process
31 
32Follow these steps in order:
33 
341. **Confirm inputs** — surface any ambiguities before producing output (e.g. conflicting cohort definitions, missing observation window).
352. **Define cohorts** — establish entry event, exit criteria, and exclusions so cohorts are mutually exclusive.
363. **Build retention table** — populate or template the period-by-period matrix; identify the plateau period.
374. **Project LTV** — use observed retention data only; flag if data is insufficient.
385. **Segment by behaviour** — create mutually exclusive behavioural segments; identify the activation threshold.
396. **Surface leading churn signals** — list observable signals with lead time and intervention mapping.
407. **Compare cohorts over time** — assess whether product changes are showing up in newer cohorts.
418. **Prioritise recommendations** — tie every recommendation to a specific cohort or segment finding.
429. **Provide SQL reference** — adapt the template query to the user's actual schema if supplied.
4310. **Run quality checks** — verify all checklist items before delivering output.
44 
45---
46 
47## Output Template
48 
49Produce the following sections in order. Omit a section only if explicitly out of scope; note the omission.
50 
51---
52 
53# Cohort Analysis: [Product / Feature]
54 
55**Analysis goal:** [Retention / LTV / Behavioural segmentation / Churn prediction]
56**Cohort definition:** [e.g. Acquisition month — users grouped by calendar month of first sign-up]
57**Observation window:** [X months / weeks]
58**Primary metric:** [Metric name and definition]
59**Data source:** [Tables or metrics used — do not invent if not supplied]
60**Date prepared:** [Date]
61 
62---
63 
64## 1. Cohort Definitions
65 
66| Cohort | Period | Size | Description |
67|---|---|---|---|
68| [Cohort 1] | [Jan 2025] | [N users] | [e.g. Users who signed up in Jan 2025 via organic search] |
69| [Cohort 2] | [Feb 2025] | [N users] | [Description] |
70 
71**Cohort logic:**
72- **Entry event:** [e.g. First sign-up / First purchase / Feature activation]
73- **Exit / churn definition:** [e.g. No activity matching key retention event for 30 days]
74- **Exclusions:** [e.g. Internal test accounts, trial users with < 3 days of data, cohorts with < [N] users — see anti-patterns]
75 
76> **Note:** If any cohort falls below the minimum size threshold for statistical reliability, flag it explicitly and exclude it from trend conclusions.
77 
78---
79 
80## 2. Retention Curve
81 
82**How to read:** Each cell shows the percentage of the cohort that performed the key retention event in period N. Period 0 = 100% by definition.
83 
84| Cohort | P0 | P1 | P2 | P3 | P6 | P12 |
85|---|---|---|---|---|---|---|
86| [Jan 2025] | 100% | [X%] | [X%] | [X%] | [X%] | [X%] |
87| [Feb 2025] | 100% | [X%] | [X%] | [X%] | [X%] | [X%] |
88| [Trend vs prior cohort] | — | [↑/↓ X pp] | [↑/↓ X pp] | [↑/↓ X pp] | [↑/↓ X pp] | [↑/↓ X pp] |
89 
90**Retention plateau:** [At what period does the curve flatten? What % does it flatten at? If the observation window is too short to show a plateau, state this explicitly.]
91 
92**Key observations:**
93- [e.g. The largest single-period drop is P1 → P2, averaging X pp — this is the primary churn moment to address]
94- [e.g. Cohorts acquired via [channel] show X pp higher retention at P6 vs the overall average]
95- [e.g. Retention at P3 has moved from X% (oldest cohort) to Y% (newest cohort) — a change of Z pp]
96 
97**Retention chart** — render one line per cohort, period on x-axis:
98 
99```chart
100{
101 "type": "line",
102 "title": "Retention by cohort (%)",
103 "labels": ["P0", "P1", "P2", "P3", "P6", "P12"],
104 "series": [
105 { "name": "[Cohort 1]", "data": [100, "[X]", "[X]", "[X]", "[X]", "[X]"] },
106 { "name": "[Cohort 2]", "data": [100, "[X]", "[X]", "[X]", "[X]", "[X]"] }
107 ]
108}
109```
110 
111---
112 
113## 3. LTV Projection
114 
115> Skip this section if revenue data is not available. Do not estimate ARPU without a data source — note the gap and ask for it.
116 
117**ARPU per period:** [Currency and amount per active user per period — sourced from: X]
118**Retention curve used:** [Which cohort or blended average, and why]
119 
120| Period | Retained % | Revenue per retained user | Cumulative LTV |
121|---|---|---|---|
122| Month 1 | [X%] | [£X] | [£X] |
123| Month 3 | [X%] | [£X] | [£X] |
124| Month 6 | [X%] | [£X] | [£X] |
125| Month 12 | [X%] | [£X] | [£X] |
126 
127**Blended LTV at 12M:** [£X — specify which cohorts and weighting method]
128 
129**LTV by segment:**
130 
131| Segment | LTV (12M) | vs Blended baseline | Key driver of difference |
132|---|---|---|---|
133| [Organic] | [£X] | [+X%] | [e.g. Higher P6 retention] |
134| [Paid] | [£X] | [-X%] | [e.g. Lower activation rate] |
135| [Enterprise] | [£X] | [+X%] | [e.g. Higher ARPU per period] |
136 
137---
138 
139## 4. Behavioural Segmentation
140 
141Segments are defined by what users did, not when they arrived. Segments must be mutually exclusive and collectively exhaustive within the analysed population.
142 
143| Segment | Definition | % of cohort | Retention (P6) | LTV (12M) |
144|---|---|---|---|---|
145| **Power users** | [e.g. Completed core action ≥ 3×/week in first 30 days] | [X%] | [X%] | [£X] |
146| **Casual users** | [e.g. Completed core action 1–2×/week in first 30 days] | [X%] | [X%] | [£X] |
147| **Dormant** | [e.g. Logged in but never completed core action] | [X%] | [X%] | [£X] |
148| **Never activated** | [e.g. Signed up but never completed onboarding step 1] | [X%] | [X%] | [£X] |
149 
150**Activation threshold (the "aha moment"):** [What specific action, taken within the first X days, most strongly predicts long-term retention? Source this from the data — do not assume a generic answer.]
151 
152---
153 
154## 5. Leading Indicators of Churn
155 
156Signals that appear **before** users churn, enabling pre-emptive intervention. All signals listed must be observable in production data — flag any that are theoretical only.
157 
158| Signal | Lead time before churn | Correlation strength | Recommended intervention |
159|---|---|---|---|
160| [e.g. No login for 7 consecutive days] | [7 days] | [Strong / Moderate / Weak] | [e.g. Automated re-engagement email at day 7] |
161| [e.g. Support ticket with unresolved escalation] | [~14 days] | [Moderate] | [e.g. CSM outreach within 48 hours of escalation] |
162| [e.g. Core feature usage dropped >50% week-on-week] | [~10 days] | [Strong] | [e.g. In-app prompt linking to use-case tutorial] |
163 
164> **Data requirement:** Correlation strength must come from observed data. If unavailable, mark as [Hypothesis — not yet validated] and recommend an A/B test or survival analysis to confirm.
165 
166---
167 
168## 6. Cohort Comparison: Trend Over Time
169 
170Assess whether product changes are visible in retention outcomes for newer cohorts.
171 
172| Metric | [Oldest cohort] | [Newest cohort] | Change | Notes |
173|---|---|---|---|---|
174| P1 retention | [X%] | [X%] | [↑/↓ X pp] | |
175| P3 retention | [X%] | [X%] | [↑/↓ X pp] | |
176| Activation rate | [X%] | [X%] | [↑/↓ X pp] | |
177| Avg. sessions, first 30 days | [X] | [X] | [↑/↓] | |
178 
179**Verdict:** [Are more recent cohorts performing better or worse? What shipped during this period that could explain the change? If no causal explanation is available, state that — do not invent one.]
180 
181---
182 
183## 7. Recommendations
184 
185Every recommendation must reference a specific cohort, segment, or signal from sections above. Generic advice that could apply to any product must be cut.
186 
187| # | Recommendation | Anchored to finding | Target segment | Expected impact | Effort | Priority |
188|---|---|---|---|---|---|---|
189| 1 | [Specific action] | [Section X, finding Y] | [Segment] | [e.g. +X pp P1 retention — basis for estimate] | [Low / Med / High] | P1 |
190| 2 | [Specific action] | [Section X, finding Y] | [Segment] | [e.g. +X pp P3 retention] | [Low / Med / High] | P1 |
191| 3 | [Specific action] | [Section X, finding Y] | [Segment] | [e.g. +£X LTV at 12M] | [Low / Med / High] | P2 |
192 
193> If expected impact cannot be estimated from available data, say so — do not fabricate a percentage lift.
194 
195---
196 
197## 8. SQL Reference
198 
199Adapt this template to the user's actual schema if supplied. Replace placeholder table and column names — do not ship a query the user cannot run.
200 
201```sql
202-- Retention cohort query
203-- Replace: users, events, created_at, event_date, user_id, event_type, [start_date], [key_retention_event]
204SELECT
205 DATE_TRUNC('month', u.created_at) AS cohort_month,
206 DATE_TRUNC('month', e.event_date) AS activity_month,
207 DATEDIFF('month', u.created_at, e.event_date) AS period,
208 COUNT(DISTINCT e.user_id) AS retained_users,
209 COUNT(DISTINCT c.user_id) AS cohort_size,
210 ROUND(
211 COUNT(DISTINCT e.user_id) * 100.0
212 / NULLIF(COUNT(DISTINCT c.user_id), 0), 1
213 ) AS retention_rate
214FROM users u
215JOIN (
216 SELECT user_id, DATE_TRUNC('month', created_at) AS cohort_month
217 FROM users
218 WHERE created_at >= '[start_date]'
219) c ON u.user_id = c.user_id
220 AND DATE_TRUNC('month', u.created_at) = c.cohort_month
221JOIN events e
222 ON u.user_id = e.user_id
223 AND e.event_type = '[key_retention_event]'
224GROUP BY 1, 2, 3
225ORDER BY 1, 3;
226```
227 
228**Adapt for your stack:** BigQuery uses `DATE_DIFF`; Redshift uses `DATEDIFF`; Snowflake uses `DATEDIFF` or `TIMESTAMPDIFF`. Confirm dialect before running.
229 
230---
231 
232## Scoring Rubric (0–40)
233 
234Score any output of this skill before handing it over; 32+ is ship-quality.
235 
236| Dimension | 0 | 5 | 10 |
237|---|---|---|---|
238| Cohort definition rigor | Boundaries ambiguous; a user could sit in two cohorts | Mutually exclusive but entry event weakly justified | Unambiguous entry event and date boundaries, with the definition's tradeoffs stated |
239| Plateau & window honesty | Retention read off a window too short to support it | Plateau claimed without showing where | Plateau visible and located, or the window explicitly declared too short to confirm one |
240| LTV grounding | LTV from assumed retention or assumed ARPU | Observed data used but projection method unstated | LTV built from observed retention × observed ARPU with the projection method and decay assumption shown |
241| Trend & leading-indicator payoff | Cohorts described, nothing compared | Cohort-over-cohort trend shown without indicators | Trend across acquisition periods read correctly, plus behavioural leading indicators of churn tied to detection |
242 
243## Quality Checks
244 
245Run all checks before delivering output. Do not mark a check as passed unless it is verifiably true given the supplied data.
246 
247- [ ] **Mutual exclusivity:** No user can appear in two cohorts — entry event and date boundaries are unambiguous
248- [ ] **Retention plateau:** The curve shows a visible plateau, or the analysis explicitly states the window is too short to confirm one
249- [ ] **LTV grounding:** LTV projections use observed retention and observed ARPU — not assumed figures
250- [ ] **Behavioural segments:** Mutually exclusive and collectively exhaustive — every user in scope falls into exactly one segment
251- [ ] **Minimum cohort size:** Any cohort below the reliability threshold is flagged and excluded from trend conclusions
252- [ ] **Churn signals:** All leading indicators listed are observable in production data, or explicitly marked as hypotheses
253- [ ] **Recommendations anchored:** Every recommendation references a specific finding — no free-floating growth advice
254- [ ] **SQL adapted:** Query uses the user's actual table/column names if schema was provided
255 
256---
257 
258## Anti-Patterns
259 
260Avoid these failure modes — they produce analysis that looks rigorous but cannot be trusted or acted upon.
261 
262| Anti-pattern | Why it fails | Correct approach |
263|---|---|---|
264| Overlapping cohort membership | Retention numbers across cohorts cannot be compared | Define a single, unambiguous entry event; one user, one cohort |
265| Assumed ARPU in LTV projections | Hides segment differences; produces a number that sounds precise but isn't | Use observed revenue per retained user per period, broken out by segment |
266| Drawing conclusions from undersized cohorts | Random variation masquerades as signal | Flag minimum cohort size; exclude or caveat cohorts below threshold |
267| Conflating login with retention | A user who logs in but does not complete the key event is not retained by definition | Retention = completion of the defined key retention event, not a session |
268| Fabricating lift estimates | Projected impact numbers without a data basis mislead prioritisation decisions | If impact cannot be estimated from data, say so and recommend a test |
269| Generic recommendations | Advice that could apply to any SaaS product adds no analytical value | Every recommendation must reference a specific cohort, segment, or signal finding |
270 
271---
272 
273## Trigger Phrases
274 
275This skill activates on phrases including:
276 
277- "Run a cohort analysis for [product]"
278- "Analyse retention by acquisition month"
279- "What's the LTV of users from [channel] vs [channel]?"
280- "Build a cohort retention model from
281 
View all files on GitHub →

Details

Updated
Sep 23, 2026
License
MIT
Stars on the repo
★ 1,395
Checked
Source
mohitagw15856/pm-claude-skills ↗
Creator
mohitagw15856 · 193 listings
View creator

Made with cohort-analysis

Cohort Analysis Skill — Galaxy 3D — fly through all 1170 skills as a glowing constellation you orbit and click into (from the mohitagw15856/pm-claude-skills README)
Cohort Analysis Skill — Galaxy 3D — fly through all 1170 skills as a glowing constellation you orbit and click into (from the mohitagw15856/pm-claude-skills README)

by mohitagw15856

Cohort Analysis Skill — PM Skills Wrapped — your practice turned into a shareable, Spotify-Wrapped-style story (from the mohitagw15856/pm-claude-skills README)
Cohort Analysis Skill — PM Skills Wrapped — your practice turned into a shareable, Spotify-Wrapped-style story (from the mohitagw15856/pm-claude-skills README)

by mohitagw15856

Similar skills

See all →
SkillPaste the sales and spend numbers each ad platform claimsAttribution AuditAgriciDaniel/claude-ads · by AgriciDanielPaste the sales and spend numbers each ad platform claims, and get back a plain explanation of why they disagree and which figure to trust.★ 9.5k GitHub starsSkillSet up, audit, or optimize analytics trackingkostja94/marketing-skills · by kostja94When the user wants to set up, audit, or optimize analytics tracking (GA4, events, conversions). Also use when the user mentions "Google Analytics," "GA4," "event tracking," "conversions," "attribution model," "gtag," "data layer," "GA4 setup," "conversion tracking," "event setup," "User ID tracking," or "CTA attribution." For traffic insights, use traffic-analysis.★ 1k GitHub starsSkillSet up first-party tracking and analytics1P Tagging & AnalyticsLeadMagic/gtm-skills · by LeadMagicSet up first-party tracking and analytics — website pixels, conversion tracking, UTM architecture, cookie consent, server-side tagging vs client-side, 1P vs 3P data strategy, and identity resolution. Use when setting up tracking, implementing pixels, building attribution, or preparing for privacy-first measurement. Triggers on: "pixel", "tracking", "conversion tracking", "first-party data", server-side tagging", "UTM", "cookie consent", "1P vs 3P", "identity resolution", or any tracking implementation request.★ 62 GitHub starsSkillSet up, improve, or audit analytics tracking and measurementcoreyhaines31/marketingskills · by coreyhaines31When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For choosing attribution models, comparing multi-touch/MMM/incrementality, or reconciling conflicting numbers across tools, see attribution. For A/B test measurement, see ab-testing.★ 51.1k GitHub starsSkillPaste the conflicting numbers from your ad accountsFind Out Which Marketing Actually Made The Salecoreyhaines31/marketingskills · by coreyhaines31Paste the conflicting numbers from your ad accounts, website stats and sales records; get back one honest read on which channels really drove sales and where to put your budget.★ 51.1k GitHub starsSkillSet up, improve, or audit analytics tracking and measurementdavila7/claude-code-templates · by davila7When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.★ 32.3k GitHub stars

More from mohitagw15856

SkillDesign a 360-degree feedback survey or write a structured360-Degree Feedback Template Skillmohitagw15856/pm-claude-skills · by mohitagw15856Design a 360-degree feedback survey or write a structured 360 feedback report. Use when asked to build a 360 feedback process, write 360 feedback for a colleague, design a feedback survey, or produce a feedback report. Produces either a complete survey instrument with rating scales and open-ended questions, or a structured narrative feedback report with themes, strengths, and development areas.★ 1.4k GitHub starsSkillDesign statistically rigorous A/B tests for product featuresA/B Test Planner Skillmohitagw15856/pm-claude-skills · by mohitagw15856Design statistically rigorous A/B tests for product features, UI changes, onboarding flows, and pricing experiments. Use when asked to set up an experiment, design an A/B test, calculate sample size, or interpret test results. Produces a complete test plan with hypothesis, variant definitions, sample size, duration estimate, guardrail metrics, and a results interpretation guide.★ 1.4k GitHub starsSkillGenerate a WCAG 2.2 accessibility audit checklistAccessibility Audit Skillmohitagw15856/pm-claude-skills · by mohitagw15856Generate a WCAG 2.2 accessibility audit checklist and remediation suggestions for any UI or design. Use when asked to audit for accessibility, check WCAG compliance, review a design for a11y issues, or create an accessibility remediation plan. Produces a prioritised checklist with pass/fail assessments and specific fixes.★ 1.4k GitHub starsSkillBuild a structured account plan for any key customerAccount Plan Skillmohitagw15856/pm-claude-skills · by mohitagw15856Build a structured account plan for any key customer or target account. Use when asked to create an account plan, key account strategy, strategic account review, or territory plan. Produces a complete account plan with relationship map, growth opportunities, risks, and 90-day action plan.★ 1.4k GitHub starsSkillOptimize an article for Answer Engine Optimization so AIAEO Optimizer Skillmohitagw15856/pm-claude-skills · by mohitagw15856Optimize an article for Answer Engine Optimization (AEO) so AI engines like ChatGPT, Perplexity, and Claude can extract, quote, and cite it. Use when asked to AEO-optimize, make content AI-readable, improve AI citation chances, or adapt an article for answer engines. Produces an AEO-optimised rewrite with question headings, 50–80 word answer capsules, a paragraph-length audit, and flagged trust signals.★ 1.4k GitHub starsSkillConduct a structured ethical review of an AI or ML featureAI Ethics Review Skillmohitagw15856/pm-claude-skills · by mohitagw15856Conduct a structured ethical review of an AI or ML feature, model, or product. Use when preparing to deploy an AI system, assessing algorithmic risk, auditing a model for bias, or producing a responsible AI impact assessment. Produces a structured ethics review covering fairness, transparency, privacy, safety, accountability, and societal impact with a risk tier score, pre-deployment checklist, and prioritised mitigations.★ 1.4k GitHub stars