Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/auron-lmh/data-quality-loop/data-quality-fixernpx skills add auron-lmh/data-quality-loop --skill data-quality-fixergit clone --depth 1 https://github.com/auron-lmh/data-quality-loopWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/auron-lmh/data-quality-loop/data-quality-fixer)<a href="https://agentmods.dev/skills/auron-lmh/data-quality-loop/data-quality-fixer"><img src="https://agentmods.dev/badge/skills/auron-lmh/data-quality-loop/data-quality-fixer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.01543 |
| Opus 5 | $0.00030 | $0.00772 |
| Sonnet 5 | $0.00012 | $0.00309 |
| Haiku 4.5 | $0.00006 | $0.00154 |
Grade A, and why
data-quality-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
数据质量修复标准流程
核心理念:修复不是一次成功的,而是"Fixer 生成方案 → Verifier 副本验证 → 不通过带问题清单回到 Fixer"的多轮收敛。 循环控制由外部 Python 程序负责,编排者只需专注每一轮的 Fixer→Verifier 流程。
零、Loop 收敛设计(⚠️ 最重要的设计原则)
信息闭环流
Python 循环控制 → Orchestrator 收到"请处理表 X"
│
├─ 首轮:Fixer 全面分析异常 → 生成修复方案 → Verifier 副本验证 → 问题清单
│
└─ 续轮:Orchestrator ★将 Verifier 的问题清单原样传递给 Fixer★
→ Fixer 靶向修正 → Verifier 再验证 → 问题减少或通过
⚠️ 收敛的核心规则
- Orchestrator 必须传递反馈:续轮时把上一轮 Verifier 的问题清单逐条复制给 Fixer,禁止只说"根据意见修改"
- Fixer 只做靶向修复:收问题清单时仅修清单中的项,未列出的保持原样
- Fixer 不得引入新问题:修复 SQL 自身必须通过全部质量规则(修一个不能坏一个)
- Verifier 提供可操作的修正建议:每条问题附带具体 SQL 或数值
- 问题清单逐轮缩小:每轮后剩余问题必须比上一轮少
为什么必须这样做
Fixer 每次被委派都是全新状态,看不到上一轮验证结果。Orchestrator 不把问题清单传过去,Fixer 就不知道修什么,会乱修或漏修,Loop 无法收敛。
一、修复四大原则(Fixer 必须遵守)
- 靶向修复:只修异常清单/问题清单中列出的项
- 不引入新问题:修复 SQL 执行后,全表必须通过全部质量规则(不只目标异常)
- 影响可控:UPDATE/DELETE 必须带精确 WHERE,禁止无 WHERE 全表更新;修复前预估影响行数
- SQL 规范:修复 SQL 必须以
UPDATE ... RETURNING 1或DELETE ... RETURNING 1结尾,便于统计影响行数
二、修复方案输出格式(JSON,缺一不可)
{
"fixes": [
{
"anomaly_key": "orders.amount.empty_rate",
"fix_type": "fill_default | dedup | convert | reconcile | correct_format | delete_dangling | fix_enum",
"sql": "UPDATE orders SET amount = 0 WHERE amount IS NULL RETURNING 1",
"explain": "补全空值金额为 0",
"rows_expected": 300
}
]
}
- 每个异常项对应一条修复(除非确认无需修复并说明理由)
- 输出方案后立即结束,不要自己验证(那是 Verifier 的职责)
三、各类问题的标准修法
| 规则 | fix_type | 标准做法 | 示例 |
|---|---|---|---|
| empty_rate(空值) | fill_default | 空值填充业务合理默认值(金额=0、文本='未知')或删除空值行(若不可填充) | UPDATE orders SET amount=0 WHERE amount IS NULL RETURNING 1 |
| pk_duplicates(主键重复) | dedup | 保留每个重复组中一行(如金额非空/最新),DELETE 其余 | DELETE FROM orders WHERE order_id IN (...) AND ... RETURNING 1 |
| reference_integrity(引用悬空) | delete_dangling / fix_foreign | 优先删除悬空行;或 UPDATE 到有效外键值 | DELETE FROM orders WHERE customer_id='C99999' RETURNING 1 |
| date_format(日期格式) | correct_format | UPDATE 统一为标准格式(YYYY-MM-DD) | UPDATE orders SET order_date=REPLACE(order_date,'/','-') WHERE order_date LIKE '%/%' RETURNING 1 |
| amount_reconciliation(金额勾稽) | reconcile | 修正汇总表,使与明细按日求和一致 | UPDATE orders_daily_summary SET gmv=gmv+100 WHERE order_date='2026-01-01' RETURNING 1 |
| value_enum(枚举/类型) | fix_enum | 把非法值映射到合法枚举 | UPDATE customers SET vip_level='普通' WHERE vip_level IN ('0','1','2','3') RETURNING 1 |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 111 lines · 61 tokens per session scan A f06a02a8a8e6
data-quality-fixer is a skill published in the GitHub repository auron-lmh/data-quality-loop (0 stars, last pushed 28d ago), licensed MIT. It adds 61 tokens to every session and 1,543 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
usage
Wren Engine CLI workflow guide for AI agents. Answer data questions end-to-end using the wren CLI: gather schema context, recall past queries, write SQL through the MDL semantic layer, execute, and learn from confirmed results. Use when: user asks a data question, requests a report or analysis, asks about metrics…
dlt-connector
Connect SaaS data (HubSpot, Stripe, Salesforce, GitHub, Slack, etc.) to Wren Engine for SQL analysis. Guides the user through the full flow: install dlt, pick a SaaS source, set up credentials, run the data pipeline into DuckDB, then auto-generate a Wren semantic project from the loaded data. Use this skill whenever…
generate-mdl
Generate a Wren MDL project by exploring a database with available tools (SQLAlchemy, database drivers, MCP connectors, or raw SQL). Guides agents through schema discovery, type normalization, and MDL YAML generation using the wren CLI. Use when: user wants to create or set up a new MDL, onboard a new data source, or…
wren
Wren CLI for AI agents — a semantic SQL layer over 22+ databases (Postgres, MySQL, BigQuery, Snowflake, Spark, …). The actual workflow guides live inside the wren CLI itself; this is just a discovery stub. Use whenever the user asks a data question (how many, show me, top N, compare, trend, breakdown, metric, revenue…
后端编码
后端技术栈编码技能(规范+流程)。含 API 设计、数据库规范、错误处理、日志规范、API 端点测试要求。用于后端/全栈任务的编码阶段。.