Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/lancegui/causal-powers/data-contractsnpx skills add lancegui/causal-powers --skill data-contractsgit clone --depth 1 https://github.com/lancegui/causal-powersWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00193 | $0.04584 |
| Opus 5 | $0.00097 | $0.02292 |
| Sonnet 5 | $0.00039 | $0.00917 |
| Haiku 4.5 | $0.00019 | $0.00458 |
Grade A, and why
data-contracts 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Data Contracts
Overview
A number you computed but never validated is a guess wearing a lab coat.
Core principle: Lock in what must be true before you trust what you discovered.
This is the checker: it asserts invariants and reconciles totals, it does not plan or run the work. Its complement is the doer — data-preparation calls this skill per ingest/join/dedup/recode step, executing-analysis-plans calls it on every spine step and fanned-out spec — but you also reach for it directly the moment you're about to trust a number or do a join.
This is the data-analytics counterpart of test-driven development, adapted for the one way it doesn't transfer: TDD asserts the exact output before implementing, but in analysis the output is the unknown — you cannot assert mean == 42.3 before computing it. The discipline underneath still transfers, and matters more here.
Why analysis breaks naive TDD (and why you still need its spirit)
In software the dangerous bug usually throws — a stack trace, a red test, something loud. In analysis the dangerous bug is silent: a join fans out, an NA poisons a mean, units are off by 100×, train/test overlap — the code runs cleanly and hands you a confident, wrong answer, no error raised (the full catalog of these is below). So we move the discipline from "assert the answer first" (impossible — computing the number IS the point) to "assert everything around the answer that must hold regardless of the answer." Those are your data contracts and invariants, checkable before you know the result and again after — exactly the leverage test-first gives you in software.
Two regimes — know which one you're in
1. Exploration (EDA, plotting, trying models). Forcing test-first here is theater — the rule that applies instead: validate the inputs before trusting any output, and check intermediate results at every step. Trust nothing you haven't looked at.
2. Reusable rules (a cleaning step, metric definition, transform, feature pipeline). Here you do know the rule, so real test-first applies: hand-build a tiny fixture with a known answer, write the check, watch it fail, then implement. A metric definition without a test is a rumor.
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.
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.
- 2d ago First seen · 180 lines · 193 tokens per session scan A 493ac471491c
data-contracts is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 9d ago), licensed MIT. It adds 193 tokens to every session and 4,584 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.
Other skills, from other repositories
audit-reproducibility
Enforce the replication-protocol.md rule by cross-checking numeric claims in a manuscript against the actual R / Stata / Python outputs. Report PASS/FAIL per claim against tolerance thresholds. Use before submission and before releasing a replication package.
diagnose
Root-cause a failing or wrong empirical result with a disciplined reproduce → minimise → hypothesise → instrument → fix loop, instead of guessing-and-poking. Use when the user says "why is my regression wrong", "this number changed", "my script errors out", "the result won't reproduce", "debug this", "this estimate…
capture-environment
Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt / environment.yml / uv.lock, Stata version + ado package list), records seeds and RNG kind, optionally writes a pinning…
checkpoint
Save a structured state snapshot before stopping or handing off. Captures the active plan, recent decisions, file pointers (with line numbers), open questions, and the next 1–3 actions into a checkpoint file under qualityreports/checkpoints/. Optionally proposes [LEARN] entries to add to MEMORY.md. Use when user says…
coauthor-brief
Generate a co-author / collaborator handoff brief for a multi-author, multi-machine project — summarizing what changed since the last brief (git delta), the current state of each artifact (manuscript, analysis, slides), open questions, how to reproduce locally, and any restricted-data access steps. Use when user says…
data-management-plan
Draft a funder-compliant Data Management Plan (NSF DMP, NIH DMS Policy 2023, ERC, Horizon Europe) by composing the confidential-data and environment-capture primitives. Sections cover data description, formats/metadata, storage/backup, access/sharing, preservation/archiving, and roles. Use when user says "data…