Agent skill

Bi Cohort Analysis

by agentscope-ai in agentscope-ai/QwenPaw-Data

把用户按同一批/同一类分组,比较各群体后续表现。触发条件:对话涉及同期群分析、分群后表现对比、用户生命周期分群跟踪等任务时触发,如出现「同期群」「cohort」「按起始特征分群后表现如何」「不同客群后续转化/留存对比」「注册周/获客渠道分群跟踪」等相似问题时触发。

Apache-2.0Auto-check passedData & Analytics

Install Bi Cohort Analysis

skills CLI
$ npx skills add agentscope-ai/QwenPaw-Data --skill bi-cohort-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agentscope-ai/QwenPaw-Data bi-cohort-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agentscope-ai/QwenPaw-Data.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/qwenpaw-data-skills/skills/workflows/bi-cohort-analysis .claude/skills/bi-cohort-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bi-cohort-analysis
GitHub stars
127
Token cost
~871 tokens
SKILL.md length
296 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

把用户按同一批/同一类分组,比较各群体后续表现。触发条件:对话涉及同期群分析、分群后表现对比、用户生命周期分群跟踪等任务时触发,如出现「同期群」「cohort」「按起始特征分群后表现如何」「不同客群后续转化/留存对比」「注册周/获客渠道分群跟踪」等相似问题时触发。

  • Works in 6 steps: 定义 cohort 规则 → 取数 → 划分 cohort → …
  • Tasks that involve Product analytics
  • SKILL.md covers 前置条件, 分析原则, 1. 定义 cohort 规则 and 2. 取数, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Bi Cohort Analysis is an agent skill from agentscope-ai/QwenPaw-Data. 把用户按同一批/同一类分组,比较各群体后续表现。触发条件:对话涉及同期群分析、分群后表现对比、用户生命周期分群跟踪等任务时触发,如出现「同期群」「cohort」「按起始特征分群后表现如何」「不同客群后续转化/留存对比」「注册周/获客渠道分群跟踪」等相似问题时触发。

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Product analytics. The repository describes itself as: Agentic enterprise data analytics: governed facts (DataBridge), reusable methodology (Skill-Hub), and controllable execution (Host). The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Product analytics

Example prompts

  • “/bi-cohort-analysis”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 定义 cohort 规则
  2. 取数
  3. 划分 cohort
  4. 按 cohort 汇总后续表现
  5. 跨 cohort 对比
  6. 解读 & 输出

What it can do on your machine

Read from SKILL.md and the folder at commit e0bae36. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csv).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bi Cohort Analysis loads about 871 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 296 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~871

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from agentscope-ai/QwenPaw-Data at commit e0bae36, republished under its Apache-2.0 licence (© agentscope-ai). 296 words, ~871 tokens.

