归因与变化分析(代码驱动) SKILL.md skillA

归因与变化分析(代码驱动) from xiaour/yolo-data is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add xiaour/yolo-data/归因与变化分析(代码驱动)@v1

Pins v1 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
xiaour/yolo-data
Path
skills/attribution-analysis/SKILL.md
Versions recorded
1
Latest version
v1, committed Oct 13, 2026
Size
5,198 bytes
Repository stars
64
License
Apache-2.0

归因、拆解、驱动因素类问题的分析方法指引。平台不内置任何分析算法,分析必须由生成代码基于已锁定快照完成,并按分析结果契约输出可校验的产物。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# 归因与变化分析(代码驱动)

## 立场

**平台不提供归因算法。** 归因、结构拆解、量价分解、驱动因素排序都属于"分析方法",
必须由你生成 Python 代码,在沙箱内基于 `input/` 中已物化的结果快照完成计算。

平台只做三件事,这三件事决定了你的代码要怎么配合:

1. 把本次查询的锁定结果物化成 `input/artifact_N.csv` 与 `.json`,并用 `input/manifest.json` 描述;
2. 校验你写到 `output/analysis.json` 的产物是否满足**分析结果契约**;
3. 对你**自报的断言(claims)**逐条复算——声称成立的等式必须真的成立。

因此:不要指望平台替你算,也不要在回答里凭感觉写"主要原因是 X"。
所有结论必须来自代码算出来的数,并且能被平台的复算验证。

## 规划前审计(PRE_PLAN)

动手写分析代码之前,先确认以下四件事,缺一件就不要硬算:

1. **周期是否可比**:本期与上期必须等长对齐;未完结周期的右边界是否按主题规则截断。
2. **指标是否可加**:只有"总额型"指标才能按维度取值直接相加分解。
   比率、均值、去重计数**不可加**——对它们做加法分解是错的,应当改用加权或结构分解。
3. **维度是否来自已确认口径**:拆解维度必须是主题语义包或字段说明里登记过的字段,不得凭空造维度。
4. **快照是否够用**:现有结果快照里是否已有分解所需的字段与粒度;
   缺字段时应报告能力缺口并说明需要补充什么,不得捏造数据。

## 常用分解方法(写代码时按需选择,不是固定套路)

| 场景 | 方法 | 关键恒等式 |
| --- | --- | --- |
| 总额变化按维度拆 | 加法分解 | Σ各维度变化量 = 总变化量 |
| "谁拉动、谁拖累" | 增长贡献分解 | 各驱动贡献(pp)之和 = 整体增长率 |
| 乘积型指标(金额=量×价) | 乘法分解 | 交互项必须显式归属,不得丢弃或归零 |
| 多层级定位根因 | 层级分解 | 每层子项之和 = 上层变化量 |

要点:

- **交互项**(例如 Δ量×Δ价)是真实存在的变化,必须显式分配给某个因子,
  并在 `notes` 里说明归属策略。悄悄丢掉会让各部分之和对不上总数。
- **比率类指标**不要用加法分解;若要解释比率变化,用加权分解或结构分解,并说明权重来源。
- **正负相抵**时,"占净变化"份额会失真(分母接近 0)。
  此时应改用"占变动总量"的份额口径来回答"谁影响最大"。

## 输出契约(必须遵守)

把结果写到 `output/analysis.json`:

```json
{
  "version": 1,
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add xiaour/yolo-data/归因与变化分析(代码驱动)@sha256:8bb578e5ee5f96b3

The line at the top of this page pins the label v1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_xk4cbsu563juju5m.svg)](https://markdownregistry.com/a/art_xk4cbsu563juju5m)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Oct 13, 2026.

versioncommittedcommitsizeaudit
v1 latest2026-10-13 c8b11f3 5,198 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (5198 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

xiaour/yolo-data · 64 stars · license Apache-2.0 · pushed 2026-11-06 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_xk4cbsu563juju5m
GET https://markdownregistry.com/api/v1/resolve?ref=xiaour/yolo-data/归因与变化分析(代码驱动)
GET https://markdownregistry.com/api/v1/blob/8bb578e5ee5f96b32ec79d2f55e6fecf93a56474dc03188e857598ddc6de2eef

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from xiaour/yolo-data

yolo-query SKILL.md skill
xiaour/yolo-data · mcp-connector/skills/yolo-query/SKILL.md · 通过 YOLO Data 的 MCP 服务查询主题指标与数据集。当用户想「查询某主题下的指标」「问数平台有哪些指标」「按指标出数」「拉取问数结果」且已配置 mcp_ 开头的 API Key 与 /mcp 端点时使用。触发词:YOLO…
git:20261017.6fa51db · audit A · 64 stars
业务词汇解析 SKILL.md skill
xiaour/yolo-data · skills/yolo-core-skill-business-vocabulary/SKILL.md · 解析中文时间粒度、排名数量和常用业务表达为结构化意图
v1.0.0 · audit A · 64 stars
时间表达式解析 SKILL.md skill
xiaour/yolo-data · skills/yolo-core-skill-temporal-expression/SKILL.md · 把自然语言中的日期范围和时间周期解析为结构化时间条件
v1.0.0 · audit A · 64 stars

Every file in xiaour/yolo-data

Browse by kind, by grade A, or by owner.