Seshat-BI: Skill for Claude Code

.claude/skills/retail-validate/SKILL.md

retail-validate is a skill for Claude Code from Kemetra/Seshat-BI. It costs 112 tokens per session (1,272 once invoked), scanned A, original, Apache-2.0.

A read-only check for a materialized retail data table, meaning a table that has been created in a live PostgreSQL database. It runs database checks and explains the findings.

In plain words
What is it for?
Use it after the table’s silver and gold data layers exist to validate or reconcile the table, including when V-RC2, V-RC15, or V-RC16 findings appear.
Why use it?
It shows problems that cannot be proven from SQL files alone, such as issues in the rows actually stored in the database. It also points each finding to the place where it should be fixed.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Kemetra/Seshat-BI's own configuration. It tells Claude Code how to work on Seshat-BI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Seshat-BI configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Kemetra/Seshat-BI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kemetra/Seshat-BI/main/.claude/skills/retail-validate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Kemetra/Seshat-BI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for retail-validate

README.md
[![agentmods](https://agentmods.dev/badge/skills/kemetra/seshat-bi/retail-validate/github.svg)](https://agentmods.dev/skills/kemetra/seshat-bi/retail-validate)
Your own site
<a href="https://agentmods.dev/skills/kemetra/seshat-bi/retail-validate"><img src="https://agentmods.dev/badge/skills/kemetra/seshat-bi/retail-validate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for retail-validate

Your own site · 80×15
<a href="https://agentmods.dev/skills/kemetra/seshat-bi/retail-validate"><img src="https://agentmods.dev/badge/skills/kemetra/seshat-bi/retail-validate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,272 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.01272
Opus 5 $0.00056 $0.00636
Sonnet 5 $0.00022 $0.00254
Haiku 4.5 $0.00011 $0.00127

Measured 9d ago against content hash a1bf65f3d3a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

retail-validate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/retail-validate/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

retail-validate

seshat check proves everything provable from committed text. retail validate proves the four things only a running database can show, on the MATERIALIZED rows (constitution Principle VIII). This skill runs it and maps each finding to the one place to fix it -- the live sibling of retail-govern.

Scope boundary (read first)

Invoke-and-interpret only. This skill runs the live checks and explains findings; it does NOT write or fix silver/gold SQL, does NOT call pbi-cli, and does NOT auto-loop. The live run needs a DB and is the user's call; you report and stop.

Prerequisites

  • silver + gold are materialized for the table.
  • A reviewed mappings/<table>/source-map.yaml exists (the targets are derived from it -- table, PK, FK, measures).
  • The optional db extra is installed (pipx inject seshat-bi psycopg2-binary, or pip install "seshat-bi[db]") and a DSN is configured (DATABASE_URL or the ANALYTICS_DB_* vars in the gitignored .env). Never commit a real DSN.

Run it

retail validate --source-map mappings/<table>/source-map.yaml

The connection is host-agnostic (any Postgres: local / remote / DigitalOcean / other) and READ-ONLY (the session is opened read-only; the checks only SELECT). Exit is non-zero iff any check finds a defect.

Read a finding

Each is a Finding(rule_id, severity, message, locator). Live findings are ERROR (proven defects -- a real PK duplicate, a real orphan, a real penny mismatch), unlike the static rules' WARNING (suspect patterns). Start at the locator; the id tells you which fix applies.

Finding id -> meaning -> where to fix

Finding Means Fix at
V-RC2 PK not unique, or has a NULL, on the materialized silver table (RC2). Fix the grain or dedup in the silver SQL; re-verify the map's PK on the TRANSFORMED output (landed uniqueness is not enough).
V-RC15 The date dimension does not span every fact date -- the calendar has gaps (RC15 coverage; the live half of static rule S7). Widen the generate_series bounds in the date-dim build to cover min..max fact date.
V-RC16 (orphan) A fact FK points outside its dimension (RC16; 0 orphans required). Fix the FK COALESCE to the -1 unknown member, or fix the dimension load so the key exists.
V-RC16 (reconcile) A measure total differs between silver and gold (RC16; must reconcile to the penny). Fix the gold aggregation (a join fan-out or filter is dropping/duplicating rows) until silver and gold totals match exactly.

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 96 lines · 112 tokens per session scan A a1bf65f3d3a2

Subscribe to this mod's changes

retail-validate is a skill published in the GitHub repository Kemetra/Seshat-BI (2 stars, last pushed 7d ago), licensed Apache-2.0. It adds 112 tokens to every session and 1,272 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.