Cohort Analysis
Python-based cohort analysis that builds retention matrices, churn rates, and revenue and LTV views by signup month.
- CCM score
- 40 of 100
- skills.sh installs
- 438
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers retention and churn tracking, revenue per user, and lifetime value calculations across signup-month cohorts
- Includes runnable pandas and seaborn code that generates heatmaps, retention curves, and an average retention band
- Models retention from a simulated user dataset, so real event data must replace the sample generator before use
- Designed for analysts who want reusable retention and LTV code for customer lifecycle reviews
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill 'Cohort Analysis' -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Cohort Analysis
Overview
Cohort analysis tracks groups of users with shared characteristics over time, revealing patterns in retention, engagement, and lifetime value.
When to Use
- Measuring user retention rates and identifying when users churn
- Analyzing customer lifetime value (LTV) and payback periods
- Comparing performance across different user acquisition channels or campaigns
- Understanding how product changes affect different user groups over time
- Tracking engagement patterns and identifying early warning signs of churn
- Evaluating the long-term impact of onboarding improvements or feature releases
Core Concepts
- Cohort: Group of users sharing a characteristic (signup date, region, etc.)
- Cohort Size: Initial group size
- Retention Rate: Percentage remaining active
- Churn Rate: Percentage who left
- Retention Curve: How cohort degrades over time
Cohort Types
- Acquisition Date: Users grouped by signup period
- Behavioral: Users grouped by actions taken
- Revenue: Users grouped by purchase value
- Geographic: Users grouped by location
- Demographic: Users grouped by characteristics
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Data Science & Analytics, Finance & Trading
- First seen
- Jun 3, 2026
Questions
What does the Cohort Analysis skill do?
Cohort Analysis tracks groups of users who share a trait, such as signup date, over time. It calculates retention rates, churn rates and lifetime value, and identifies behavioral patterns for customer lifecycle analysis.
When should I use the Cohort Analysis skill?
Use Cohort Analysis to measure user retention and find when users churn, to analyze customer lifetime value and payback periods, or to compare acquisition channels and campaigns. It also helps judge whether onboarding improvements or feature releases affect groups of users over the long term.
How do I install the Cohort Analysis skill?
Run npx -y skills add aj-geddes/useful-ai-prompts --skill 'Cohort Analysis' -y inside a project. Once installed, the Cohort Analysis skill lets the agent build retention matrices, retention curves and revenue cohort heatmaps in Python with pandas, numpy, matplotlib and seaborn.
Which tools does the Cohort Analysis skill need?
The Cohort Analysis skill's examples run in Python and rely on pandas, numpy, matplotlib and seaborn. Its sample code generates synthetic user data, so you can try the retention workflow without a live user database.
Where does Cohort Analysis fit among other Data Science & Analytics skills?
Cohort Analysis is listed in the Data Science & Analytics category on Claude Marketplaces, next to azure-kusto, analyze-project, run-train, explore-run and add-analytics-instrumentation. It focuses on retention and lifetime value across groups of users rather than general data querying.
More from aj-geddes/useful-ai-prompts
All 258- Intermittent Issue Debugging437
- Recommendation Engine437
- Mocking Stubbing435
- Server Side Rendering435
- Data Migration Scripts433
- Correlation Tracing431
- Dimensionality Reduction431
- Synthetic Monitoring430
- Canary Deployment429
- Model Monitoring429
- Model Deployment428
- Service Mesh Implementation428
- Data Replication Setup427
- Polyglot Integration427
- Azure Functions426
- Graphql Implementation426
- Multi Cloud Strategy421
- Distributed Tracing420
- Nodejs Express Server3.3K
- Code Review Analysis2.4K
- Jenkins Pipeline2.2K
- Rest Api Design2.1K
- Architecture Diagrams2K
- Ansible Automation1.9K
Similar to Cohort Analysis
More Data Science & AnalyticsFunnel AnalysisSkillaj-geddes/useful-ai-prompts704 installsPython-based funnel analysis that tracks user drop-off by stage and charts conversion rates across segments.
retention-engagementSkillrefoundai/lenny-skills2.4K installsRetention-focused guide that pairs survival-curve measurement with habit mechanics like streaks and mounting value.
pm-analyticsPluginmohitagw15856/pm-claude-skills1.6K starsData & metrics skills: Data Analysis Standard, Retention Analysis, Product Health Analysis. Structure metric deep-dives, funnel analysis, cohort studies and chu
Survival AnalysisSkillaj-geddes/useful-ai-prompts454 installsPython survival analysis with Kaplan-Meier curves, log-rank tests, and Cox proportional hazards models on censored data.
saas-metricsSkillclaude-office-skills/skills5.2K installsCatalog-ready SaaS metrics analysis covering MRR, churn, cohorts, unit economics, and investor reporting.
product-analyticsSkillalirezarezvani/claude-skills727 installsStructured metric framework and retention analysis guide for defining, tracking, and interpreting product KPIs across product stages.