/dataproduct-builder-dbt:dataproduct-exampledatafrom dataproduct-builder-dbt
Extracts a small sample of rows from a dbt output port using a non-production profile, scrubs PII/sensitive columns per the data contract, and uploads the scrubbed sample to Entropy Data via the entropy-data CLI.
Ships in dataproduct-builder-dbt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Sample rows let prospective consumers evaluate a data product without requesting access. This skill pulls a small sample from a non-production source, scrubs sensitive columns, and uploads the result.
${PLUGIN_ROOT}below refers to the root of this plugin — the directory that containsskills/. On Claude Code it is set automatically as${CLAUDE_PLUGIN_ROOT}— use that. On any other agent (Codex, Copilot CLI, etc.) it is unset; resolve it as../..relative to thisSKILL.mdfile's directory (i.e. the grandparent ofskills/<this-skill>/).
Before running Step 0, print this plan to the user verbatim:
Running dataproduct-exampledata. I'll:
- Pre-checks: dbt project, ODCS files,
entropy-dataCLI, non-prod dbt target.- Identify the output port and its contract.
- Build a scrub plan — drop PII/sensitive columns, hash IDs, drop free text. Wait for your confirmation.
- Extract ~20 sample rows via
dbt showagainst the non-prod target.- Build the example-data YAML and show the first rows. Wait for your confirmation.
- Upload via
entropy-data example-data put.- Summarize what was uploaded, what was scrubbed, and cleanup options.
Then proceed.
dbt_project.yml exists at the working directory root.models/output_ports/.uv run --quiet entropy-data --version succeeds from the project root. If it fails, run uv sync and retry; if still missing, stop and tell the user to verify entropy-data is listed in pyproject.toml's [dependency-groups].dev. Use uv run entropy-data … for every CLI invocation in this skill.test, dev, or similar). Inspect profiles.yml if accessible; otherwise ask. Never use a prod target in this skill.If multiple output ports exist, ask which one. For each candidate, you need:
OUTPUT_PORT_ID (from <id>.odps.yaml)models/output_ports/v<N>/<file>.odcs.yamlRead the contract's field list. For each field, decide what to do with it:
| Contract signal | Action |
|---|---|
classification: pii (or confidential, restricted) | Drop the column from the sample |
Field name matches obvious PII patterns (email, phone, ssn, passport, dob, birth_date, iban, address, name, first_name, last_name) and no classification | Treat as PII, drop unless the user explicitly opts in |
tags containing pii / sensitive / gdpr | Drop |
| Numeric ID that could be a customer/user identifier | Hash with a one-way function and prefix sample_ |
Free-text comment/note/description columns | Drop unless the user explicitly opts in (free text often leaks PII not declared in the contract) |
| Everything else | Keep |
Show the user the scrub plan as a table — column → action — and wait for confirmation before extracting any data.
Build the SQL:
select <kept-and-hashed-columns>
from <contract-server-table>
limit <N>;
Default N = 20. Use the dbt non-prod target chosen in Step 0. Preferred extraction methods, in order:
dbt show --inline "<sql>" --target <non-prod-target> — uses the dbt connection, no extra credentials needed.Convert the result rows into a list of objects keyed by the contract column names (the names that will be visible to consumers, not the warehouse aliases). Hold the rows in memory as ROWS for the next step — do not write a CSV. The entropy-data example-data put command takes a YAML/JSON body, not a CSV.
Construct the document the CLI expects:
id: <DATA_PRODUCT_ID>-<OUTPUT_PORT_ID>
dataProductId: <DATA_PRODUCT_ID>
outputPortId: <OUTPUT_PORT_ID>
dataContractId: <CONTRACT_ID>
schemaName: <model name from the ODCS `models:` block>
data:
- { <col>: <val>, ... } # one entry per row from ROWS
- ...
Field semantics confirmed against entropy-data example-data list -o json: the ID convention is <dataProductId>-<outputPortId>; schemaName is the contract's top-level models: key (the table name as the contract names it).
Write the document to examples/<DATA_PRODUCT_ID>-<OUTPUT_PORT_ID>.yaml (create examples/ if missing; add examples/ to .gitignore if absent).
Print the first 5 rows of data: in a Markdown table. Re-state the dropped columns. Wait for explicit user confirmation before uploading.
entropy-data example-data put <DATA_PRODUCT_ID>-<OUTPUT_PORT_ID> \
--file examples/<DATA_PRODUCT_ID>-<OUTPUT_PORT_ID>.yaml
Notes on the CLI shape (verified against entropy-data example-data put --help):
--data-product / --output-port flags. By convention it is <dataProductId>-<outputPortId>; this must also match the id: field inside the document.--file accepts JSON or YAML, or - for stdin.put is upsert — running it again replaces the previous sample for that id.If the CLI errors, surface the actual error and the relevant --help output to the user — do not improvise a different command.
End with this two-part recap. Use the same Status enum the other skills use: created, updated, already present, deferred, skipped.
Part 1 — outcome table.
| Artifact | Status | Details |
|---|---|---|
| Output port | already present | <DATA_PRODUCT_ID>/<OUTPUT_PORT_ID> |
| Scrub plan | … | <dropped-count> dropped, <hashed-count> hashed, <kept-count> kept |
| Sample extraction | … | <rows> rows via dbt show (target <non-prod-target>) |
| Example-data file | … | examples/<DATA_PRODUCT_ID>-<OUTPUT_PORT_ID>.yaml |
| Upload to Entropy Data | … | entropy-data example-data put succeeded (upsert) |
Part 2 — next steps. Bullet list:
examples/<DATA_PRODUCT_ID>-<OUTPUT_PORT_ID>.yaml if it contains anything the user doesn't want left on disk.If there is nothing additional to surface, write a single line: No further action required.
test/dev only. If only a prod profile exists, stop and tell the user to set up a non-prod target first.examples/ belongs in .gitignore. The uploaded copy is the system of record.entropy-data example-data put is upsert and will overwrite the previous sample for the same id (<dataProductId>-<outputPortId>). Mention this in the final report so the user knows the prior sample is gone.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub entropy-data/dataproduct-builder-dbt --plugin dataproduct-builder-dbt8 skills in this plugin
/datacontract-editEdit an output-port ODCS file under models/output_ports/v<N>/, run the contract test against the live data, and classify any failures as breaking or non-breaking changes — with suggested fixes. Only edits output-port contracts (the spec this data product commits to); input-port contracts under models/input_ports/ are upstream's responsibility and refreshed by dataproduct-implement. Trigger when the user asks to "add/remove/change a column in the data contract", "update the data contract", or "test contract changes"./datacontract-testRun the Data Contract CLI (`datacontract test`) against ODCS contracts in the project to verify the live data still conforms — schema, quality rules, and freshness. Handles two kinds of contracts with different semantics: output-port contracts under `models/output_ports/**/*.odcs.yaml` (tested against this project's warehouse — "am I still producing what I promised?") and input-port contracts under `models/input_ports/*.odcs.yaml` (tested against the upstream warehouse — "is upstream still producing what I trusted?"). Trigger when the user asks to "test the data contracts", "verify the data product matches its contract", "are we still contract-conformant", "check upstream drift", or "run the contract tests".Other plugins' skills for the same job