Agent skill

Bi Attribution Analysis

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

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

Apache-2.0Auto-check passed

Install Bi Attribution Analysis

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

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

GitHub CLI
$ gh skill install agentscope-ai/QwenPaw-Data bi-attribution-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/atomic/bi-attribution-analysis .claude/skills/bi-attribution-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-attribution-analysis
GitHub stars
124
Token cost
~1.2k tokens
SKILL.md length
105 words
Files
2 (incl. scripts)
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Runs Python scripts from its folder; calls python

What it does

Bi Attribution Analysis is an agent skill from agentscope-ai/QwenPaw-Data. 计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/contribution_calc.py`).

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.

Example prompts

  • “为什么涨/跌”
  • “/bi-attribution-analysis”

Requirements

  • Python 3

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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    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 Attribution Analysis loads about 1.2k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 105 words of instructions outside code blocks.

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

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); the scripts in this folder 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). 105 words, ~1,246 tokens.

Download SKILL.mdSave it as .claude/skills/bi-attribution-analysis/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
bi-attribution-analysis
description
计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

bi-attribution-analysis

计算各维度(组)值对指标变动的贡献度,量化每个维度值对整体变动的贡献大小,常见场景:

  • 维度下拆归因:指标异常后,逐维度下拆定位驱动变化的关键因素
  • 交叉维度归因:多维度组合下拆,定位高贡献的维度组合

适用指标:

  • 维度间可加的量值指标:各维度值可直接求和得到整体值,如访问用户数、GMV、订单量
  • 率值指标:整体值 = 分子总和 / 分母总和,如转化率、留存率
  • 加权平均型指标:整体值由各维度值按权重加权得到。如按渠道拆解客单价(= 各渠道总收入 / 各渠道订单数,各渠道客单价不可直接求和)、按客户群拆解人均收入(= 各群总收入 / 各群用户数)

执行步骤

1:数据准备

包含维度往期/当期指标数据的 CSV 文件,至少包含以下列:

维度间可加的量值指标:

列说明示例
维度列维度名称渠道
往期值列往期指标值销售额_往期
当期值列当期指标值销售额_当期

率值指标额外需包含分子和分母的往期/当期值:

列说明示例
分子_往期往期分子值转化人数_往期
分子_当期当期分子值转化人数_当期
分母_往期往期分母值访问人数_往期
分母_当期当期分母值访问人数_当期

加权平均型指标额外需包含指标的分子(被加权的总量)和分母(权重来源)的往期/当期值,示例同上。

若上游步骤已产出可用数据文件则直接使用,否则自行取数。

2:选择贡献度计算方法

根据指标类型选择计算方法:

维度间可加的量值指标:

方法适用场景
quantity-standard(标准法)默认选择。按维度增量占总增量的比例计算贡献度
quantity-separate(正负分离法)当正负变化相互抵消严重时使用(例如,某方向变动量超过整体变动的 30%),将正贡献和负贡献分别归一化,避免抵消掩盖真实驱动因素

加权平均型指标和率值指标:

方法适用场景
ratio-cross-term(保留交叉项法)默认选择。将变动拆解为三部分:结构效应(权重变化的影响)、水平效应(指标值本身变化的影响)和交互效应(两者同时变化产生的交叉影响)
ratio-average(平均权重法)当不需要区分交互效应、希望结果更简洁时使用。用往期和当期的平均权重消除交互项,只输出结构效应和水平效应两项
3:执行贡献度计算

按以下优先级选择计算方式,命中即停:

方式一:使用脚本

路径:scripts/contribution_calc.py

原理:按上述方法计算各维度值的贡献度。支持传入多个维度列进行交叉分析。

若脚本适用于当前场景,按以下方式调用:

参数:

参数说明
--input-file输入数据文件路径(必填)
--dimension维度列名,支持多个(必填,如 --dimension 渠道 端类型)
--history-col往期值列名(必填)
--current-col当期值列名(必填)
--method归因方法(必填,见上方方法选择表)
--numerator-history分子往期列名(率值/加权平均指标时必填)
--numerator-current分子当期列名(率值/加权平均指标时必填)
--denominator-history分母往期列名(率值/加权平均指标时必填)
--denominator-current分母当期列名(率值/加权平均指标时必填)
--output-file输出结果文件路径(可选)

调用示例:

bash
# 单维度 - 量值指标标准法
python scripts/contribution_calc.py \
    --input-file data.csv \
    --dimension "渠道" \
    --history-col "销售额_往期" \
    --current-col "销售额_当期" \
    --method quantity-standard \
    --output-file contribution_result.csv

# 多维度交叉 - 量值指标标准法
python scripts/contribution_calc.py \
    --input-file data.csv \
    --dimension "渠道" "端类型" \
    --history-col "销售额_往期" \
    --current-col "销售额_当期" \
    --method quantity-standard \
    --output-file contribution_result.csv

# 率值指标 - 保留交叉项法
python scripts/contribution_calc.py \
    --input-file data.csv \
    --dimension "品类" \
    --history-col "转化率_往期" \
    --current-col "转化率_当期" \
    --numerator-history "转化人数_往期" \
    --numerator-current "转化人数_当期" \
    --denominator-history "访问人数_往期" \
    --denominator-current "访问人数_当期" \
    --method ratio-cross-term \
    --output-file contribution_result.csv

# 加权平均指标 - 按渠道拆客单价
python scripts/contribution_calc.py \
    --input-file data.csv \
    --dimension "渠道" \
    --history-col "客单价_往期" \
    --current-col "客单价_当期" \
    --numerator-history "总收入_往期" \
    --numerator-current "总收入_当期" \
    --denominator-history "订单数_往期" \
    --denominator-current "订单数_当期" \
    --method ratio-cross-term \
    --output-file contribution_result.csv

输出格式:

quantity-standard(标准法):

 渠道  往期值  当期值  增量   贡献度
 华东    100    150   +50    83.3%
 华南     80    100   +20    33.3%
 华北     60     50   -10   -16.7%

ratio-cross-term(保留交叉项法):

 品类  往期率值  当期率值  权重_往期  权重_当期  结构效应  水平效应  交互效应  总贡献
  A类    5.00pt    6.00pt    60.00%    55.00%   -0.25pt   +0.55pt   -0.05pt  +0.25pt
  B类    3.00pt    4.00pt    40.00%    45.00%   +0.15pt   +0.45pt   +0.05pt  +0.65pt
方式二:自行实现

若脚本不适用于当前场景,参考上述原理自行实现贡献度计算。

© 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

SKILL.md and 1 other file (scripts) in packages/qwenpaw-data-skills/skills/atomic/bi-attribution-analysis of agentscope-ai/QwenPaw-Data.

  • SKILL.md
  • scripts/contribution_calc.py

Open the folder on GitHubat commit e0bae36

Compare with similar skills

Bi Attribution 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 Attribution Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bi Attribution Analysis this skillagentscope-ai/QwenPaw-Data124—~1.2kAutomated safety check: PassApache-2.0
AttributionNexus-JPF/note-companion8701 repos~5.2kAutomated safety check: PassMIT
Performance AttributionHKUDS/Vibe-Trading35k—~3.1kAutomated safety check: PassMIT
Direction Attributethedaviddias/Front-End-Checklist74k—~534Automated safety check: PassMIT
Fetchpriority Attributethedaviddias/Front-End-Checklist74k—~535Automated safety check: PassMIT
Lang Attributethedaviddias/Front-End-Checklist74k—~995Automated safety check: PassMIT

Similar skills

  • Attribution

    Nexus-JPF/note-companion

    When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools.

    870 GitHub starsUsed in 1 repo~5.2k tokens
    Marketing & SEOAuto-check passed
  • Performance Attribution

    HKUDS/Vibe-Trading

    Explains why a portfolio beat or lagged its benchmark with Brinson sector attribution, factor alpha and beta decomposition, timing evaluation and benchmark comparison.

    35k GitHub stars~3.1k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Direction Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages.

    74k GitHub stars~534 tokensUpdated 3 days ago
    Auto-check passed
  • Fetchpriority Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when optimising Largest Contentful Paint (LCP), reducing render-blocking resource contention, or fine-tuning resource loading order in the critical rendering path.

    74k GitHub stars~535 tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Lang Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to all HTML documents. An agent skill from thedaviddias/Front-End-Checklist.

    74k GitHub stars~995 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Ads Attribution

    AgriciDaniel/claude-ads

    Audit cross-platform attribution, conversion definitions, reporting windows, GA4, AdServices and AdAttributionKit, MMPs, browser and server events, offline conversions, and platform reconciliation.

    9.8k GitHub stars~499 tokensUpdated 2 days ago
    Marketing & SEOAuto-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.

    124 GitHub stars~1.2k tokensUpdated 4 days ago
    Auto-check passed
  • Fetch Data

    agentscope-ai/QwenPaw-Data

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

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

    agentscope-ai/QwenPaw-Data

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

    124 GitHub stars~726 tokensUpdated 4 days ago
    Auto-check passed
  • Bi Anomaly Detection

    agentscope-ai/QwenPaw-Data

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

    124 GitHub stars~637 tokensUpdated 4 days ago
    Auto-check passed
  • Bi Causal Attribution

    agentscope-ai/QwenPaw-Data

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

    124 GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check passed
  • Bi Clustering

    agentscope-ai/QwenPaw-Data

    对用户、产品等业务对象做分群:用波士顿矩阵法做象限分群,或用分层聚类、K-means、DBSCAN 等聚类技术分群。当需要做客群/产品分群、象限策略、画像或密度型子结构发现时调用。触发条件:当对话中出现“分群”、“分类”、“聚类”、“不同类型”、“不同场景”等体现分群分析词语时触发。

    124 GitHub stars~1.6k tokensUpdated 4 days ago
    Auto-check passed

Questions about Bi Attribution Analysis

What does Bi Attribution Analysis do?

计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。. Bi Attribution Analysis is an agent skill from agentscope-ai/QwenPaw-Data.

How do I install Bi Attribution Analysis in Claude Code?

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

How do I install Bi Attribution Analysis in Codex?

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

Can I use Bi Attribution 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-attribution-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-attribution-analysis, .gemini/skills/bi-attribution-analysis, .github/skills/bi-attribution-analysis and .opencode/skills/bi-attribution-analysis in your project.

What does Bi Attribution Analysis need to run?

Going by SKILL.md and its folder, Bi Attribution Analysis needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Bi Attribution 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 Attribution 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Bi Attribution Analysis use?

Bi Attribution 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 Attribution Analysis use?

About 1.2k tokens (SKILL.md is roughly 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 Attribution Analysis?

Skills that share tags, products or a category with Bi Attribution Analysis: Attribution (Nexus-JPF/note-companion, 870 stars), Performance Attribution (HKUDS/Vibe-Trading, 35k stars), Direction Attribute (thedaviddias/Front-End-Checklist, 74k stars) and Fetchpriority Attribute (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bi Attribution Analysis?

agentscope-ai (a GitHub organization) maintains it in agentscope-ai/QwenPaw-Data, which has 124 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.