一键导入
sql-data-validator
Generate SQL queries that validate data quality and integrity. Use when the user wants validation queries for a database.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate SQL queries that validate data quality and integrity. Use when the user wants validation queries for a database.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Full QA audit orchestrator. Use when the user asks to "test my app", "run a full QA audit", "test everything", or invokes /qa-audit. Discovers what kind of application this is, selects the relevant QA agents (ui-inspector, api-sentinel, security-scout, perf-guardian, data-validator, regression-watcher), runs them, and merges their reports into one master QA report.
Onboard the QA toolkit onto any project. Use on first contact with a new codebase, when the user says "set up QA", "qa init", "/qa-init", or when any QA agent finds no qa-profile.md. Studies the project deeply and writes the persistent QA profile that every other agent reads first — the toolkit's long-term memory for this project.
Wire the QA suite into CI. Use when the user wants tests running automatically on every PR or on a schedule: "add this to CI", "run tests on every push", "/qa-ci". Generates GitHub Actions workflows for the generated Playwright suite and (optionally) scheduled full audits.
Self-healing for the generated test suite. Use when previously-green Playwright tests are failing, the user says "my tests broke", "fix the tests", "/qa-heal", or after a UI refactor breaks selectors. Classifies each failure (real bug vs test drift) and repairs the drift — never papers over real bugs.
Compare two QA audit runs and report what improved, what regressed, and what persists. Use when the user asks "did it improve since last time?", "compare audits", "QA trend", or invokes /qa-trend. Requires at least two timestamped runs under qa-reports/runs/.
Audit web pages for WCAG 2.1 compliance. Use when the user asks about accessibility, a11y, WCAG, screen readers, or contrast issues.
| name | sql-data-validator |
| description | Generate SQL queries that validate data quality and integrity. Use when the user wants validation queries for a database. |
Generate SQL validation queries to check data quality, integrity, and consistency.
This skill generates ready-to-run SQL queries that validate data quality across databases. Given a schema or table description, it produces a comprehensive set of validation queries covering completeness, uniqueness, referential integrity, and business rule compliance.
When the user provides a database schema, table descriptions, or data quality concerns:
-- Check NULL rates for all columns in [table]
SELECT
COUNT(*) as total_rows,
COUNT(column_name) as non_null_count,
ROUND(100.0 * COUNT(column_name) / COUNT(*), 2) as completeness_pct
FROM table_name;
-- Find duplicate records based on [key columns]
SELECT column1, column2, COUNT(*) as duplicate_count
FROM table_name
GROUP BY column1, column2
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
-- Find orphaned records in [child_table]
SELECT c.*
FROM child_table c
LEFT JOIN parent_table p ON c.parent_id = p.id
WHERE p.id IS NULL;
-- Check for out-of-range values
SELECT *
FROM table_name
WHERE numeric_column < 0
OR numeric_column > 999999
OR date_column > CURRENT_DATE
OR date_column < '2000-01-01';
-- Check email format
SELECT email, id
FROM users
WHERE email NOT LIKE '%_@_%.__%';
-- Check phone format
SELECT phone, id
FROM users
WHERE phone !~ '^\+?[0-9]{10,15}$';
-- Orders must have positive totals
SELECT order_id, total
FROM orders
WHERE total <= 0 AND status != 'cancelled';
-- End date must be after start date
SELECT id, start_date, end_date
FROM subscriptions
WHERE end_date <= start_date;
-- Data Quality Dashboard
SELECT
'Total Records' as metric, COUNT(*)::text as value FROM table_name
UNION ALL
SELECT 'Null Email Rate', ROUND(100.0 * SUM(CASE WHEN email IS NULL THEN 1 ELSE 0 END) / COUNT(*), 2)::text || '%' FROM users
UNION ALL
SELECT 'Duplicate Count', COUNT(*)::text FROM (SELECT email FROM users GROUP BY email HAVING COUNT(*) > 1) d
UNION ALL
SELECT 'Orphaned Orders', COUNT(*)::text FROM orders o LEFT JOIN users u ON o.user_id = u.id WHERE u.id IS NULL;
Generates queries compatible with:
Specify your dialect and the skill will adjust syntax accordingly (e.g., ILIKE vs LIKE, LIMIT vs TOP, date functions).
Generate data validation queries for these tables:
- users (id, email, name, created_at, status)
- orders (id, user_id, total, status, created_at)
- order_items (id, order_id, product_id, quantity, price)
Write SQL checks to validate our migration from MySQL to PostgreSQL. Here's the schema...