Index of every page on this site: llms.txt
All skills
samuelcastro avatar

/growth-analytics

@cea4ddf
Run it yourself

Guide founders through metrics frameworks, experimentation, and data-driven growth. Use when a founder says "help me set up my metrics framework", "what should my north star metric be?", "design an A/B test", "help me analyze retention/churn", "build me a dashboard to track growth", "how do I do cohort analysis?", "what metrics should I track?", "pirate metrics", "AARRR funnel", or needs to make sense of their growth data.

Use this Skill: https://skilld.dev/gh/samuelcastro/startup-skills/growth-analytics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesretention-cohorts.md

≈3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Retention & Cohort Analysis Reference

Cohort Analysis Methods

Time-Based Cohorts

Group users by when they signed up:

Weekly Cohorts (recommended for most startups):

Cohort: Week of signup
Periods: Week 0, Week 1, Week 2, ... Week N
Metric: % active in each period

Monthly Cohorts (for lower-volume products):

Cohort: Month of signup
Periods: Month 0, Month 1, Month 2, ... Month N
Metric: % active in each period

Behavioral Cohorts

Group users by what they did:

Cohort Type Example Use Case
Acquisition source Organic vs. Paid Channel quality
First action Feature A vs. Feature B Activation paths
Plan type Free vs. Paid Monetization analysis
Geography US vs. EU Regional differences
Onboarding Completed vs. Skipped Onboarding effectiveness

Defining "Active"

Critical: Define what "active" means BEFORE analysis.

Options:

Definition Best For Example
Any login Low-frequency products E-commerce
Core action Engagement products "Sent a message"
Value action SaaS "Completed a task"
Revenue action Transactional "Made a purchase"

Good activity definitions:

  • Specific: "Sent at least 1 message" not "used the app"
  • Measurable: Can track in analytics
  • Meaningful: Correlates with value/retention

Retention Curves

Reading Retention Curves

100%|●
    |  ●
    |    ●
    |      ●──●──●──●──●  ← Flattening = good
 50%|
    |
    |
    |
  0%+──────────────────────
    D1  D7  D14  D30  D60  D90

Healthy curve: Steep initial drop, then flattens (users who stay, stay)

Unhealthy curve: Never flattens (continuous loss)

Curve Patterns

Pattern 1: Smile Curve (Ideal)

    ●
      ●
        ●
          ●──●
               ●──●──●
  • Users return after initial drop
  • Indicates: Delayed value realization, re-engagement working

Pattern 2: Flat Line (Strong PMF)

    ●──●──●──●──●──●
  • Almost no decay
  • Indicates: Essential product, strong habits

Pattern 3: Hockey Stick Down (Problem)

    ●
        ●
              ●
                    ●
                         ●
  • Never flattens
  • Indicates: Leaky bucket, no core value

Pattern 4: Cliff (Activation Problem)

    ●
    
    
            ●──●──●──●
  • Huge D1 drop, then stable
  • Indicates: Onboarding failure, but core product works

Benchmark Retention Curves

Consumer Apps:

Day Top 10% Median Bottom 25%
D1 40%+ 25% <15%
D7 25%+ 12% <7%
D30 15%+ 6% <3%

B2B SaaS:

Week Top Quartile Median Bottom Quartile
W1 70%+ 50% <35%
W4 55%+ 35% <20%
W12 45%+ 25% <15%

SQL Templates

Basic Cohort Retention Table

-- Weekly cohort retention
WITH cohorts AS (
  SELECT 
    user_id,
    DATE_TRUNC('week', signup_date) as cohort_week,
    signup_date
  FROM users
  WHERE signup_date >= '2024-01-01'
),
activity AS (
  SELECT 
    user_id,
    DATE_TRUNC('week', activity_date) as activity_week
  FROM user_activity
  GROUP BY user_id, DATE_TRUNC('week', activity_date)
)

SELECT 
  c.cohort_week,
  COUNT(DISTINCT c.user_id) as cohort_size,
  COUNT(DISTINCT CASE WHEN DATEDIFF('week', c.cohort_week, a.activity_week) = 0 THEN c.user_id END) as week_0,
  COUNT(DISTINCT CASE WHEN DATEDIFF('week', c.cohort_week, a.activity_week) = 1 THEN c.user_id END) as week_1,
  COUNT(DISTINCT CASE WHEN DATEDIFF('week', c.cohort_week, a.activity_week) = 2 THEN c.user_id END) as week_2,
  COUNT(DISTINCT CASE WHEN DATEDIFF('week', c.cohort_week, a.activity_week) = 3 THEN c.user_id END) as week_3,
  COUNT(DISTINCT CASE WHEN DATEDIFF('week', c.cohort_week, a.activity_week) = 4 THEN c.user_id END) as week_4
