retail-validate

Runs live read-only validation checks against materialized retail tables in Postgres and maps findings to fixes.

2|Updated Jun 22, 2026
One-click install
npx skills add https://github.com/Kemetra/Seshat-BI --skill retail-validate-kemetra
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: retail-validate
Source: https://github.com/Kemetra/Seshat-BI/tree/main/.claude/skills/retail-validate
Command: npx skills add https://github.com/Kemetra/Seshat-BI --skill retail-validate-kemetra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psycopg2-binary.

What problem does it solve? Static checks on committed SQL cannot prove that a materialized warehouse table is actually correct. This Skill runs the live database checks that only a running Postgres can answer — primary key uniqueness, date dimension coverage, foreign key orphans, and silver-to-gold reconciliation — and interprets each finding so you know exactly where to fix it. ## Core Features & Use Cases - Live validation run: Executes retail validate against a materialized silver/gold table using a reviewed source map, with a read-only, host-agnostic Postgres connection. - Finding interpretation: Maps each finding id (V-RC2, V-RC15, V-RC16 orphan, V-RC16 reconcile) to its meaning and the exact place to fix it, from silver SQL grain fixes to gold aggregation corrections. - Deferred-mode reporting: When no DSN or db extra is configured, reports the enable steps instead of faking a pass. - Use Case: After building silver and gold layers for a retail sales table, ask the agent to validate the table; it runs the live checks, reports a V-RC16 orphan finding with its locator, and directs you to fix the FK COALESCE to the -1 unknown member. ## Quick Start Ask the agent to validate the materialized retail table using its source map and interpret any findings it reports.

Frequently Asked Questions about retail-validate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a materialized retail table against a live Postgres database?▼

Run `retail validate --source-map mappings/<table>/source-map.yaml` after silver and gold are materialized. The connection is read-only and host-agnostic, and the command exits non-zero if any check finds a defect.

What does a V-RC16 finding mean in retail validation?▼

V-RC16 has two forms: an orphan means a fact foreign key points outside its dimension, fixed via the FK COALESCE to the -1 unknown member; a reconcile finding means silver and gold measure totals differ, fixed in the gold aggregation until totals match to the penny.

What is the difference between static rule S7 and live check V-RC15?▼

S7 proves the date dimension is built from generate_series (the pattern), while V-RC15 proves the calendar actually spans every fact date (coverage). Both halves of RC15 must hold for the date dimension to be valid.

Why does retail validate report enable steps instead of running checks?▼

When no DSN is configured or the db extra is missing, the live boundary is user-supplied by design, so it prints the enable steps instead of faking a pass. Install psycopg2-binary and set DATABASE_URL or the ANALYTICS_DB_* variables in the gitignored .env.

Does retail validate fix the defects it finds automatically?▼

No. It is invoke-and-interpret only: it runs the live checks, reports failing ids with locators, and names the one fix each needs. Silver fixes go to warehouse SQL, gold fixes to the gold build, and re-running to confirm green is the user's call.