Cohort Analysis

by nimrodfisher

skill

Time-based cohort analysis with retention and behavior tracking. Use when analyzing user retention over time, comparing cohort performance, identifying lifecycle patterns, or measuring feature adoption by cohort.

Skill Details

Repository Files

1 file in this skill directory


name: cohort-analysis description: Time-based cohort analysis with retention and behavior tracking. Use when analyzing user retention over time, comparing cohort performance, identifying lifecycle patterns, or measuring feature adoption by cohort.

Cohort Analysis

Quick Start

Analyze how groups of users/customers (cohorts) behave over time, typically measuring retention, revenue, or engagement patterns.

Context Requirements

  1. Dataset: User/customer event data
  2. Cohort Definition: How to group users (by signup month, acquisition channel, etc.)
  3. Retention Metric: What counts as "retained" (login, purchase, usage, etc.)
  4. Time Periods: Analysis granularity (daily, weekly, monthly)

Context Gathering

Initial Questions:

"Let's set up cohort analysis. I need:

  1. What are we analyzing?

    • User retention (returning users)
    • Revenue retention (recurring purchases)
    • Feature adoption (using specific features)
    • Other behavior
  2. How should we define cohorts?

    • By signup date (most common)
    • By acquisition channel
    • By first purchase date
    • By product/plan tier
    • Other dimension
  3. What counts as 'active' or 'retained'? Examples:

    • Logged in at least once
    • Made a purchase
    • Used feature X
    • Spent >10 minutes
  4. What time periods?

    • Daily cohorts (for apps with daily usage)
    • Weekly cohorts
    • Monthly cohorts (most common for SaaS)
    • Quarterly cohorts"

For Dataset:

"I need data with:

  • User ID (to track individuals)
  • Cohort date (e.g., signup_date)
  • Activity dates (e.g., login_date, purchase_date)
  • Cohort attributes (optional: channel, plan, etc.)

Can you provide:

  • File upload (CSV/Excel), OR
  • Database query to fetch this, OR
  • Description of tables and I'll write the query?"

Validation Questions:

"Before I proceed:

  • What minimum cohort size should we analyze? (I recommend >100 users)
  • How many periods should we track? (e.g., 12 months, 8 weeks)
  • Any cohorts to exclude? (e.g., test users, employees)"

Workflow

1. Data Preparation

Related Skills

Attack Tree Construction

Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.

skill

Grafana Dashboards

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

skill

Matplotlib

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

skill

Scientific Visualization

Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.

skill

Seaborn

Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.

skill

Shap

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Query Writing

For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Scientific Visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

skill

Skill Information

Category:Skill
Last Updated:1/11/2026