Data Quality Rule Generator

Use when generating data quality rules from a table schema, SQL, metric definition, or data pipeline description. Produces validation rules for freshness, row count, uniqueness, nulls, enums, ranges, referential integrity, metric fluctuation, reconciliation, and SQL checks. 中文触发词:数据质量规则、质量校验、DQC、校验 SQL、上线验收。

9 starsDatabases

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add shisuidata/ss-data-skills --skill data-quality-rule-generator
Manual install
git clone --depth 1 https://github.com/shisuidata/ss-data-skills.git /tmp/ss-data-skills
mkdir -p ~/.claude/skills
cp -r /tmp/ss-data-skills/skills/data-quality-rule-generator ~/.claude/skills/data-quality-rule-generator

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Data Quality Rule Generator

## 目标

根据表结构、SQL、指标定义或任务说明,生成可落地的数据质量规则。

这个 Skill 关注质量规则设计,不负责替代调度平台、质量平台或监控系统。默认输出通用 SQL 校验规则,脚本可以同时生成 dbt `schema.yml` 和 Great Expectations 1.x 规则集。DataWorks、DolphinScheduler 等平台按 SQL 规则改写。

## 使用场景

使用这个 Skill,当用户需要:

- 给一张新表配置质量校验
- 给核心指标增加监控规则
- 给数据任务上线前补充验收标准
- 为补数、重刷、口径变更设计校验 SQL
- 为 ODS、DWD、DWS、ADS 层表设计不同强度的质量规则
- 从 SQL 或表结构中推导非空、唯一、枚举、范围、波动等规则

典型输入:

```text
请根据这张订单汇总表设计数据质量规则。
```

```text
这段 SQL 每天产出渠道转化率,请帮我生成上线前校验项。
```

## 不适用场景

不要用这个 Skill 直接完成:

- 模糊需求澄清,请使用 `data-requirement-clarifier`
- 指标口径审查,请使用 `metric-definition-reviewer`
- 表结构设计,请使用 `table-design-advisor`
- SQL 逻辑审查,请使用 `sql-reviewer`

如果表粒度、主键或指标口径不明确,必须先列为待确认问题,再给出基于假设的规则。

## 输入信息

最少输入之一:

- 表结构
- SQL
- 指标定义
- 数据任务说明
- `eda.py` 的体检结果

可选输入:

- 表粒度
- 主键或唯一键
- 分区字段
- 更新频率
- 数据延迟要求
- 上游表
- 下游指标
- 历史波动范围
- 质量平台类型
- 告警接收人或处理机制

## 上下文建议

推荐使用 [表设计上下文模板](../../context/templates/table-context.md) 或 [SQL 审查上下文模板](../../context/templates/sql-review-context.md)。

最有价值的上下文是:表粒度、主键、分区字段、更新频率、SLA、核心指标和历史波动范围。缺少历史波动时,可以给出默认监控思路,但阈值必须标记为假设。

## 规则类型

优先从这些维度生成规则:

1. 产出及时性与新鲜度:分区是否按时产出,最新事件时间是否满足 SLA。
2. 数据量:行数是否为 0,日环比或周同比是否异常。
3. 唯一性:主键、业务键、分区内唯一键是否重复。
4. 非空:关键维度、主键、金额、状态、时间字段是否为空。
5. 枚举值:状态、渠道、类型字段是否在合法集合内。
6. 数值范围:金额、次数、比例、时长是否落在合理范围内。
7. 逻辑一致性:开始时间小于结束时间,支付金额不小于 0,分子不大于分母。
8. 关联完整性:事实表外键是否能关联到维表。
9. 指标波动:核心指标是否出现异常升降。
10. 上下游对账:汇总表与明细表、源表与目标表是否一致。

## 可用脚本

有表结构或体检结果时,用脚本生成规则:
Read the full skill on GitHub

Details

Skill name
data-quality-rule-generator
Path
skills/data-quality-rule-generator/SKILL.md
License
MIT
Repo updated
8 November 2026

FAQ

What does the Data Quality Rule Generator skill do?

Use when generating data quality rules from a table schema, SQL, metric definition, or data pipeline description. Produces validation rules for freshness, row count, uniqueness, nulls, enums, ranges, referential integrity, metric fluctuation, reconciliation, and SQL checks. 中文触发词:数据质量规则、质量校验、DQC、校验 SQL、上线验收。

How do I install the Data Quality Rule Generator skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add shisuidata/ss-data-skills --skill data-quality-rule-generator. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Data Quality Rule Generator popular?

It lives in shisuidata/ss-data-skills, which has 9 GitHub stars and 0 forks.

Related skills

Ab Test Analysis

9

shisuidata/ss-data-skills

Use when designing, checking, or interpreting A/B tests and experiments. Computes significance, confidence intervals, sample ratio mismatch, power, CUPED, and sample size with a bundled zero-dependency script, then judges validity risks, guardrails, and ship/iterate/rollback decisions and renders an HTML experiment report. 中文触发词:A/B 实验、AB 测试、实验解读、显著性、样本量计算、能不能全量。

Testing & QA

Business Root Cause Analysis

9

shisuidata/ss-data-skills

Use when diagnosing business metric changes or anomalies such as GMV decline, conversion drop, retention loss, churn increase, revenue change, lead decline, or active user fluctuation with a structured root cause analysis plan. 中文触发词:指标归因、为什么下降、异常排查、GMV 下滑、指标波动原因。

Marketing, Sales & Business

Daily Report Writer

9

shisuidata/ss-data-skills

Use when writing a concise daily report, daily worklog, standup update, shift handoff, or end-of-day summary for data analysis, data development, BI, governance, or operations work. 中文触发词:日报、日终同步、站会发言、值班交接。

Writing & Content

Durable Objects

9

zllovesuki/cloudflare-agent-skills

Build Cloudflare Durable Objects for stateful coordination, one-per-entity actors, strong consistency, private SQLite-backed storage, RPC methods, WebSockets, alarms, sessions, rooms, rate limits, and collaborative state. Use when Workers code needs serialized state or race-free coordination.

Databases

D1

9

zllovesuki/cloudflare-agent-skills

Write Cloudflare D1 code and schemas for SQLite-backed relational data, prepared statements, bindings, migrations, typed queries, tenant boundaries, indexes, pagination, and idempotent writes. Use when Workers need SQL data on Cloudflare.

Databases

Kv Hyperdrive

9

zllovesuki/cloudflare-agent-skills

Use Cloudflare KV for eventually consistent global cache/config and Hyperdrive for existing Postgres/MySQL access from Workers. Use when deciding cache-aside patterns, TTLs, invalidation, external DB connectivity, and Node-compatible database drivers.

Databases

Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.