Seshat-BI: Skill for Claude Code

.claude/skills/kpi-contract-builder/SKILL.md

kpi-contract-builder is a skill for Claude Code from Kemetra/Seshat-BI. It costs 206 tokens per session (1,569 once invoked), scanned A, original, Apache-2.0.

A guided workflow for turning a planned retail KPI (key performance indicator) into a metric contract: a documented definition with an owner, approved decisions, and supporting source evidence.

In plain words
What is it for?
Use it to assess and preview a contract for a planned or custom retail KPI, then draft the project metric contract once the required approvals and evidence exist.
Why use it?
It prevents a metric from being drafted before its meaning, owner, and data sources are agreed. It also shows which decisions still need approval.

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/kpi-contract-builder/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 kpi-contract-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/kemetra/seshat-bi/kpi-contract-builder/github.svg)](https://agentmods.dev/skills/kemetra/seshat-bi/kpi-contract-builder)
Your own site
<a href="https://agentmods.dev/skills/kemetra/seshat-bi/kpi-contract-builder"><img src="https://agentmods.dev/badge/skills/kemetra/seshat-bi/kpi-contract-builder/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 kpi-contract-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/kemetra/seshat-bi/kpi-contract-builder"><img src="https://agentmods.dev/badge/skills/kemetra/seshat-bi/kpi-contract-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 206 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,569 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.00206 $0.01569
Opus 5 $0.00103 $0.00785
Sonnet 5 $0.00041 $0.00314
Haiku 4.5 $0.00021 $0.00157

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

Security

Grade A, and why

kpi-contract-builder 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 10d 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/kpi-contract-builder/SKILL.md · 118 lines

How it starts

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

kpi-contract-builder

This skill is the agent-facing front door to the shipped kpi_contracts stage. It does NOT reimplement contract authoring: the shipped kpi_contracts engine and its kpi_answerability scorecard already exist (spec 124). This skill DRIVES them and adds the first-contact assessment the engine deliberately refuses to do.

When to use

  • Someone asks to draft / author / start a metric contract for a KPI that the registry marks planned (no seeded contract yet), or for a user-supplied custom KPI.
  • You are at the kpi_contracts flow stage (downstream of business-knowledge-interview, upstream of silver/gold model planning).

Do NOT use it to define DAX (retail generate), to check a PBIP model (retail semantic-check), or to run the interview itself (business-knowledge-interview).

The two-trip flow

The shipped draft_project_metric_contract REQUIRES an approved decision, a named owner, and committed source evidence; without them it raises ContractDraftRefused. So the flow has two trips.

Trip 1 -- Assess & preview (the common first-contact case; writes nothing)

  1. Identify the KPI. Registry-known -> resolve its generic_kpi_ref: KPI-MC-NN from the retail-kpi-knowledge registry (custom: false). User-supplied -> custom: true, no ref, no suggested id.
  2. Read the source-coverage signal (read-only). NOTE: for a lifecycle: planned registry entry -- the primary case for this skill -- derive_answerability short-circuits to Planned before it inspects source roles, mapped concepts, domain, or evidence, so its status alone CANNOT tell you which fields are present. For a planned KPI, take the coverage signal from the registry entry's own blockers and source_roles / required_concepts metadata (and a committed source profile / source-map, if present) -- that is what surfaces a binds_to gap. Use derive_answerability / render_answerability_artifact only for its designed purpose (a coverage scorecard for SEEDED KPIs); consume it read-only, never persist or re-decide it -- contract authoring is a separate concern.
  3. Check the Decision Store for the required kpi_definition + applicable policy_ruling decisions. If any is missing/unapproved, do NOT call the engine (it will raise).
  4. Render a PREVIEW: the contract's business body (clean; no provenance inside values) + a field_provenance block + the gap list.
  5. Emit the decision-gap list: the exact kpi_definition / policy_ruling decisions to get approved (route to business-knowledge-interview) and the owner to name. STOP. Write no YAML.

Read the full file on GitHub · 118 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 118 lines · 206 tokens per session scan A 2773fa5b4ea3

Subscribe to this mod's changes

kpi-contract-builder is a skill published in the GitHub repository Kemetra/Seshat-BI (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 206 tokens to every session and 1,569 once invoked, about $0.0010 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.

Related

Other skills, from other repositories

ktx-analytics

Use when answering a question that needs data from a ktx-connected database - investigating, analyzing, "how many", "show me", "what's the breakdown of", finding records by value, exploring tables, comparing periods, explaining metrics, or any data-analysis request. Triggers even when the user does not say…

Kaelio/ktx · 86 tokens

metabase_ingest

Convert Metabase questions, models, and metrics into ktx Semantic Layer source definitions. Covers result-metadata to KSL column type mapping, FK/PK detection, near-duplicate deduplication, pre-aggregation decomposition, join-graph connectivity, and how to react to priorProvenance from earlier ingest syncs. Load when…

Kaelio/ktx · 90 tokens

sl_capture

How to capture new reusable patterns into ktx's semantic layer - when a measure, segment, or join belongs in the catalog and how to write it generically so it stays small and useful over time. Loaded by the post-turn memory-agent only. The research agent does not write to the SL.

Kaelio/ktx · 63 tokens

looker_ingest

Extract durable ktx knowledge and semantic-layer contribution proposals from staged Looker runtime dashboard, Look, and explore JSON. Load for WorkUnits whose raw files are under explores/, dashboards/, or looks/.

Kaelio/ktx · 44 tokens

metricflow_ingest

Map a MetricFlow semanticmodel or metric into ktx semantic layer sources. Covers the MetricFlow to ktx primitive table, extends: inheritance flattening, metric-type handling (simple / derived / ratio / cumulative / conversion), model: ref('x') resolution, and four worked examples. Load when the turn contains…

Kaelio/ktx · 0 tokens

lookml_ingest

Map a LookML view/model/explore into ktx semantic layer sources. Covers the LookML to ktx primitive table, provenance tagging, and three worked examples (overlay, standalone from derivedtable, standalone with sqlalwayswhere). Load when the turn contains .lkml content.

Kaelio/ktx · 63 tokens