agentleFS
sankar2codesankar2code/Claude-Skill_SubAgent-Builder-Collections/skills/cohort-retention/SKILL.md

cohort-retention

Skill2 starsChanged 36 days agoMITView on GitHub

Builds and interprets cohort retention: groups users by when (or how) they started, tracks what share come back in each later period, and explains what the curves say about product-market fit, onboarding, and churn. Use this skill when the user asks about retention, churn, "do users stick", "cohort analysis", "retention curve", "triangle chart", "are newer users better or worse", "lifetime value", or shares signup and activity data. Works from a CSV of user activity. Part of the Product Analytics pack.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the data is a CSV with one row per activity event (user_id, event_date, optionally signup_date and a segment column), run …

    line 32
  2. Distinctive:

    Leave cells blank where a cohort hasn't had time to reach that period.

    line 41
  3. Distinctive:

    Look for these patterns and say which ones apply:

    line 45
  4. Distinctive:

    Optional lifetime value: if revenue per active user per period is known, LTV ≈ Σ (retention in period *t* × revenue per active user) over …

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Product Analytics pack · Stage 2. analytics-question-framing → metric-root-cause / cohort-retention → opportunity-sizing → experiment-design → insight-storyteller

Cohort Retention

Averages hide retention problems: a growing product can look healthy while every new cohort churns faster. Cohorts show whether the product is getting better at keeping people.

Step 1 — Define it precisely

Agree on four things before computing anything:

ChoiceOptionsGuidance
Cohortsignup week/month, first purchase, acquisition channel, planStart with signup period; split by channel or plan next
Return eventany activity, a core action, a purchaseUse the action that represents real value (e.g. "created a report"), not just a login
Periodday, week, monthMatch the natural usage frequency: daily apps by day/week, B2B tools by week/month
Retention typeclassic (active in period N), unbounded (active in N or later), rollingClassic is the default and the easiest to explain

Step 2 — Build the table

If the data is a CSV with one row per activity event (user_id, event_date, optionally signup_date and a segment column), run scripts/cohort_table.py (in this skill's folder):

python scripts/cohort_table.py events.csv --user user_id --date event_date --period month
python scripts/cohort_table.py events.csv --user user_id --date event_date --signup signup_date --period week --segment channel

It prints a retention triangle (cohort × periods since start, as % of cohort size) and can save it as CSV with --out. If there's no signup column, each user's first event counts as their start.

Leave cells blank where a cohort hasn't had time to reach that period. Don't treat them as zero.

Step 3 — Read the curves

Look for these patterns and say which ones apply:

  • Flattening (good): the curve drops early, then levels off. The level it settles at is the core retained audience. A curve that keeps declining toward zero suggests weak product-market fit for that cohort.
  • Early drop: most loss happens between period 0 and 1. That points to onboarding and first value, usually the cheapest place to improve.
  • Newer cohorts better or worse: compare the same period across cohorts (read down a column). Improving columns mean product changes are working.
  • Smile curve: retention rising again in later periods (reactivation, seasonality, or a new feature bringing people back).
  • Segment gaps: large differences by channel or plan often matter more than the overall trend.

Flag small cohorts (fewer than ~100 users) as noisy.

Step 4 — Quantify

  • Retention at key milestones: e.g. week 1, week 4, month 3.
  • Change across cohorts at the same milestone, in percentage points.
  • Optional lifetime value: if revenue per active user per period is known, LTV ≈ Σ (retention in period t × revenue per active user) over the horizon. State the horizon and whether it's discounted.

Output: retention summary

# Retention: <product / population>, <period range>
**Definition:** cohort = <…>, return event = <…>, period = <…>
**Headline:** <one sentence, e.g. "Month-1 retention improved from 31% to 38% for cohorts after the June onboarding change; curves flatten around 22%.">

## Retention table
<triangle, or a link to the CSV>

## What it shows
- <pattern 1, with numbers>
- <pattern 2>

## Segments
| Segment | M1 | M3 | Note |
|---|---|---|---|

## Recommended actions
1. <action tied to the biggest drop-off>

When done

Suggest metric-root-cause if a cohort or segment suddenly got worse, or opportunity-sizing to value a retention improvement.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.