FROM cohorts c
LEFT JOIN activity a ON c.user_id = a.user_id
GROUP BY c.cohort_week
ORDER BY c.cohort_week;

Retention Percentages

-- Convert to percentages
WITH cohort_data AS (
  -- [previous query as CTE]
)

SELECT 
  cohort_week,
  cohort_size,
  ROUND(week_0 * 100.0 / cohort_size, 1) as week_0_pct,
  ROUND(week_1 * 100.0 / cohort_size, 1) as week_1_pct,
  ROUND(week_2 * 100.0 / cohort_size, 1) as week_2_pct,
  ROUND(week_3 * 100.0 / cohort_size, 1) as week_3_pct,
  ROUND(week_4 * 100.0 / cohort_size, 1) as week_4_pct
FROM cohort_data;

N-Day Retention

-- D1, D7, D30 retention
WITH users_with_activity AS (
  SELECT 
    u.user_id,
    u.signup_date,
    MIN(a.activity_date) as first_activity,
    MAX(CASE WHEN a.activity_date = u.signup_date + INTERVAL '1 day' THEN 1 ELSE 0 END) as active_d1,
    MAX(CASE WHEN a.activity_date = u.signup_date + INTERVAL '7 days' THEN 1 ELSE 0 END) as active_d7,
    MAX(CASE WHEN a.activity_date = u.signup_date + INTERVAL '30 days' THEN 1 ELSE 0 END) as active_d30
  FROM users u
  LEFT JOIN user_activity a ON u.user_id = a.user_id
  WHERE u.signup_date BETWEEN '2024-01-01' AND '2024-01-31'
  GROUP BY u.user_id, u.signup_date
)

SELECT 
  COUNT(*) as total_users,
  ROUND(AVG(active_d1) * 100, 1) as d1_retention,
  ROUND(AVG(active_d7) * 100, 1) as d7_retention,
  ROUND(AVG(active_d30) * 100, 1) as d30_retention
FROM users_with_activity;

Behavioral Cohort Comparison

-- Compare retention by acquisition source
WITH cohorts AS (
  SELECT 
    u.user_id,
    u.signup_date,
    u.acquisition_source,
    DATE_TRUNC('week', u.signup_date) as cohort_week
  FROM users u
  WHERE u.signup_date >= '2024-01-01'
),
weekly_activity AS (
  SELECT user_id, DATE_TRUNC('week', activity_date) as active_week
  FROM user_activity
  GROUP BY user_id, DATE_TRUNC('week', activity_date)
)

SELECT 
  c.acquisition_source,
  COUNT(DISTINCT c.user_id) as cohort_size,
  ROUND(COUNT(DISTINCT CASE WHEN w.active_week = c.cohort_week + INTERVAL '1 week' THEN c.user_id END) * 100.0 / 
        COUNT(DISTINCT c.user_id), 1) as week_1_retention,
  ROUND(COUNT(DISTINCT CASE WHEN w.active_week = c.cohort_week + INTERVAL '4 weeks' THEN c.user_id END) * 100.0 / 
        COUNT(DISTINCT c.user_id), 1) as week_4_retention
FROM cohorts c
LEFT JOIN weekly_activity w ON c.user_id = w.user_id
GROUP BY c.acquisition_source
ORDER BY week_4_retention DESC;

Churn Analysis

-- Identify churned users and tenure at churn
WITH user_activity_summary AS (
  SELECT 
    user_id,
    MIN(activity_date) as first_activity,
    MAX(activity_date) as last_activity
  FROM user_activity
  GROUP BY user_id
),
churned_users AS (
  SELECT 
    u.user_id,
    u.signup_date,
    a.last_activity,
    DATEDIFF('day', u.signup_date, a.last_activity) as tenure_days,
    CASE 
      WHEN a.last_activity < CURRENT_DATE - INTERVAL '30 days' THEN 'Churned'
      ELSE 'Active'
    END as status
  FROM users u
  JOIN user_activity_summary a ON u.user_id = a.user_id
)

