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/structural-estimationnpx skills add lancegui/causal-powers --skill structural-estimationgit 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.00213 | $0.04708 |
| Opus 5 | $0.00106 | $0.02354 |
| Sonnet 5 | $0.00043 | $0.00942 |
| Haiku 4.5 | $0.00021 | $0.00471 |
Grade A, and why
structural-estimation 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 yesterday.
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 — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Structural Estimation
Overview
Reduced form measures a relationship that held in the data. Structural estimation recovers the primitives — preferences, costs, information, and conduct — that generated the data, so you can ask what happens in a world that hasn't occurred: a merger, a new product, a tax, a removed search friction, an entrant's consumer surplus. The failure mode mirrors reduced form's: there, confounding masquerades as an effect; here, a misspecified model fits in-sample and lies confidently out-of-sample, or a parameter the data can't identify still gets a number from the optimizer. A clean estimation run earns nothing on its own — the model can converge beautifully and be wrong about every counterfactual you built it to answer.
Core principle: structural estimation buys policy-invariant primitives at the price of assumptions the data cannot test. Earn that price — justify the model over reduced form, name what identifies each parameter, prove the algorithm recovers truth, and stress every counterfactual against the assumption it leans on hardest.
Reduced form or structural? — choose the workflow before you model
This is the fork. These questions decide which of the three arms you're in:
- Does the decision live inside the support of the data? "What was the effect of the price cut we ran?" "Did the policy work?" → reduced form — a well-identified DiD/IV/RDD answers it and is more credible for leaning on fewer assumptions. Use
causal-identification. - Does the decision require a world you haven't observed, a welfare number, or a mechanism the data can't separate? "What price would the merged firm set?" "How much of low uptake is taste vs. not knowing the product exists?" "What's the consumer surplus from a new entrant?" → structural — the reduced-form relationship shifts when the policy changes (the Lucas critique), so there's no coefficient to extrapolate. Use this skill.
- Is the goal a prediction to act on, not an effect at all? ("which unit to flag/score/rank") → neither causal arm — use
predictive-modeling. (Route by goal, not algorithm: ML used to estimate an effect still belongs to the causal arms.)
What ships with it
2 files 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.
- yesterday First seen · 158 lines · 213 tokens per session scan A e88afe399e27
structural-estimation is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 8d ago), licensed MIT. It adds 213 tokens to every session and 4,708 once invoked, about $0.0011 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…
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…
disclosure-check
Pre-screen analysis outputs (tables, figures, logs) built on restricted or confidential data for statistical-disclosure-limitation problems before any release. Scans for small cell counts, complementary-suppression gaps, dominance (p-percent / (n,k)), re-identifiable exact counts, PII leakage, and unrounded sensitive…