Skip to content This library is free, offered as dana. If it helps your work, donate here →

This is one of 3,622 free prompts in the penguin tree ai library. Sign up once and the whole library opens, with new prompts by email.

open the library →

Cohort analysis generator

Builds a complete cohort analysis from raw user or event data — defining cohorts across acquisition, behavioral, and value dimensions, computing retention curves, frequency patterns, and revenue per cohort, then…

download .md

Purpose

Transform raw user or event data into a structured cohort analysis that reveals retention curves, usage frequency, and value differences across meaningful user segments — so analysts can pinpoint which cohorts retain, which churn, and where to focus growth or product investment. Removes the guesswork of choosing cohort definitions and turns ambiguous engagement data into ranked, decision-ready findings.

When to Use

Invoke this skill when the user asks to:

  • Analyze user retention or build a retention curve by signup period
  • Compare how different user groups behave over time (e.g., paid vs. organic, channel A vs. channel B)
  • Diagnose why churn is happening and which cohort it concentrates in
  • Measure the long-term value or frequency of users acquired in a given period
  • Build a repeatable cohort report from event logs, signups, or transaction data
  • Evaluate whether a product change or campaign improved retention for users acquired after it

Inputs Required

Before starting, collect:

  • Data description: What data is available — schema, key columns, granularity (user-level, event-level, transaction-level)
  • Analysis goal: What decision this informs (improve retention, justify channel spend, find churn cause)
  • Cohort dimension: How to group users — by acquisition date, channel, plan, first action, or behavior
  • Time period & interval: Total window analyzed and the cohort interval (daily / weekly / monthly)
  • Key metric: What "active" or "retained" means for this business (login, purchase, core action) and any value metric (revenue, orders, GMV)
  • Comparison segments (optional): Any specific groups to compare side-by-side
  • Business context: Product type, expected usage rhythm, known seasonality

If interval or the activity definition is missing, default to monthly cohorts with "any core action in the period" as the activity event, and state the assumption.

Instructions

Step 1: Define the Cohorts

Establish the cohort grouping logic before any computation.

  • Acquisition cohorts: Group users by the period they first signed up or transacted (most common default)
  • Behavioral cohorts: Group by a defining first action (completed onboarding, made first purchase, invited a teammate)
  • Value cohorts: Group by spend tier, plan, or first-order value
  • State the cohort definition explicitly, the interval (day/week/month), and the activity event that counts as "active."
  • Confirm the analysis window (e.g., 12 monthly cohorts × 12 months of follow-up).

Step 2: Build the Retention Matrix

Construct the core retention table.

  • Rows = cohorts (e.g., Jan, Feb, Mar signups); columns = periods since acquisition (Period 0, 1, 2…).
  • Each cell = % of the cohort active in that period.
  • Compute and label key inflection points: Period 1 retention (the first drop — usually the steepest), the plateau period (where the curve flattens), and the flat-line retention (the long-term floor).
  • Note where curves diverge between cohorts — divergence is where the insight lives.

Step 3: Layer the Frequency Dimension

Measure how intensely retained users engage, not just whether they return.

  • For each cohort, compute average actions/sessions/orders per active user per period.
  • Distinguish engagement depth (frequency rising over time = habit forming) from shallow retention (users present but low frequency = at-risk).
  • Flag cohorts where retention is flat but frequency is falling — a leading churn indicator.

Step 4: Layer the Value Dimension

Attach economic weight to each cohort.

  • Compute cumulative value per cohort: revenue, orders, or GMV per acquired user over time.
  • Build a simple LTV-by-cohort view: cumulative value at Period 1, 3, 6, 12.
  • Identify the payback signal — at which period cohort value crosses acquisition cost (if CAC provided) or simply where value accelerates vs. flattens.
  • Surface the gap between highest- and lowest-value cohorts as a percentage.

Step 5: Diagnose the Drivers

Connect the patterns to causes.

  • For diverging cohorts, hypothesize the driver: a product change, channel quality difference, seasonality, or onboarding shift aligned in time.
  • Separate correlation from coincidence — only claim a driver when the cohort boundary lines up with a known event.
  • Identify the single best-retaining and single worst-retaining cohort, with a stated reason.

Step 6: Rank the Findings and Actions

Translate analysis into decisions.

  • Produce 5–8 findings ranked by impact on the stated goal.
  • For each finding: the observation, the metric backing it, and the recommended action.
  • Distinguish retention actions (improve the curve), acquisition actions (acquire more of the winning cohort), and product actions (fix the frequency or value gap).

Output Format

  • Structure: Sectioned report — cohort definition, retention matrix, frequency analysis, value analysis, driver diagnosis, ranked findings
  • Length: 900–1,300 words plus a retention table
  • Format: Prose analysis with one retention matrix presented as a table; findings as a ranked list
  • Sections: Cohort Definition → Retention Matrix → Frequency Analysis → Value Analysis → Driver Diagnosis → Ranked Findings & Actions
  • Tone: Analytical and precise — like a growth analyst presenting to a product lead. Quantify claims, avoid hedging, and call out the one thing that matters most.

Quality Checklist

Before delivering output, verify:

  • [ ] The cohort definition, interval, and activity event are stated explicitly before any numbers
  • [ ] The retention matrix is presented as a readable table with cohorts as rows and periods as columns
  • [ ] All three dimensions are addressed — retention, frequency, and value — not just retention
  • [ ] Period 1 retention, the plateau, and the flat-line floor are each identified
  • [ ] At least one cohort divergence is connected to a specific hypothesized driver
  • [ ] Findings number 5–8 and are ranked by impact, each with a backing metric and a recommended action

Notes

  • When working from a data description rather than live data, build the matrix with clearly-labeled illustrative figures and tell the user exactly which query or pivot would produce the real numbers.
  • The steepest, most actionable insight is almost always in Period 1 retention — fixing the first-period drop compounds across every downstream period.
  • Flat retention with declining frequency is the most-missed early churn signal; always check frequency before declaring a cohort healthy.
  • For marketplace data, run cohorts on both sides (buyers and sellers) when available — they often have inverse retention dynamics that average out misleadingly if combined.

How to use this skill

This file is a Claude Code skill in Anthropic's standard format — markdown with YAML frontmatter at the top.

Installing in Claude Code:

  • ~/.claude/skills/<folder-name>/SKILL.md — auto-loads in every session anywhere on your machine (recommended for skills you'll use across multiple projects)
  • <your-project>/.claude/skills/<folder-name>/SKILL.md — auto-loads only when working in that project (recommended for project-specific skills)

Restart Claude Code or open a new session to register.

Using in Claude.ai, ChatGPT, Gemini, or other AI tools:

  1. Drag this file into a new chat, or copy and paste its contents
  2. Send your task or request as your next message — the AI will apply the skill where it fits

For Claude Code skill details: https://docs.anthropic.com/en/docs/claude-code/skills