Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

data-contract-extractor

БесплатноБез исполняемых скриптовНе проверен

Use for any question or task about data contracts, including what one should include and formalizing what a dataset promises after an upstream change such as…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

data-contract-extractor

Overview

This skill formalizes the prose of a data PRD into a data contract - the producer/consumer agreement on schema, freshness, volume, semantic invariants, and ownership - that the QA test suite can mechanically assert against, typically via the sibling skills in this plugin (dbt-testing, great-expectations, soda-checks). "Data contract" is practitioner-emergent terminology (Andrew Jones / Chad Sanderson), not ISTQB-canonical; this skill cites industry-engineering sources.

When to use

  • A new data product (dbt model, table, file feed) is being scoped and the team wants assertions before shipping.
  • An existing data product has implicit assumptions consumers rely on; the team is documenting them ahead of a refactor.
  • A PRD or design doc references a dataset and the team needs the schema / SLA pulled out into structured form.
  • A data-quality engineer needs the contract as input to suite generation.

What goes in a data contract

The five required sections, in order of authoring priority:

1. Schema

For each column:

Field Required Notes
Name yes snake_case; matches the warehouse table.
Type yes Warehouse-native type (VARCHAR, BIGINT, TIMESTAMP, etc.).
Nullable yes true / false - the test suite's not_null decision.
PK yes true for primary-key column(s).
Unique yes true for candidate keys (separate from PK).
FK optional If foreign key, the <table>.<column> reference.
PII required Tag values: none, direct (email/name), indirect (zip, dob alone), sensitive (SSN, payment).
Constraint optional Range / enum / regex (per the sibling data-quality-conventions skill).
Description yes One-sentence semantic meaning; not just the type.

2. Freshness SLA

Field Notes
Update cadence daily / hourly / continuous / weekly.
Max staleness The point past which downstream consumers should treat the data as broken (per the sibling data-quality-conventions skill: typically 2× cadence).
Source-of-truth column The timestamp column the freshness check reads (e.g. updated_at, loaded_at, event_time).

3. Volume bounds

Field Notes
Expected min/max Row-count range under normal operation.
Volatility stable / monotonic-growth / cyclical / event-driven.
Recovery action If volume falls outside bounds, what does the consumer do?

4. Distribution invariants

For each business-meaningful column, what must hold:

Field Example
Categorical: accepted values status ∈ {placed, shipped, completed, returned}.
Numeric: range discount_pct ∈ [0, 100].
Frequency / rate cancellation_rate ≤ 5% (rolling 7-day window).

5. Ownership and governance

Field Notes
Producer team Who runs the pipeline.
Owner handle Routing handle (Slack / email) for breaks.
Consumers Known downstream models / dashboards / services.
Versioning How breaking changes are communicated.

Output format

Emit as YAML for direct consumption by dbt / GX / Soda:

# data-contracts/<dataset-slug>.yml
contract_version: 1
dataset:
  name: orders
  description: One row per customer order; updated within 1h of placement.

schema:
  - name: order_id
    type: BIGINT
    nullable: false
    pk: true
    unique: true
    pii: none
    description: Surrogate key.
  - name: customer_id
    type: BIGINT
    nullable: false
    fk: customers.customer_id
    pii: indirect
    description: Customer who placed the order.
  - name: email
    type: VARCHAR
    nullable: false
    pii: direct
    constraint: { format: email }
    description: Customer email at time of order (immutable snapshot).
  - name: status
    type: VARCHAR
    nullable: false
    constraint:
      accepted_values: [placed, shipped, completed, returned]
    description: Current fulfillment status.
  - name: discount_pct
    type: DECIMAL(5,2)
    nullable: true
    constraint: { range: [0, 100] }
    description: Promotion discount applied; null = no promo.
  - name: updated_at
    type: TIMESTAMP
    nullable: false
    description: Last-modified timestamp; freshness source-of-truth.

freshness:
  cadence: hourly
  max_staleness: 2h
  source_column: updated_at

volume:
  min_per_day: 100
  max_pe
Полный SKILL.md на GitHub

Установить data-contract-extractor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonreferences/examples.md

FAQ

Что делает скилл data-contract-extractor?

Use for any question or task about data contracts, including what one should include and formalizing what a dataset promises after an upstream change such as a renamed column broke consumers. Reads a data PRD, dataset README or lineage doc and writes the contract: schema with types, nullability and PII flags, freshness SLA, volume bounds, distribution rules and owner, for dbt, Great Expectations or Soda.

Как установить скилл data-contract-extractor?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-contract-extractor запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить data-contract-extractor с