SELECT 
  CASE 
    WHEN tenure_days <= 7 THEN '0-7 days'
    WHEN tenure_days <= 30 THEN '8-30 days'
    WHEN tenure_days <= 90 THEN '31-90 days'
    ELSE '90+ days'
  END as tenure_bucket,
  COUNT(*) as users,
  SUM(CASE WHEN status = 'Churned' THEN 1 ELSE 0 END) as churned,
  ROUND(SUM(CASE WHEN status = 'Churned' THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 1) as churn_rate
FROM churned_users
GROUP BY 1
ORDER BY 1;

Active User Calculations

-- DAU, WAU, MAU and ratios
WITH daily_active AS (
  SELECT activity_date, COUNT(DISTINCT user_id) as dau
  FROM user_activity
  WHERE activity_date >= CURRENT_DATE - INTERVAL '30 days'
  GROUP BY activity_date
),
weekly_active AS (
  SELECT COUNT(DISTINCT user_id) as wau
  FROM user_activity
  WHERE activity_date >= CURRENT_DATE - INTERVAL '7 days'
),
monthly_active AS (
  SELECT COUNT(DISTINCT user_id) as mau
  FROM user_activity
  WHERE activity_date >= CURRENT_DATE - INTERVAL '30 days'
)

SELECT 
  ROUND(AVG(d.dau), 0) as avg_dau,
  w.wau,
  m.mau,
  ROUND(AVG(d.dau) * 100.0 / m.mau, 1) as dau_mau_ratio,
  ROUND(w.wau * 100.0 / m.mau, 1) as wau_mau_ratio
FROM daily_active d
CROSS JOIN weekly_active w
CROSS JOIN monthly_active m
GROUP BY w.wau, m.mau;

Benchmarks by Business Model

Consumer Social/Communication

Metric Good Great Best-in-Class
D1 Retention 25% 40% 60%+ (WhatsApp)
D7 Retention 15% 25% 40%+
D30 Retention 8% 15% 25%+
DAU/MAU 20% 40% 60%+

Consumer Subscription (Streaming, News)

Metric Good Great Best-in-Class
M1 Retention 70% 80% 90%+
M12 Retention 40% 55% 70%+
Monthly Churn 8% 5% <3%

B2B SaaS

Metric Good Great Best-in-Class
W1 Retention 50% 65% 80%+
M3 Retention 35% 50% 65%+
Annual NRR 100% 115% 130%+
Logo Churn 5% 3% <2%

E-commerce/Marketplace

Metric Good Great Best-in-Class
90-day Repeat Rate 20% 35% 50%+
Annual Repeat Rate 30% 45% 60%+
Orders per Customer/Year 1.5 2.5 4+

Mobile Gaming

Metric Good Great Best-in-Class
D1 Retention 35% 45% 55%+
D7 Retention 15% 20% 30%+
D30 Retention 5% 10% 15%+

Churn Prediction Signals

Behavioral Signals

Signal What It Predicts Action
Login frequency declining Disengagement Re-engagement campaign
Feature usage narrowing Not finding value Product education
Support tickets increasing Frustration Proactive outreach
Payment failures Involuntary churn Dunning emails
Reduced team activity Account at risk CSM intervention

Building a Churn Model

Input Features (examples):

  • Days since last login
  • Logins in last 7/30 days (trend)
  • Features used (breadth)
  • Core actions per session (depth)
  • Support tickets filed
  • Time to first value
  • Contract type / plan

Output: Probability of churn in next 30/60/90 days

Actions by Risk Score:

Risk Score Segment Intervention
>80% Critical CSM call, discount offer
50-80% High Email sequence, in-app nudges
20-50% Medium Automated education
<20% Low Standard experience

Cohort Analysis Spreadsheet Structure

Sheet 1: Raw Cohort Table

Cohort Size Week 0 Week 1 Week 2 Week 3 Week 4
Jan 1 500 500 200 150 125 110
Jan 8 480 480 210 165 140 125
Jan 15 520 520 240 190 160 —

Sheet 2: Percentage Table

Cohort Size Week 0 Week 1 Week 2 Week 3 Week 4
Jan 1 500 100% 40% 30% 25% 22%
Jan 8 480 100% 44% 34% 29% 26%
Jan 15 520 100% 46% 37% 31% —

Sheet 3: Retention Curve Chart

Line chart with:

  • X-axis: Week number (0, 1, 2, 3, 4...)
  • Y-axis: Retention % (0-100%)
  • Each cohort as separate line
  • Overall average as bold line

Sheet 4: Summary Metrics

Metric Current Prior Period Trend
Avg W1 Retention 43% 40% ↑
Avg W4 Retention 24% 22% ↑
Best Cohort Jan 15
Worst Cohort Jan 1

Conditional Formatting

Apply color scale to percentage table:

  • Green: Above average retention
  • Yellow: Average
  • Red: Below average retention

This makes patterns immediately visible:

  • Rows: Which cohorts retain better?
  • Columns: Where's the biggest drop?
  • Diagonals: External events affecting everyone?

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    The growth-analytics skill is a business-focused instructional guide providing frameworks, templates, and SQL snippets for startup metrics. It helps founders design A/B tests, build dashboards, and analyze retention. No malicious behaviors or security vulnerabilities were found.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at cea4ddf. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago

README badge

README badge for samuelcastro/startup-skills/growth-analytics