agentsclimarketplace

Sql data gotcha pack

Skill nicholashidalgo/claude-skillforge/shared/sql-data-gotcha-pack

Install
npx -y skills add nicholashidalgo/claude-skillforge --skill sql-data-gotcha-pack

Assembled 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

Machine-readable gotcha rules for SQL and data engineering failure patterns. Loaded by data and SQL skills to enforce Never-do-X constraints grounded in real reporting failures.

SKILL.md

4.7 KB, as published. Nobody here has run it

SQL and Data Gotcha Pack

This is a shared rule library. It is not a standalone skill. Data and SQL skills load it to enforce a common set of Never-do-X constraints.

How it works

Every rule in this pack has:

  • A unique ID (G001 through G015)
  • A severity: HIGH, MEDIUM, or LOW
  • A machine-readable failure pattern used by CI
  • A rationale grounded in a real reporting failure class
  • A bad and good example
  • A skill scope list (which skills enforce which rules)

Rules with failure_pattern_type: regex or regex_flag_only are caught automatically by sql_data_gotcha.flag_gotchas(text, skill).

Rules with failure_pattern_type: behavioral are injected as enforcement instructions into the dependent skill's SKILL.md and enforced by the LLM at generation time.

Rule Index

IDSeverityRule summarySkills
G001HIGHNever SELECT *sql-report-builder, schema-join-risk-reviewer, data-integrity-investigator
G002HIGHNever aggregate before confirming join cardinalitysql-report-builder, schema-join-risk-reviewer, data-integrity-investigator, python-report-validation
G003HIGHNever treat NULL as zero in aggregationsall 6 data+SQL skills, kpi-definition-governance
G004HIGHNever let LEFT JOIN be silently converted to INNER JOINsql-report-builder, schema-join-risk-reviewer, data-integrity-investigator
G005HIGHNever join SCD dimension without current/active filtersql-report-builder, schema-join-risk-reviewer, data-integrity-investigator
G006HIGHNever mix grains in the same aggregation without documenting itsql-report-builder, schema-join-risk-reviewer, kpi-definition-governance, requirements-to-report-spec
G007HIGHNever validate using the same logic as the report under testsql-report-builder, data-integrity-investigator, python-reconciliation-engine, python-report-validation
G008HIGHNever define a KPI without inclusion and exclusion criteriakpi-definition-governance, requirements-to-report-spec
G009MEDIUMNever report on a column without checking its null rate firstpython-data-investigator, data-integrity-investigator, python-report-validation, requirements-to-report-spec
G010MEDIUMNever infer join type from column name; verify cardinalityschema-join-risk-reviewer, data-integrity-investigator, sql-report-builder
G011MEDIUMNever let DISTINCT mask a duplicate without investigating the sourcesql-report-builder, schema-join-risk-reviewer, data-integrity-investigator
G012HIGHNever reconcile datasets without confirming shared grain+periodpython-reconciliation-engine, data-integrity-investigator, python-report-validation
G013LOWNever write a report spec without a sort tie-break rulerequirements-to-report-spec, kpi-definition-governance
G014HIGHNever validate a report by row count onlypython-report-validation, data-integrity-investigator
G015MEDIUMNever treat net-zero reconciliation as proof of correctnesspython-reconciliation-engine, data-integrity-investigator

Enforcement model

For LLM skills

Dependent skills include this block in their Runtime Configuration:

gotcha_pack: "sql-data-gotcha-pack"
gotcha_pack_version: "1.0.0"
gotcha_enforcement: "block_on_high"

And a Gotcha Enforcement section that lists the applicable rule IDs and instructs Claude to check each before finalizing output.

For CI

from shared.sql_data_gotcha_pack.sql_data_gotcha import flag_report

result = flag_report(generated_sql, skill="sql-report-builder")
assert result["pass"], f"HIGH gotcha violations: {result['hits']}"

Adding rules

  1. Add an entry to gotchas.json with the next sequential ID.
  2. Add the skill to the skills list of each affected rule.
  3. Add the rule ID to the Gotcha Enforcement block in each affected SKILL.md.
  4. Add a test case to tests/shared/test_sql_data_gotcha_pack.py.
  5. Run python tools/check_gotcha_coverage.py to verify all skills are covered.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.