data-investigation

用于开展严谨、可复现的数据调查和临时分析的工作流程。适用于调查业务问题、解释指标异常、验证假设、执行根本原因分析或准备一次性调查仪表板或备忘录的场景。

仓库最近推送
GitHub Stars
212
Forks
664
Issues / PRs
21

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "data-investigation":https://skillpi.com/zh/skills/deepskill-78fcddc8c2d6bc0cce07733bcf8b321a9868d733b89a86669f39b7cad5d55a7d。安装前核对上游来源和版本:https://github.com/Kilo-Org/kilo-marketplace。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于开展严谨、可复现的数据调查和临时分析的工作流程。适用于调查业务问题、解释指标异常、验证假设、执行根本原因分析或准备一次性调查仪表板或备忘录的场景。

0 下载

介绍来源: third_party · Kilo-Org · 0.0.1 参考来源

SkillPi 解读

输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: data-investigation
description: >-
  A workflow for conducting rigorous, reproducible data investigations and
  ad-hoc analyses. This skill should be used when investigating a business
  question, explaining a metric anomaly, validating a hypothesis, performing
  root cause analysis, or preparing a one-off investigation dashboard or memo.
metadata:
  category: data
  author: Pedro / Kilo Code
  source:
    repository: 'https://github.com/Kilo-Org/skills'
    path: skills/data-investigation
    license_path: LICENSE
    commit: a30ff33da809171784aca50d1b5978cebc2185f1

Data Investigation

Use this skill to produce investigations that are fast, correct, reproducible, and communicate a clear conclusion rather than a pile of charts.

Purpose

Every investigation should be answerable in one sentence before the first SQL query is written.

Phase 1: Frame Before Querying

1. Write the one-sentence answer first

Before writing any SQL, write the sentence the conclusion is expected to be.

Example: The cohort size gap is a definition problem rather than a product behavior problem.

If the sentence cannot be written, the question is not yet understood.

2. Classify the investigation type

Type Trigger Approach
Gap analysis Why do A and B not match? Establish the gap, localize it, explain it
Root cause Why did this metric change? Confirm real, isolate segment, align timing, validate mechanism
Hypothesis test Is X causing Y? Define what must be true, test sub-claims, confirm or reject
Feasibility check Is this number trustworthy? Check grain, joins, nulls, definition overlap

3. State 2-3 competing hypotheses before querying

Never investigate with a single hypothesis. That creates confirmation bias.

Order hypotheses by plausibility and note which one is currently expected to be correct and why.

Phase 2: Build Queries In Escalating Specificity

1. Establish first, explain second

Step 1 always confirms the anomaly is real and measures its magnitude. Do not jump to cause until the effect is confirmed.

select
    <time_bucket>,
    <source_a_count> as metric_a,
    <source_b_count> as metric_b,
    <source_a_count> - <source_b_count> as gap,
    round(100.0 * (<source_a_count> - <source_b_count>) / nullif(<source_a_count>, 0), 1) as pct_gap
from ...
order by 1

2. Localize by breaking one dimension at a time

After confirming the gap, break it down along one dimension per step:

  • By time: when did it appear?
  • By segment: who is affected?
  • By signal/source: which path is missing?

3. Align timing with upstream changes

Once the anomaly start date is known, check:

  • git commits to relevant models, ETL jobs, or application code
  • schema migrations or source changes
  • metric definition changes
  • external events such as launches, campaigns, or pricing changes

A credible root cause must explain why the metric changed when it did.

4. Validate the mechanism

After identifying a candidate cause, confirm it mechanically:

  • Does the affected population match the predicted population?
  • What does the counterfactual look like?
  • Does a second independent signal support the explanation?

Do not stop at correlation.

5. Quantify each hypothesis before concluding

For every candidate explanation, produce a number.

Examples:

  • H1 accounts for 1,240 users
  • H2 accounts for 1,050 users

If a hypothesis cannot be quantified, it is not yet validated.

Phase 3: SQL Hygiene Rules

Use stable time bounds for investigations

Investigation SQL should be reproducible. Favor fixed bounds over rolling windows unless the analysis is intentionally operational and evergreen.

-- Prefer fixed investigation scope
where created_at >= '2026-02-16'
  and created_at < '2026-04-04'

Add explicit grain comments in important CTEs

-- grain: one row per user
with users as (
    ...
)

Prefer named comparison outputs over raw aggregates

Bad:

select count(*) from ...

Better:

select
    count(*) as users_in_scope,
    count(distinct org_id) as orgs_in_scope
from ...

Keep diagnostic queries small and discardable

Diagnostic SQL exists to answer one question. Do not build giant reusable queries too early.

Phase 4: Communication Rules

Lead with the answer

The first sentence of the written output should state the conclusion.

Bad:

I looked at several possible explanations for the discrepancy.

Good:

The discrepancy is caused by internal users being excluded from the dashboard query but included in the warehouse baseline.

Separate evidence from interpretation

Use a structure like:

  1. Conclusion
  2. Evidence
  3. Why alternative hypotheses were rejected
  4. Recommended next action

Include the limiting assumption

Every investigation should state the biggest assumption that could change the answer.

Example:

This conclusion assumes backend event timestamps are complete for the affected week; if ingestion was delayed, the gap may be overstated.

Phase 5: Output Standard

Every completed investigation should leave behind:

  1. One-sentence answer
  2. Final supporting SQL or notebook
  3. A note on rejected hypotheses
  4. Any follow-up question or unresolved ambiguity

Common Failure Modes

  • Treating a metric definition dispute as a product issue
  • Comparing sources with different grain or freshness
  • Accepting the first plausible explanation without quantification
  • Writing one giant query too early
  • Ending with charts instead of an answer

Related Skills

版本历史

  1. skills-20261103210927-6c1b454 GitHub ↗
    原版更新说明

    Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323

  2. skills-20260928190452-ff51758 GitHub ↗
    原版更新说明

    Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505

  3. skills-20260924105536-d31110d GitHub ↗
    原版更新说明

    Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049

  4. skills-20260923085113-cea285e GitHub ↗
    原版更新说明

    Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7

  5. skills-20260922193956-97d7333 GitHub ↗
    原版更新说明

    Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供结构化数据调查方法论,解决业务问题调查、指标异常解释等高频刚需场景
  • 强调可复现性与结论导向,显著提升分析效率与可信度
触发精准95/100

亮点

  • 触发描述精准完整,覆盖多种变体(业务问题/指标异常/假设验证/根因分析/仪表板准备)
  • 边界清晰,无歧义或重叠风险
结构规范93/100

亮点

  • 5个Phase结构清晰,步骤明确,有出口条件
  • 包含端到端SQL示例与具体规则,frontmatter完整
执行可靠91/100

亮点

  • 基于SQL与数据分析最佳实践,工具来源明确
  • 覆盖主要异常场景,强调机制验证与量化分析
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。