shisuidata/ss-data-skills / skills/retention-cohort-analysis
retention-cohort-analysis
VerifiedUse when analyzing retention, cohort behavior, repeat purchase, active user return, subscription renewal, or user stickiness over time. Builds cohort retention matrices from event data with a bundled zero-dependency script that masks immature cells, keeps curves on a fixed cohort set, compares segments, flags mix-adjusted anomaly cohorts, decomposes cohort-over-cohort change into mix vs retention effects, and renders an HTML report. 中文触发词:留存分析、Cohort、复购、续费、用户流失、次日留存。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.2 KB |
| assets/example_summary.json | config | 1.7 KB |
| references/cli.md | markdown | 2.0 KB |
| references/input-schema.md | markdown | 2.6 KB |
| references/pitfalls.md | markdown | 2.1 KB |
| references/retention-sql.md | markdown | 2.7 KB |
| scripts/retention.py | script | 37.8 KB |
| scripts/sskit_io.py | script | 14.9 KB |
| scripts/sskit_viz.py | script | 36.1 KB |
references/pitfalls.md
View on GitHub# 解读要点
## 先确认口径
| 问题 | 为什么重要 |
| --- | --- |
| 自然日还是滚动 24 小时? | 晚上注册的用户第二天早上打开,自然日算 D1 留存,滚动 24 小时不算。两种口径的 D1 常常差几个百分点 |
| 第 N 天当天,还是 N 天内? | “D7 留存 20%”和“7 日内回访 45%”可能描述的是同一批用户 |
| 回访是什么行为? | 推送到达、后台唤醒、自动续期扣款都不是主动回访 |
| 批次成熟了吗? | 注册 3 天的用户没有 D7,留空,不是 0 |
## 曲线怎么读
- **后段趋平**:有一群用户稳定留下来,产品对他们有长期价值。平台高度是最重要的数字。
- **一路下滑到 0 附近**:还没有找到长期价值,或者拉来的用户不对。
- **后段上升**:通常不是好事,先查是不是曲线在不同周期用了不同批次(脚本已固定批次集合),或者有召回活动。
- 曲线必须基于同一组批次。每个周期各用各的成熟批次,长周期只剩早期批次,曲线形状会被批次构成扭曲。
## 批次变差了,先拆构成
最近批次留存下降,常见两种原因:
| 结构效应大 | 留存效应大 |
| --- | --- |
| 低留存渠道、低价套餐、活动用户占比上升 | 同一渠道、同一套餐的用户也留得更差 |
| 找增长和投放:获客质量问题 | 找产品和运营:体验、版本、服务问题 |
异常批次同理:渠道结构变化会让整段时间的批次都“偏低”,真正的事故批次反而淹没在里面。脚本先按分群构成算出预期留存,再判断批次是否异常。
## 不要做的事
- 用“本周活跃用户里的老用户占比”代替留存。
- 把活动期间注册的批次留存高,写成“产品留存改善了”。活动批次要单独看,并看活动结束后的周期。
- 把首日行为和留存的相关写成因果。“首日完成 3 个动作的用户留存高”可能只是因为高意向用户更愿意完成动作。要验证,就把关键动作前置做实验。
- 只看 D1。D1 反映的是首次体验,长期价值要看曲线后段。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |