Sql join risk reviewer
Skill nicholashidalgo/claude-skillforge/data-engineering/sql-join-risk-reviewer
npx -y skills add nicholashidalgo/claude-skillforge --skill sql-join-risk-reviewerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Review SQL or report logic for many-to-many joins, duplicate-grain risk, unsafe aggregation, and filter side effects.
SKILL.md
1.9 KB, as published. Nobody here has run it
Runtime Configuration
version: "1.0.0"
gotcha_pack: "sql-data-gotcha-pack"
gotcha_pack_version: "1.0.0"
gotcha_enforcement: "block_on_high"
Purpose
Review data logic before it breaks reporting.
Check for
- unclear base grain
- one-to-many or many-to-many joins
- double counting risk
- filter placement issues
- late aggregation
- unsafe distinct usage
- date-table mismatches
- left join versus inner join consequences
Output format
- Primary risks
- Why each risk matters
- Safer rewrite guidance
- Residual assumptions
Gotcha Enforcement
Every review must explicitly check each rule below. Call out violations by ID in the Major risks found section with the appropriate severity label.
| ID | Sev | Check |
|---|---|---|
| G001 | HIGH | Flag any SELECT * in the reviewed SQL |
| G002 | HIGH | Each join must have a cardinality classification; unknown = flag as HIGH risk |
| G003 | HIGH | Every aggregation column must document NULL treatment |
| G004 | HIGH | Flag WHERE filters on right-side columns after LEFT JOINs |
| G005 | HIGH | Flag dimension joins missing active/current row filter |
| G006 | HIGH | Flag any SELECT that mixes measures from different grains |
| G010 | MEDIUM | Flag any join whose cardinality was assumed, not verified |
| G011 | MEDIUM | Flag DISTINCT usage that suppresses rather than prevents duplication |