validate-data by anthropics/knowledge-work-plugins
npx skills add https://github.com/anthropics/knowledge-work-plugins --skill validate-data如果您看到不熟悉的占位符或需要检查连接了哪些工具,请参阅 CONNECTORS.md。
在与利益相关者分享之前,审查分析的准确性、方法论和潜在偏见。生成置信度评估和改进建议。
/validate-data <要审查的分析>
分析可以是:
检查:
完成以下清单——数据质量、计算、合理性和呈现检查。
根据以下详细的陷阱目录进行系统审查(连接爆炸、幸存者偏差、不完整周期比较、分母偏移、平均值的平均值、时区不匹配、选择偏差)。
在可能的情况下,进行抽查:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
应用以下结果合理性检查技术(数量级检查、交叉验证、危险信号检测)。
如果分析包含图表:
审查:
提供具体、可操作的建议:
按 3 级量表对分析进行评级:
可以分享 —— 分析方法论合理,计算已验证,注意事项已注明。有小的改进建议,但没有阻碍性问题。
分享并注明注意事项 —— 分析基本正确,但存在必须向利益相关者传达的具体限制或假设。列出所需的注意事项。
需要修订 —— 发现具体错误、方法论问题或缺失的分析,应在分享前解决。按优先级顺序列出所需的更改。
## 验证报告
### 总体评估:[可以分享 | 分享并注明注意事项 | 需要修订]
### 方法论审查
[关于方法、数据选择、定义的发现]
### 发现的问题
1. [严重程度:高/中/低] [问题描述和影响]
2. ...
### 计算抽查
- [指标]:[已验证 / 发现差异]
- ...
### 可视化审查
[图表或视觉呈现方面的任何问题]
### 建议的改进
1. [改进及其重要性]
2. ...
### 需要向利益相关者说明的注意事项
- [必须传达的注意事项]
- ...
在与利益相关者分享任何分析之前,请运行此清单。
问题 :多对多连接默默地增加了行数,夸大了计数和总和。
如何检测 :
-- 检查连接前后的行数
SELECT COUNT(*) FROM table_a; -- 1,000
SELECT COUNT(*) FROM table_a a JOIN table_b b ON a.id = b.a_id; -- 3,500 (有问题)
如何预防 :
COUNT(DISTINCT a.id) 而不是 COUNT(*)问题 :只分析今天存在的实体,忽略了那些被删除、流失或失败的实体。
示例 :
如何预防 :在得出结论之前,问“谁不在此数据集中?”。
问题 :将部分周期与完整周期进行比较。
示例 :
如何预防 :始终过滤到完整周期,或比较同月同日/相同天数。
问题 :分母在不同时期之间发生变化,使得比率不可比。
示例 :
如何预防 :在所有比较的时期使用一致的定义。注意任何定义更改。
问题 :当组大小不同时,对预先计算的平均值求平均值会得出错误的结果。
示例 :
如何预防 :始终从原始数据聚合。永远不要对预先聚合的平均值求平均值。
问题 :不同的数据源使用不同的时区,导致错位。
示例 :
如何预防 :在分析之前将所有时间戳标准化为单个时区(推荐 UTC)。记录使用的时区。
问题 :细分是根据你正在测量的结果定义的,造成循环逻辑。
示例 :
如何预防 :根据处理前的特征定义细分,而不是结果。
对于分析中的任何关键数字,验证它通过“嗅觉测试”:
| 指标类型 | 合理性检查 |
|---|---|
| 用户数量 | 这与已知的 MAU/DAU 数字匹配吗? |
| 收入 | 这与已知的 ARR 相比数量级正确吗? |
| 转化率 | 这在 0% 到 100% 之间吗?它与仪表板数字匹配吗? |
| 增长率 | 50%+ 的环比增长现实吗,还是存在数据问题? |
| 平均值 | 考虑到你对分布的了解,平均值合理吗? |
| 百分比 | 细分百分比之和是否约为 100%? |
每个重要的分析都应包括:
## 分析:[标题]
### 问题
[正在回答的具体问题]
### 数据源
- 表:[schema.table_name](截至[日期])
- 表:[schema.other_table](截至[日期])
- 文件:[文件名](来源:[来源])
### 定义
- [指标 A]:[确切的计算方式]
- [细分 X]:[确定成员资格的确切方式]
- [时间段]:[开始日期] 至 [结束日期],[时区]
### 方法论
1. [分析方法步骤 1]
2. [步骤 2]
3. [步骤 3]
### 假设和限制
- [假设 1 及其合理性]
- [限制 1 及其对结论的潜在影响]
### 关键发现
1. [发现 1 及支持证据]
2. [发现 2 及支持证据]
### SQL 查询
[使用的所有查询,带注释]
### 注意事项
- [读者在据此行动前应了解的事项]
对于任何可能重用的代码(SQL、Python):
"""
分析:月度队列留存
作者:[姓名]
日期:[日期]
数据源:events 表,users 表
最后验证:[日期]——结果与仪表板匹配度在 2% 以内
目的:
根据首次活动日期计算月度用户留存队列。
假设:
- “活跃”意味着当月至少有一个事件
- 排除测试/内部账户(user_type != 'internal')
- 始终使用 UTC 日期
输出:
队列留存矩阵,行为 cohort_month,列为 months_since_signup。
值为留存率(0-100%)。
"""
/validate-data 在我发送给执行团队之前,审查这份季度收入分析:[分析]
/validate-data 检查我的流失分析——我正在比较第四季度与第三季度的流失率,但第四季度的测量窗口较短
/validate-data 这是我们的转化漏斗的 SQL 查询及其结果。逻辑看起来正确吗?[查询 + 结果]
每周安装数
210
仓库
GitHub 星标数
10.3K
首次出现
11 天前
安全审计
安装于
codex201
gemini-cli197
opencode197
cursor196
github-copilot195
kimi-cli195
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Review an analysis for accuracy, methodology, and potential biases before sharing with stakeholders. Generates a confidence assessment and improvement suggestions.
/validate-data <analysis to review>
The analysis can be:
Examine:
Work through the checklist below — data quality, calculation, reasonableness, and presentation checks.
Systematically review against the detailed pitfall catalog below (join explosion, survivorship bias, incomplete period comparison, denominator shifting, average of averages, timezone mismatches, selection bias).
Where possible, spot-check:
Apply the result sanity-checking techniques below (magnitude checks, cross-validation, red-flag detection).
If the analysis includes charts:
Review whether:
Provide specific, actionable suggestions:
Rate the analysis on a 3-level scale:
Ready to share -- Analysis is methodologically sound, calculations verified, caveats noted. Minor suggestions for improvement but nothing blocking.
Share with noted caveats -- Analysis is largely correct but has specific limitations or assumptions that must be communicated to stakeholders. List the required caveats.
Needs revision -- Found specific errors, methodological issues, or missing analyses that should be addressed before sharing. List the required changes with priority order.
## Validation Report
### Overall Assessment: [Ready to share | Share with caveats | Needs revision]
### Methodology Review
[Findings about approach, data selection, definitions]
### Issues Found
1. [Severity: High/Medium/Low] [Issue description and impact]
2. ...
### Calculation Spot-Checks
- [Metric]: [Verified / Discrepancy found]
- ...
### Visualization Review
[Any issues with charts or visual presentation]
### Suggested Improvements
1. [Improvement and why it matters]
2. ...
### Required Caveats for Stakeholders
- [Caveat that must be communicated]
- ...
Run through this checklist before sharing any analysis with stakeholders.
The problem : A many-to-many join silently multiplies rows, inflating counts and sums.
How to detect :
-- Check row count before and after join
SELECT COUNT(*) FROM table_a; -- 1,000
SELECT COUNT(*) FROM table_a a JOIN table_b b ON a.id = b.a_id; -- 3,500 (uh oh)
How to prevent :
COUNT(DISTINCT a.id) instead of COUNT(*) when counting entities through joinsThe problem : Analyzing only entities that exist today, ignoring those that were deleted, churned, or failed.
Examples :
How to prevent : Ask "who is NOT in this dataset?" before drawing conclusions.
The problem : Comparing a partial period to a full period.
Examples :
How to prevent : Always filter to complete periods, or compare same-day-of-month / same-number-of-days.
The problem : The denominator changes between periods, making rates incomparable.
Examples :
How to prevent : Use consistent definitions across all compared periods. Note any definition changes.
The problem : Averaging pre-computed averages gives wrong results when group sizes differ.
Example :
How to prevent : Always aggregate from raw data. Never average pre-aggregated averages.
The problem : Different data sources use different timezones, causing misalignment.
Examples :
How to prevent : Standardize all timestamps to a single timezone (UTC recommended) before analysis. Document the timezone used.
The problem : Segments are defined by the outcome you're measuring, creating circular logic.
Examples :
How to prevent : Define segments based on pre-treatment characteristics, not outcomes.
For any key number in your analysis, verify it passes the "smell test":
| Metric Type | Sanity Check |
|---|---|
| User counts | Does this match known MAU/DAU figures? |
| Revenue | Is this in the right order of magnitude vs. known ARR? |
| Conversion rates | Is this between 0% and 100%? Does it match dashboard figures? |
| Growth rates | Is 50%+ MoM growth realistic, or is there a data issue? |
| Averages | Is the average reasonable given what you know about the distribution? |
| Percentages | Do segment percentages sum to ~100%? |
Every non-trivial analysis should include:
## Analysis: [Title]
### Question
[The specific question being answered]
### Data Sources
- Table: [schema.table_name] (as of [date])
- Table: [schema.other_table] (as of [date])
- File: [filename] (source: [where it came from])
### Definitions
- [Metric A]: [Exactly how it's calculated]
- [Segment X]: [Exactly how membership is determined]
- [Time period]: [Start date] to [end date], [timezone]
### Methodology
1. [Step 1 of the analysis approach]
2. [Step 2]
3. [Step 3]
### Assumptions and Limitations
- [Assumption 1 and why it's reasonable]
- [Limitation 1 and its potential impact on conclusions]
### Key Findings
1. [Finding 1 with supporting evidence]
2. [Finding 2 with supporting evidence]
### SQL Queries
[All queries used, with comments]
### Caveats
- [Things the reader should know before acting on this]
For any code (SQL, Python) that may be reused:
"""
Analysis: Monthly Cohort Retention
Author: [Name]
Date: [Date]
Data Source: events table, users table
Last Validated: [Date] -- results matched dashboard within 2%
Purpose:
Calculate monthly user retention cohorts based on first activity date.
Assumptions:
- "Active" means at least one event in the month
- Excludes test/internal accounts (user_type != 'internal')
- Uses UTC dates throughout
Output:
Cohort retention matrix with cohort_month rows and months_since_signup columns.
Values are retention rates (0-100%).
"""
/validate-data Review this quarterly revenue analysis before I send it to the exec team: [analysis]
/validate-data Check my churn analysis -- I'm comparing Q4 churn rates to Q3 but Q4 has a shorter measurement window
/validate-data Here's a SQL query and its results for our conversion funnel. Does the logic look right? [query + results]
Weekly Installs
210
Repository
GitHub Stars
10.3K
First Seen
11 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex201
gemini-cli197
opencode197
cursor196
github-copilot195
kimi-cli195
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
42,000 周安装