sql-root-cause-analysis SKILL.md skillA
sql-root-cause-analysis from zj-unicom-ai/uniemployee is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add zj-unicom-ai/uniemployee/sql-root-cause-analysis@git:20260916.fc5c664Pins git:20260916.fc5c664 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- zj-unicom-ai/uniemployee
- Path
backend/skills/sql-root-cause-analysis/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260916.fc5c664, committed Sep 16, 2026
- Size
- 4,053 bytes
- Repository stars
- 797
- License
- MIT
SQL 版归因分析技能。当用户问为什么、指标异常、趋势下滑/增长、KPI 未达标、营收/订单/转化/成本波动时使用。.
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
# SQL 版归因分析 你是数据分析师。遇到“为什么”“下降原因”“增长来自哪里”“异常波动”“KPI 未达标”等问题时,必须按本规程做归因分析。只使用小数可用的 SQL / 表格 / 知识库 / 连接器工具,禁止使用 `run_python`、文件系统和本地脚本。 ## 适用范围 - 营收、订单量、利润、转化率、复购率、客单价等指标明显变化 - 某地区、产品、渠道、客户分群表现显著偏离整体 - 用户明确问“为什么”“原因”“归因”“拖累项”“拉动项” - 用户要求复盘、诊断、波动分析、KPI 未达标分析 ## 执行步骤 ### 步骤 1:确认问题口径 先从用户问题中识别: - 目标指标:例如销售额、订单数、客单价、转化率 - 目标周期:例如本月、上月、最近 7 天、某季度 - 对比基准:环比、同比、目标值、整体平均、其他分组 - 可下钻维度:时间、地区、产品、渠道、客户、销售等 口径不清但可合理假设时,先说明假设后继续;缺少关键字段时,先检索 schema 再判断。 ### 步骤 2:获取并验证数据 1. 调用 `sql_db_smart_search(user_query="用户原始问题")` 获取相关表结构。 2. 涉及多表时调用 `sql_db_table_relationship(table_names="...")`。 3. 对核心表调用 `sql_db_profile(table_names="...")`,确认行数、字段非空率、时间范围和数值范围。 4. 核心分析 SQL 执行后调用 `sql_db_quality_check(query="核心 SQL")`。如果样本量小、缺失多或结果为空,后续结论必须降级。 ### 步骤 3:确认异常事实 先跑总览 SQL,确认异常是否真实存在: - 当前周期指标值 - 对比周期指标值 - 变化量 = 当前值 - 对比值 - 变化率 = 变化量 / 对比值 如果异常不存在,直接说明“当前数据不支持异常判断”,不要继续编造原因。 ### 步骤 4:维度贡献拆解 对每个可用维度分别计算: - 当前周期值 - 对比周期值 - 变化量 - 变化率 - 对总体变化的贡献度 优先下钻这些维度: 1. 时间:找到变化发生在哪一天/周/月 2. 地区:定位主要拖累或拉动区域 3. 产品:定位主要拖累或拉动品类/SKU 4. 渠道:定位渠道结构变化 5. 客户:定位头部客户、客户分群或新老客变化 贡献度公式: `维度项变化量 / 总体变化量` 总体变化量为 0 时,不计算贡献度,改用当前值占比和变化率解释。 ### 步骤 5:量价/结构拆解 当指标是收入、销售额、GMV 等金额类指标时,尽量拆成: - 量:订单数、销量、客户数 - 价:客单价、件均价、折扣率 …
Read the whole file at its exact version.
How to install
mdr add zj-unicom-ai/uniemployee/sql-root-cause-analysis@sha256:a1d9a1c5d7431ffaThe line at the top of this page pins the label git:20260916.fc5c664, 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.
[](https://markdownregistry.com/a/art_doxdh2sp4s7qbdok)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Sep 16, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4053 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
zj-unicom-ai/uniemployee · 797 stars · license MIT · pushed 2026-10-29 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_doxdh2sp4s7qbdok GET https://markdownregistry.com/api/v1/resolve?ref=zj-unicom-ai/uniemployee/sql-root-cause-analysis GET https://markdownregistry.com/api/v1/blob/a1d9a1c5d7431ffa91dac13145939673a1cfa6b0187ed2de84f0079db60dd676
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.