lu-query-audit-data-quality
Skill2 starsChanged 29 days agoMITView on GitHub
Use lu-query to check Oracle data quality - find duplicate key candidates with find_duplicates, count orphan rows of a foreign key with validate_fk_integrity, and get exact table counts with count_rows. Use when auditing a table before migrating, deduplicating, or validating a legacy FK.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-reviewSkill
- code-simplificationSkill
- constraint-driven-developmentSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- grill-meSkill
- grill-with-docsSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- incremental-implementationSkill
- observability-and-instrumentationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- prSkill
- security-and-hardeningSkill
- setup-matt-pocock-skillsSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- to-specSkill
- to-ticketsSkill
- using-agent-skillsSkill
- wayfinderSkill
- writing-for-agentsSkill
- lu-query-audit-reportSkill
- lu-query-benchmark-sqlSkill
- lu-query-explore-schemaSkill
- lu-query-manage-schemaSkill
- lu-query-plan-data-changesSkill
- lu-query-query-dataSkill
- lu-query-triage-incidentSkill
- lu-query-tune-sqlSkill
- lu-query-use-plsqlSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Read-only. Nothing here writes.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit data quality with lu-query
When to use
- "Are there duplicates?", "does this FK actually hold?", "how many rows does the table have, exactly?"
- Pre-migration or pre-deduplication checks.
When not to use
- You need row values → lu-query-query-data.
- You want to fix rows → audit first, then lu-query-plan-data-changes.
Workflow
- Size the table.
count_rows(exact, no SQL handcrafting). - Duplicates.
find_duplicateswith the candidate key column(s). Readgroups: each entry has the duplicated value,CNTand aSAMPLE_ROWIDyou can join on. - Referential integrity.
validate_fk_integrityon the child table; optionallyconstraintto check one named FK. It reports orphans per constraint. - Rank and report. Order findings by business impact, not by tool order. State the exact SQL-equivalent you would run to fix each one, and let the user approve before any write.
Reading results correctly
find_duplicatesexcludesNULLs (SQLGROUP BYsemantics): a column that isNULLin most rows will not show up as a duplicate group. Verify nullability withdescribe_tablebefore trusting "no duplicates".minCountdefaults to 2; raise it to find triplicates.validate_fk_integrityreturns one row per FK withorphan_count.0means every child row resolves to a parent among rows the tool can see;> 0names real orphans.- Legacy orphans can only exist if the constraint was created (or left)
NOVALIDATE. If a FK was created and validated, the answer is trivially 0 - that is a real finding, not a bug.
Tool reference
| Tool | Signature | Returns |
count_rows | table*, schema? | {schema, table, rowCount} |
find_duplicates | table*, columns* (array), minCount?, schema? | {schema, table, columns, minCount, groups: [{<col>: value, CNT: n, SAMPLE_ROWID: rid}]} |
validate_fk_integrity | table*, constraint?, schema? | array of {constraint_name, child_columns, parent_owner, parent_table, parent_columns, orphan_count} |
Details: references/tools.md. Verified transcripts: references/examples.md.
Safety
Read-only. Nothing here writes. But do not turn findings into UPDATEs on your own initiative: propose the fix, get approval, then use lu-query-plan-data-changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

