cohort-analysis
关于
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.
快速安装
Claude Code
推荐npx skills add guia-matthieu/clawfu-skills -a claude-code/plugin add https://github.com/guia-matthieu/clawfu-skillsgit clone https://github.com/guia-matthieu/clawfu-skills.git ~/.claude/skills/cohort-analysis在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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 Does | You Decide |
|---|---|
| Structures analysis frameworks | Metric definitions |
| Identifies patterns in data | Business interpretation |
| Creates visualization templates | Dashboard design |
| Suggests optimization areas | Action priorities |
| Calculates statistical measures | Decision 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
| Cohort | Size | Period 0 | Period 1 | Period 2 | Period 3 |
|---|---|---|---|---|---|
| 2024-01 | 1234 | 100% | 65% | 48% | 42% |
| 2024-02 | 1456 | 100% | 62% | 45% | - |
| 2024-03 | 1321 | 100% | 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
- ab-test-stats - Test retention experiments
- funnel-analyzer - Analyze conversion funnels
Skill Metadata
- Mode: centaur
category: analytics
subcategory: retention
dependencies: [pandas, plotly]
difficulty: intermediate
time_saved: 4+ hours/week
GitHub 仓库
相关推荐技能
executing-plans
设计该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。
requesting-code-review
设计该Skill可在完成任务、实现主要功能或合并代码前自动调度代码审查子代理,确保实现符合需求和计划。它支持通过指定git SHA范围进行精准的代码变更审查,帮助开发者在关键节点及时发现潜在问题。核心原则是"早审查、勤审查",适用于开发流程的各个关键阶段。
connect-mcp-server
设计这个Skill指导开发者如何将MCP服务器连接到Claude Code,支持HTTP、stdio和SSE三种传输协议。它涵盖了从安装配置到认证安全的完整流程,适用于集成GitHub、Notion、数据库等外部服务。当开发者需要添加集成、配置外部工具或提及MCP相关功能时,这个Skill能提供实用的操作指南。
web-cli-teleport
设计该Skill帮助开发者根据任务特性选择Claude Code的Web或CLI界面,并指导如何在两种环境间无缝迁移会话。它能分析任务复杂度、迭代需求等要素,推荐最优工作界面和工作流。关键特性包括会话状态管理、环境切换指导和上下文优化建议。
