Back to Skills

cohort-analysis

guia-matthieu
Updated 2 days ago
3 views
111
20
111
View on GitHub
Designdesign

About

This skill enables cohort-based user retention analysis for measuring customer lifecycle patterns and engagement trends. It helps developers track retention, compare acquisition cohorts, and identify churn risks over time. Use it when analyzing product impact, estimating LTV, or understanding behavioral patterns across different user groups.

Quick Install

Claude Code

Recommended
Primary
npx skills add guia-matthieu/clawfu-skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/guia-matthieu/clawfu-skills
Git CloneAlternative
git clone https://github.com/guia-matthieu/clawfu-skills.git ~/.claude/skills/cohort-analysis

Copy and paste this command in Claude Code to install this skill

Documentation

Cohort Analysis

Analyze retention and behavior patterns by grouping users into cohorts - understand how different customer groups behave over time.

When to Use This Skill

  • Retention tracking - Measure how users stick around over time
  • Acquisition analysis - Compare cohorts from different channels
  • Product changes - Measure impact on user behavior
  • Churn prediction - Identify at-risk cohorts
  • LTV estimation - Project customer lifetime value

What Claude Does vs What You Decide

Claude DoesYou Decide
Structures analysis frameworksMetric definitions
Identifies patterns in dataBusiness interpretation
Creates visualization templatesDashboard design
Suggests optimization areasAction priorities
Calculates statistical measuresDecision thresholds

Dependencies

pip install pandas plotly click

Commands

Retention Analysis

python scripts/main.py retention data.csv --date-col signup --event-col purchase
python scripts/main.py retention data.csv --date-col signup --periods week

Visualize Cohorts

python scripts/main.py visualize cohorts.csv --output retention_chart.html

Export Report

python scripts/main.py report data.csv --date-col signup --event-col active --output report.html

Examples

Example 1: Analyze User Retention

python scripts/main.py retention users.csv --date-col signup_date --event-col last_active

# Output:
# Cohort Retention Analysis
# ──────────────────────────────────
# Cohort     Users    M1     M2     M3     M4
# Jan 2024   1,234    65%    48%    42%    38%
# Feb 2024   1,456    62%    45%    41%    --
# Mar 2024   1,321    68%    52%    --     --
# Apr 2024   1,567    64%    --     --     --
#
# Avg Retention: 65% → 48% → 42% → 38%
# Best Cohort: Mar 2024 (68% M1)

Example 2: Generate Visual Report

python scripts/main.py report transactions.csv \
  --date-col signup \
  --event-col purchase_date \
  --output retention_report.html

# Generates interactive HTML with:
# - Retention heatmap
# - Cohort size chart
# - Trend analysis

Cohort Table Format

CohortSizePeriod 0Period 1Period 2Period 3
2024-011234100%65%48%42%
2024-021456100%62%45%-
2024-031321100%68%--

Skill Boundaries

What This Skill Does Well

  • Structuring data analysis
  • Identifying patterns and trends
  • Creating visualization frameworks
  • Calculating statistical measures

What This Skill Cannot Do

  • Access your actual data
  • Replace statistical expertise
  • Make business decisions
  • Guarantee prediction accuracy

Related Skills

Skill Metadata

  • Mode: centaur
category: analytics
subcategory: retention
dependencies: [pandas, plotly]
difficulty: intermediate
time_saved: 4+ hours/week

GitHub Repository

guia-matthieu/clawfu-skills
Path: skills/analytics/cohort-analysis
0
ai-skillsanthropicclaude-codeclaude-skillsmarketingmcp-server

Related Skills

executing-plans

Design

Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.

View skill

requesting-code-review

Design

This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.

View skill

connect-mcp-server

Design

This skill provides a comprehensive guide for developers to connect MCP servers to Claude Code using HTTP, stdio, or SSE transports. It covers installation, configuration, authentication, and security for integrating external services like GitHub, Notion, and custom APIs. Use it when setting up MCP integrations, configuring external tools, or working with Claude's Model Context Protocol.

View skill

web-cli-teleport

Design

This skill helps developers choose between Claude Code Web and CLI interfaces based on task analysis, then enables seamless session teleportation between these environments. It optimizes workflow by managing session state and context when switching between web, CLI, or mobile. Use it for complex projects requiring different tools at various stages.

View skill