agentsclimarketplace

Sql report query builder

Skill nicholashidalgo/claude-skillforge/data-engineering/sql-report-query-builder

Install
npx -y skills add nicholashidalgo/claude-skillforge --skill sql-report-query-builder

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

Build report-safe SQL from business requests with grain control, join discipline, filter logic, and validation notes.

SKILL.md

2.4 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

Turn a business request into production-grade SQL for reporting or analysis.

Process

  1. Identify business objective.
  2. Define the intended grain before writing SQL.
  3. List source tables, required joins, filters, and date logic.
  4. Flag join-risk before generating the query.
  5. Separate ad hoc SQL from report-safe SQL when relevant.
  6. Add a validation checklist after the SQL.

Required checks

  • Base grain is explicit
  • Join cardinality is assessed
  • Aggregation level matches requested output
  • Null handling is deliberate
  • Date filters use business-safe logic
  • Filter placement does not silently change row inclusion
  • Naming is readable and consistent

Output format

  1. Assumptions and grain
  2. SQL
  3. Validation checklist
  4. Risks or open questions

Gotcha Enforcement

Before finalizing any SQL output, verify each rule below. A HIGH violation must be corrected before responding. A MEDIUM violation must be flagged with an explanation in the risks section.

IDSevCheck
G001HIGHNo SELECT * in any CTE or final SELECT
G002HIGHEvery join has a stated cardinality; if unknown, provide the verification query
G003HIGHEvery AVG, SUM, or COUNT documents its NULL behavior explicitly
G004HIGHNo WHERE filter on a right-side column after a LEFT JOIN
G005HIGHEvery dimension join includes an active/current filter or documents why not
G006HIGHAll measures in one SELECT are at the same grain; mixed grains use separate CTEs
G007HIGHValidation queries use a different access path than the report SQL
G010MEDIUMCardinality of every join key is confirmed or a check query is provided
G011MEDIUMAny DISTINCT is accompanied by a root-cause note, not just applied silently

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.