/poka-yoke:datafrom Poka-Yoke
Catches silent data bugs in pipelines, dbt models, and warehouses before they reach dashboards. Covers freshness, volume, schema, and reconciliation checks.
Ships in Poka-Yoke. 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.
Data systems fail differently from application code, and that difference determines every device here. An application bug throws an exception, pages someone, and gets fixed. A data bug produces a number. The number looks fine. Someone makes a decision with it. Three weeks later a person notices revenue looks odd, and now you have three weeks of decisions to unwind and no way to know which were wrong.
In data, silence is the defect. A pipeline that fails loudly is working correctly. A pipeline that succeeds while producing garbage is the thing to design against, so most devices here are about converting silent wrongness into loud failure, which in Shingo's terms is buying yourself a Warning rung where you currently have nothing at all.
Run these over any table or model. They map onto the standard lenses but the data-specific phrasing is what finds things.
Is it there? (freshness), Did the data arrive at all, and recently enough to be worth trusting? A stale table is the most dangerous artifact in a warehouse because it looks completely healthy. Every table needs a max-age assertion, and dashboards should surface last-updated rather than hiding it.
Is there the right amount? (volume, fixed-value lens), Row counts against expectation. This catches the breakages that leave every individual row looking fine: a partial load, a filter that silently matched nothing, a join that fanned out 100x. Assert both a floor and a ceiling, and compare against the same weekday historically rather than against yesterday: most business data is weekly-seasonal and a naive day-over-day check will cry wolf every Monday.
Is it shaped right? (schema and validity, contact lens), Types, nullability, accepted
value sets, ranges. Negative quantities, percentages above 100, timestamps in the future,
currency codes that don't exist, a status value nobody has seen before.
Does it agree? (reconciliation), Does the warehouse total match the source system?
Does the sum of the parts match the whole? This is the only check that catches a logic error
the data still looks well-shaped after, everything above validates shape, and a wrong JOIN
produces perfectly well-shaped, wrong data. It catches what moves a total, not a
mis-attribution that nets out. If you install one device, install this one on your
revenue-critical tables.
Where the warehouse supports it, NOT NULL, UNIQUE, CHECK, and primary keys are Control:
the bad row cannot be written. A dbt test is Detection: the bad row is already in the table
and possibly already in a dashboard. Prefer the constraint; use the test where the engine
gives you nothing better, which in several columnar warehouses is most of the time, say so
explicitly rather than pretending a test is prevention.
The most common pipeline break is upstream changing a column without telling anyone. A contract makes that break loud and attributable:
except: pass: the pipeline goes green while the
numbers go wrong. Route bad rows to a dead-letter table with the reason, alert on the rate,
and keep them for inspection.Every incremental job should be safe to re-run over the same window. Pipelines get retried, by the scheduler, by an on-call engineer, by a backfill, and a non-idempotent load double-counts, which is a silently wrong number of exactly the worst kind.
The device: partition-level replace, or MERGE on a real business key, rather than blind
INSERT. Then a re-run converges rather than accumulating.
Backfills are the data world's destructive operation. Before running one:
If "active user" is defined in the dashboard, the model, and an analyst's spreadsheet, you have three metrics with one name and they will disagree, usually in a meeting. Define each metric once, in version-controlled code, and have every consumer reference that definition. A metric redefined in a BI tool is a copy that will silently drift.
The check must be able to stop the pipeline, not just report. A test suite that runs after publication and emails a failure lets bad data reach the dashboard, which is the whole problem. Assert between load and publish: build to staging, test staging, promote only on pass. That ordering is the single most valuable structural change in most warehouses, and it costs no new tooling.
Read the DAG or the model files and work outward from what matters:
WHERE clauses
filtering nulls, try/except around row parsing, on_error='ignore'. Each is a place the
count quietly shrinks.Report with the structure from audit, and be explicit about the rung, in data,
most devices you can actually install are Warning or Detection, and claiming Control for a
dbt test overstates the protection.
When numbers have been wrong, the instinct is to find who wrote the bad join. Same rule as everywhere else in this plugin: the finding is that the pipeline could produce a wrong number without anyone noticing. That is a missing assertion, not a missing person.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/agent-guardrailsStop an AI agent damaging your repo: PreToolUse hooks, permission deny rules, protected paths, verification gates. Use when "claude keeps force pushing", "CLAUDE.md says X but it still does Y", "stop the agent touching prod or .env", or making a repo safe for unattended agent work. For AI features you ship to users use llm./auditFind footguns in code that already exists: swappable arguments, silent fallbacks, unguarded deletes, signatures that are easy to misuse. Use when someone asks "what could bite us here", "what is easy to misuse", "poka-yoke this repo", or wants a diff or PR reviewed for ways to get it wrong. Ranks by blast radius. For code not yet written use design; for something that already broke use retro./npx claudepluginhub rainmanjam/poka-yoke --plugin poka-yokeOther plugins' skills for the same job