Download SKILL.mdSave it as .claude/skills/bi-cohort-analysis/SKILL.md (or your agent's skills folder).
name
bi-cohort-analysis
description
把用户按同一批/同一类分组,比较各群体后续表现。触发条件:对话涉及同期群分析、分群后表现对比、用户生命周期分群跟踪等任务时触发,如出现「同期群」「cohort」「按起始特征分群后表现如何」「不同客群后续转化/留存对比」「注册周/获客渠道分群跟踪」等相似问题时触发。

bi-cohort-analysis

把用户按同一批/同一类分组,比较各群体后续表现:定义 cohort 规则 → 取数 → 划分 cohort → 按 cohort 汇总后续表现 → 跨 cohort 对比 → 解读与输出。

前置条件

开始执行前,确认以下信息已就绪:

  • 分析对象明确,通常为「用户」,且能唯一标识(如 user_id)
  • cohort 规则已确定,即按什么分群(如注册周、获客渠道、首单金额档、首日行为等)
  • 跟踪指标已确定,即 cohort 形成后要比较的后续指标(如留存、转化、LTV、复购等)及其时间窗口
  • 数据获取能力可用,能取到对象级起始特征数据及对应后续行为/指标数据

若 cohort 规则或跟踪指标不明确,需先回到规划阶段补充,或向用户确认后再开始执行。

分析原则

同期群定义

同期群(cohort)指在相同时点或具备相同起始特征的用户集合。本 workflow 通过 cohort 规则分群 定义 cohort,再比较各 cohort 在 后续时间窗口 内的指标表现。

主要步骤
步骤用途是否必选
定义 cohort 规则确定分群依据与跟踪指标必选,见步骤 1
取数取用户 ID、起始特征、后续行为/指标必选,见步骤 2
划分 cohort将每个用户分到对应群体必选,见步骤 3
汇总后续表现按 cohort 聚合跟踪指标必选,见步骤 4
跨 cohort 对比对比各群差异、幅度与显著性必选,见步骤 5
解读 & 输出cohort 画像、表现对比、业务建议必选,见步骤 6

典型产出:cohort 矩阵、群间对比表、cohort 留存曲线(多条线对比)等。

最短路径:定义分群规则 → 划 cohort → 跟踪各群指标 → 跨群对比(即步骤 1 → 3 → 4 → 5,取数随分群展开)。

本 workflow 主要提供 cohort 场景下的编排与数据衔接逻辑,各步骤的具体执行按相应分析方法的标准流程进行。


1. 定义 cohort 规则

明确「按什么分群」与「跟踪什么指标」,这是后续取数与划分的基础:

要素含义常见取值
分群依据划分 cohort 所依据的起始特征注册周/注册月、获客渠道、首单金额档、首日关键行为、获客活动等
跟踪指标cohort 形成后要比较的后续指标留存率、转化率、LTV、复购次数等
时间窗口在哪些 dayn 观测跟踪指标D1/D7/D30 留存、30 日内 LTV、首周转化率等

要点:

  • 分群依据可为单一维度(如注册周)或多维特征组合(如消费 + 活跃 + 渠道,优先走聚类,见步骤 3)
  • 对象粒度须为「一行一用户」;若原始数据为事件级,先聚合到用户级
  • 规则一旦确定,后续取数、划分、汇总须保持一致

2. 取数

按步骤 1 的规则取数,准备划分 cohort 与汇总后续表现所需的数据。

数据准备

整理 CSV,包含:

  • 对象标识列(如 user_id)
  • 起始特征列:用于划分 cohort(如注册周、获客渠道、首单金额;多维聚类可有多列数值特征)
  • 后续行为/指标列:用于汇总跟踪指标(如各 dayn 是否留存、是否转化、累计付费金额等)

示例:

csv
user_id,注册周,获客渠道,D7是否留存,30日LTV
u001,2025-W01,自然量,1,128.0
u002,2025-W01,广告,0,0.0

后续指标若来自另一张表,可仅取用户 ID + 起始特征,待步骤 3 划分后再按 user_id 关联后续指标表。


3. 划分 cohort

以步骤 1 的规则为输入,将每个用户分到对应群体。

划分方式
  • 按已有特征分群:以起始特征列(如注册周、获客渠道、首单金额档)为分组键,直接将用户归入对应 cohort
  • 两维策略型分群(如「增长 × 份额」):优先波士顿矩阵法
  • 多维综合分群:优先 K-means / 分层聚类 / DBSCAN

分群结果保存为 JSON,键为 cohort 标识(如 "2025-W01"、"cluster 1"),值为该 cohort 内的用户 ID 列表(供步骤 4 按 user_id 关联)。

产出检查
  • 各 cohort 样本量可解释,无异常空簇(DBSCAN 噪声点单独标注)
  • 分群依据与方法在结论中可复现

4. 按 cohort 汇总后续表现

基于步骤 3 的划分结果,为每个 cohort 汇总跟踪指标:

  1. 将 cohort 划分结果与用户级后续指标按 user_id 关联
  2. 按 cohort 聚合跟踪指标(如 cohort 均值、中位数、率值指标的分子/分母汇总等)
  3. 整理为 对比分析用 CSV:每列对应一个 cohort(或参照 cohort),每行对应一个时间点或汇总口径

示例(三群 D7 留存率对比):

csv
指标,cohort_1,cohort_2,cohort_3
D7留存率,0.42,0.38,0.51

若需绘制 cohort 留存曲线,按 dayn 逐行整理多群留存率(每列一群、每行一个 dayn),供步骤 6 多线对比。若需与总体或某一基准 cohort 对比,在 CSV 中一并纳入参照列。


5. 跨 cohort 对比

对步骤 4 整理的数据执行对比分析,判断哪个群体最好/最差、差异幅度与显著性。

分析要点
  • 比较维度:通常为 空间对比(横向比较不同 cohort 之间差异)
  • 基准设定:明确参照 cohort(如总体、最大群、或业务指定的对照群)
  • 计算方式:按指标类型选择绝对差值或相对差值;多 cohort 间不遗漏任一对比对
  • 显著性(可选):样本为多个用户或多次观测时,按显著性检验规则执行 t / z / 卡方检验

保存对比分析结果。


6. 解读 & 输出

完成以上步骤后,围绕各群体后续表现差异汇总并输出。

字段说明
执行内容本步骤做了什么
取数文件起始特征数据、后续表现数据路径
中间产物分群 JSON、对比用 CSV 路径
计算结果对比分析结果路径
结论各 cohort 的起始画像、后续表现差异及显著性

汇总结构建议:

  1. Cohort 划分:分群规则、起始特征、各群规模与占比(含 cohort 矩阵)
  2. 起始画像:各 cohort 在起始特征上的差异(辅助解读分群合理性)
  3. 后续表现对比:各 cohort 在跟踪指标上的水平、差异幅度与显著性(含 群间对比表 与 cohort 留存曲线)
  4. 业务解读:表现最优/最劣 cohort 的可能原因与可执行建议
  5. 局限与不确定性:样本量、时间窗口、特征选择、分群稳定性等

© agentscope-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/qwenpaw-data-skills/skills/workflows/bi-cohort-analysis of agentscope-ai/QwenPaw-Data.

Open the folder on GitHubat commit e0bae36

Compare with similar skills

Bi Cohort Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bi Cohort Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bi Cohort Analysis this skillagentscope-ai/QwenPaw-Data127—~871Automated safety check: PassApache-2.0
PostHog CLI Queriesdebugtheworldbot/keyStats1.5k—~1.2kAutomated safety check: PassMIT
Retentioneering Contributingretentioneering/retentioneering-tools927—~1.8kAutomated safety check: PassApache-2.0
Retentioneering Product Analyticsretentioneering/retentioneering-tools927—~1.6kAutomated safety check: PassApache-2.0
Feature Analytics Instrumentation Plannermistralai/mistral-vibe5.1k—~2.2kAutomated safety check: PassApache-2.0
Funnel Analysisliangdabiao/claude-data-analysis-ultra-main2901 repos~781Automated safety check: NotesNone

Similar skills

  • PostHog CLI Queries

    debugtheworldbot/keyStats

    Runs HogQL queries against this project's PostHog data from the terminal using posthog-cli, with bundled scripts for dashboard metadata the CLI itself has no command for.

    1.5k GitHub stars~1.2k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed
  • Retentioneering Contributing

    retentioneering/retentioneering-tools

    Help the user turn their Retentioneering ideas, friction reports, bug findings, or feature needs into high-quality upstream contributions: from capturing and validating the idea, through minimal…

    927 GitHub stars~1.8k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Retentioneering Product Analytics

    retentioneering/retentioneering-tools

    Analyze event logs, clickstreams, user paths, product funnels, retention, behavioral segments, transition graphs, step matrices, sequence patterns, and customer journeys using Retentioneering.

    927 GitHub stars~1.6k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Official

    Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.

    5.1k GitHub stars~2.2k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Funnel Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user conversion funnels, calculate step-by-step conversion rates, create interactive visualizations, and identify optimization opportunities.

    290 GitHub starsUsed in 1 repo~781 tokens
    Data & AnalyticsAuto-check: notes
  • Event Tracking

    linuxfoundation/insights

    Add event tracking calls to Vue/Nuxt components in the Insights app using the useTrackEvent composable.

    282 GitHub stars~1.9k tokensUpdated 10 days ago
    Data & AnalyticsAuto-check passed

More from agentscope-ai/QwenPaw-Data

All 29 skills in this repo
  • Bi Report Generation

    agentscope-ai/QwenPaw-Data

    将 BI 数据分析结果组织成可视化 HTML 报告。当分析完成、需要生成报告时调用. An agent skill from agentscope-ai/QwenPaw-Data.

    127 GitHub stars~1.2k tokensUpdated 6 days ago
    Auto-check passed
  • Fetch Data

    agentscope-ai/QwenPaw-Data

    取数 / 查数据 / 拉数据 / 跑 SQL。把自然语言取数需求转为 SQL,经数据湖仓执行后返回查询结果供下游分析。任何需要业务数据的任务在工作区缺少对应文件时都必须先调用此技能——覆盖 BI 业务分析、留存 / 转化 / 同期群分析、数据探索 EDA、统计建模、定量计算、元数据查询、数据查询。命中任一即触发:(1) 直接索要指标或记录,如「DAU 多少」「上月销售额」「3…

    127 GitHub stars~2.5k tokensUpdated 6 days ago
    Auto-check passed
  • Bi Adaptive Threshold

    agentscope-ai/QwenPaw-Data

    通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

    127 GitHub stars~726 tokensUpdated 6 days ago
    Auto-check passed
  • Bi Anomaly Detection

    agentscope-ai/QwenPaw-Data

    基于阈值检测时间序列中的显著异常波动点。当需要找出指标异常波动日期、识别数据异动时调用. An agent skill from agentscope-ai/QwenPaw-Data.

    127 GitHub stars~637 tokensUpdated 6 days ago
    Auto-check passed
  • Bi Attribution Analysis

    agentscope-ai/QwenPaw-Data

    计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

    127 GitHub stars~1.2k tokensUpdated 6 days ago
    Auto-check passed
  • Bi Causal Attribution

    agentscope-ai/QwenPaw-Data

    从运营周报、活动文档、对话输入或文档工具 API 中提取业务事件,与指标异常时间窗口对齐,生成有证据支撑的因果归因假设并排序。当已知指标存在异常波动、需要从外部文档证据中解释"为什么"时调用。

    127 GitHub stars~1.3k tokensUpdated 6 days ago
    Auto-check passed

Questions about Bi Cohort Analysis

What does Bi Cohort Analysis do?

把用户按同一批/同一类分组,比较各群体后续表现。触发条件:对话涉及同期群分析、分群后表现对比、用户生命周期分群跟踪等任务时触发,如出现「同期群」「cohort」「按起始特征分群后表现如何」「不同客群后续转化/留存对比」「注册周/获客渠道分群跟踪」等相似问题时触发。. Bi Cohort Analysis is an agent skill from agentscope-ai/QwenPaw-Data.

When should I use Bi Cohort Analysis?

Bi Cohort Analysis fits situations like: tasks that involve Product analytics.

How do I install Bi Cohort Analysis in Claude Code?

Run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-cohort-analysis -a claude-code`. Or copy the skill folder (packages/qwenpaw-data-skills/skills/workflows/bi-cohort-analysis in agentscope-ai/QwenPaw-Data) into .claude/skills/bi-cohort-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Bi Cohort Analysis in Codex?

Run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-cohort-analysis -a codex`. Or copy the skill folder (packages/qwenpaw-data-skills/skills/workflows/bi-cohort-analysis in agentscope-ai/QwenPaw-Data) into .agents/skills/bi-cohort-analysis in your project. Codex loads it when a task matches its description.

Can I use Bi Cohort Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agentscope-ai/QwenPaw-Data --skill bi-cohort-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bi-cohort-analysis, .gemini/skills/bi-cohort-analysis, .github/skills/bi-cohort-analysis and .opencode/skills/bi-cohort-analysis in your project.

What does Bi Cohort Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Bi Cohort Analysis is instructions for the agent only.

Does Bi Cohort Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bi Cohort Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bi Cohort Analysis use?

Bi Cohort Analysis is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bi Cohort Analysis use?

About 871 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bi Cohort Analysis?

Skills that share tags, products or a category with Bi Cohort Analysis: PostHog CLI Queries (debugtheworldbot/keyStats, 1.5k stars), Retentioneering Contributing (retentioneering/retentioneering-tools, 927 stars), Retentioneering Product Analytics (retentioneering/retentioneering-tools, 927 stars) and Feature Analytics Instrumentation Planner (mistralai/mistral-vibe, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bi Cohort Analysis?

agentscope-ai (a GitHub organization) maintains it in agentscope-ai/QwenPaw-Data, which has 127 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 5, 2026.

Source: agentscope-ai/QwenPaw-Data on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.