bi-cohort-analysis

bi-cohort-analysis is a skill for Claude Code, Codex from agentscope-ai/QwenPaw-Data. It costs 107 tokens per session (2,177 once invoked), scanned A, original, Apache-2.0.

A cohort analysis workflow that groups users who share a starting point, such as registration week or acquisition channel, and compares what happens to each group later. Cohort analysis is used to study differences in retention, conversion, customer value, or repeat purchases over time.

In plain words
What is it for?
Use it to define user groups, collect their starting characteristics and later activity, calculate group-level results, compare cohorts, and produce tables, retention charts, or written findings.
Why use it?
It provides a structured way to compare user groups instead of mixing everyone into one overall result. It also identifies the starting data, follow-up measures, and time window needed for a valid comparison.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define user groups, collect their starting characteristics and later activity, calculate group-level results, compare cohorts, and produce tables, retention charts, or written findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agentscope-ai/QwenPaw-Data --skill bi-cohort-analysis
Clone the repo
git clone --depth 1 https://github.com/agentscope-ai/QwenPaw-Data

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bi-cohort-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis/github.svg)](https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis)
Your own site
<a href="https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis"><img src="https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bi-cohort-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis"><img src="https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/bi-cohort-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.02177
Opus 5 $0.00053 $0.01089
Sonnet 5 $0.00021 $0.00435
Haiku 4.5 $0.00011 $0.00218

Measured 11d ago against content hash 54d7e7d659d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

bi-cohort-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/qwenpaw-data-skills/skills/workflows/bi-cohort-analysis/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 是否留存、是否转化、累计付费金额等)

示例:

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 关联)。

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 160 lines · 107 tokens per session scan A 54d7e7d659d4

Subscribe to this mod's changes

bi-cohort-analysis is a skill published in the GitHub repository agentscope-ai/QwenPaw-Data (72 stars, last pushed today), licensed Apache-2.0. It adds 107 tokens to every session and 2,177 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

affaan-m/ECC · 35 tokens

mem0-tour

Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

mem0ai/mem0 · 47 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens

pause

Pause Mem0 memory capture on this machine. Use when the user wants to stop memories being recorded, for example for private work or experiments.

mem0ai/mem0 · 30 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens