方法与优势
Python 计算器让输入与计算可检查,并配合 AARRR、北极星和 HEART 指引。
定义产品指标,并从 CSV 计算留存、同期群表和漏斗人数。
定义产品指标,并从 CSV 计算留存、同期群表和漏斗人数。Python 计算器让输入与计算可检查,并配合 AARRR、北极星和 HEART 指引。
Python 计算器让输入与计算可检查,并配合 AARRR、北极星和 HEART 指引。
为电商功能定义产品指标树;根据清洗后导出比较已成熟留存同期群;检查阶段人数并单独校验漏斗顺序。
一致的用户 ID、同期群日期、活动日期或阶段标签、指标定义和观察窗口。
使用支持 Skill 且能访问文件的 Agent。随包 Python 辅助工具需要 Python 3;提供数据前先查看样例结构。
留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。
仓库安装器会把此 Skill 的完整目录复制到 Codex skills 目录。需具备 Git 及安装器要求的 shell/Python 环境。
git clone https://github.com/alirezarezvani/claude-skills.git
cd claude-skills
git checkout 6d2f02ea077eead1bee5411a31bcc6db5a11a70c
./scripts/codex-install.sh --skill product-analytics以下为已核对版本未经改写的 SKILL.md。安装完整包才能保留引用的脚本、素材和指引。下方启动提示词为 EcomAgentTools 编写的示例。
2026 年 10 月 25 日核对源码及随包文件:GitHub 6d2f02ea077e。本次为静态审查,不代表已完成安装运行或业务效果测试。
MIT License Copyright (c) 2025 Alireza Rezvani Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
name: product-analytics
description: Use when defining product KPIs, building metric dashboards, running cohort or retention analysis, or interpreting feature adoption trends across product stages.
---
# Product Analytics
Define, track, and interpret product metrics across discovery, growth, and mature product stages.
## When To Use
Use this skill for:
- Metric framework selection (AARRR, North Star, HEART)
- KPI definition by product stage (pre-PMF, growth, mature)
- Dashboard design and metric hierarchy
- Cohort and retention analysis
- Feature adoption and funnel interpretation
## Workflow
1. Select metric framework
- AARRR for growth loops and funnel visibility
- North Star for cross-functional strategic alignment
- HEART for UX quality and user experience measurement
2. Define stage-appropriate KPIs
- Pre-PMF: activation, early retention, qualitative success
- Growth: acquisition efficiency, expansion, conversion velocity
- Mature: retention depth, revenue quality, operational efficiency
3. Design dashboard layers
- Executive layer: 5-7 directional metrics
- Product health layer: acquisition, activation, retention, engagement
- Feature layer: adoption, depth, repeat usage, outcome correlation
4. Run cohort + retention analysis
- Segment by signup cohort or feature exposure cohort
- Compare retention curves, not single-point snapshots
- Identify inflection points around onboarding and first value moment
5. Interpret and act
- Connect metric movement to product changes and release timeline
- Distinguish signal from noise using period-over-period context
- Propose one clear product action per major metric risk/opportunity
## KPI Guidance By Stage
### Pre-PMF
- Activation rate
- Week-1 retention
- Time-to-first-value
- Problem-solution fit interview score
### Growth
- Funnel conversion by stage
- Monthly retained users
- Feature adoption among new cohorts
- Expansion / upsell proxy metrics
### Mature
- Net revenue retention aligned product metrics
- Power-user share and depth of use
- Churn risk indicators by segment
- Reliability and support-deflection product metrics
## Dashboard Design Principles
- Show trends, not isolated point estimates.
- Keep one owner per KPI.
- Pair each KPI with target, threshold, and decision rule.
- Use cohort and segment filters by default.
- Prefer comparable time windows (weekly vs weekly, monthly vs monthly).
See:
- `references/metrics-frameworks.md`
- `references/dashboard-templates.md`
## Cohort Analysis Method
1. Define cohort anchor event (signup, activation, first purchase).
2. Define retained behavior (active day, key action, repeat session).
3. Build retention matrix by cohort week/month and age period.
4. Compare curve shape across cohorts.
5. Flag early drop points and investigate journey friction.
## Retention Curve Interpretation
- Sharp early drop, low plateau: onboarding mismatch or weak initial value.
- Moderate drop, stable plateau: healthy core audience with predictable churn.
- Flattening at low level: product used occasionally, revisit value metric.
- Improving newer cohorts: onboarding or positioning improvements are working.
## Anti-Patterns
| Anti-pattern | Fix |
|---|---|
| **Vanity metrics** — tracking pageviews or total signups without activation context | Always pair acquisition metrics with activation rate and retention |
| **Single-point retention** — reporting "30-day retention is 20%" | Compare retention curves across cohorts, not isolated snapshots |
| **Dashboard overload** — 30+ metrics on one screen | Executive layer: 5-7 metrics. Feature layer: per-feature only |
| **No decision rule** — tracking a KPI with no threshold or action plan | Every KPI needs: target, threshold, owner, and "if below X, then Y" |
| **Averaging across segments** — reporting blended metrics that hide segment differences | Always segment by cohort, plan tier, channel, or geography |
| **Ignoring seasonality** — comparing this week to last week without adjusting | Use period-over-period with same-period-last-year context |
## Tooling
### `scripts/metrics_calculator.py`
CLI utility for retention, cohort, and funnel analysis from CSV data. Supports text and JSON output.
```bash
# Retention analysis
python3 scripts/metrics_calculator.py retention events.csv
python3 scripts/metrics_calculator.py retention events.csv --format json
# Cohort matrix
python3 scripts/metrics_calculator.py cohort events.csv --cohort-grain month
python3 scripts/metrics_calculator.py cohort events.csv --cohort-grain week --format json
# Funnel conversion
python3 scripts/metrics_calculator.py funnel funnel.csv --stages visit,signup,activate,pay
python3 scripts/metrics_calculator.py funnel funnel.csv --stages visit,signup,activate,pay --format json
```
**CSV format for retention/cohort:**
```csv
user_id,cohort_date,activity_date
u001,2026-01-01,2026-01-01
u001,2026-01-01,2026-01-03
u002,2026-01-02,2026-01-02
```
**CSV format for funnel:**
```csv
user_id,stage
u001,visit
u001,signup
u001,activate
u002,visit
u002,signup
```
## Cross-References
- Related: `product-team/experiment-designer` — for A/B test planning after identifying metric opportunities
- Related: `product-team/product-manager-toolkit` — for RICE prioritization of metric-driven features
- Related: `product-team/product-discovery` — for assumption mapping when metrics reveal unknowns
- Related: `finance/saas-metrics-coach` — for SaaS-specific metrics (ARR, MRR, churn, LTV)
以下是主要功能的用例提示词,可以直接复制使用。
为电商功能定义产品指标树 适用于:为电商功能定义产品指标树。请准备:一致的用户 ID、同期群日期、活动日期或阶段标签、指标定义和观察窗口。
请使用已安装的 product-analytics Skill。任务:为电商功能定义产品指标树。输入:[INPUT]。限制:[CONSTRAINTS]。先检查缺失信息,再输出可审查的结果、依据、假设和下一步。留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。[INPUT][CONSTRAINTS]根据清洗后导出比较已成熟留存同期群 适用于:根据清洗后导出比较已成熟留存同期群。请准备:一致的用户 ID、同期群日期、活动日期或阶段标签、指标定义和观察窗口。
请使用已安装的 product-analytics Skill。任务:根据清洗后导出比较已成熟留存同期群。输入:[INPUT]。限制:[CONSTRAINTS]。先检查缺失信息,再输出可审查的结果、依据、假设和下一步。留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。[INPUT][CONSTRAINTS]检查阶段人数并单独校验漏斗顺序 适用于:检查阶段人数并单独校验漏斗顺序。请准备:一致的用户 ID、同期群日期、活动日期或阶段标签、指标定义和观察窗口。
请使用已安装的 product-analytics Skill。任务:检查阶段人数并单独校验漏斗顺序。输入:[INPUT]。限制:[CONSTRAINTS]。先检查缺失信息,再输出可审查的结果、依据、假设和下一步。留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。[INPUT][CONSTRAINTS]留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。
2026 年 10 月 25 日核对源码及随包文件:GitHub 6d2f02ea077e。本次为静态审查,不代表已完成安装运行或业务效果测试。
使用获授权输入,不把密钥贴入提示词。采用前检查面向客户的声明、计算、代码改动及任何拟议的外部操作。
定义产品指标,并从 CSV 计算留存、同期群表和漏斗人数。Python 计算器让输入与计算可检查,并配合 AARRR、北极星和 HEART 指引。
按实际 Agent 选择方式,安装完整包,不要只复制页面中的 SKILL.md。 一致的用户 ID、同期群日期、活动日期或阶段标签、指标定义和观察窗口。 开启新 Agent 会话,明确要求使用 product-analytics。先用小型样本尝试下方一个场景,并检查输出。
为电商功能定义产品指标树;根据清洗后导出比较已成熟留存同期群;检查阶段人数并单独校验漏斗顺序
留存按天偏移计算,需检查同期群是否已充分观察。漏斗只统计各阶段用户,不校验事件顺序或递进关系,因此不是有序事件漏斗。
2026 年 10 月 25 日核对源码及随包文件:GitHub 6d2f02ea077e。本次为静态审查,不代表已完成安装运行或业务效果测试。
2026 年 10 月 25 日核对源码及随包文件:GitHub 6d2f02ea077e。本次为静态审查,不代表已完成安装运行或业务效果测试。
内容核验日期:
暂无评论。