structural-modeling

A guide to building and estimating economic models whose parameters represent underlying behaviour, rather than only describing correlations. It covers demand, dynamic decisions, auctions, moment conditions, and numerical estimation methods.

In plain words
What is it for?
Use it to specify structural models, derive moment conditions, implement NFXP or MPEC estimation, estimate BLP demand, dynamic discrete-choice, and auction models, or choose an estimation approach.
Why use it?
It connects economic theory to estimable equations and helps diagnose convergence problems in models that may require repeated calculations or constrained optimisation.

Skill for Claude CodeCodex

Part of the compound-science plugin — 20 skills shipped together

Install

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.

agentmods
npx agentmods add skills/james-traina/compound-science/structural-modeling
Any agent
npx skills add James-Traina/compound-science --skill structural-modeling
Clone the repo
git clone --depth 1 https://github.com/James-Traina/compound-science

Made for: Claude Code, Codex.

Or install compound-science, the plugin that ships this one along with the rest of its 20 skills.

Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00128 $0.02514
Opus 5 $0.00064 $0.01257
Sonnet 5 $0.00026 $0.00503
Haiku 4.5 $0.00013 $0.00251

Measured 3d ago against content hash 8321fb9befe1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

structural-modeling 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 3d 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.

skills/structural-modeling/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Structural Modeling

Reference for implementing structural econometric models: from economic model to moment conditions to estimated parameters. Covers the full workflow of taking a theoretical model, deriving its empirical content, and recovering structural parameters from data.

When to Use This Skill

Use when the user is:

  • Specifying a structural model and deriving moment conditions
  • Implementing NFXP or MPEC estimation routines
  • Working with BLP-style demand systems (random coefficients logit)
  • Building dynamic discrete choice models (Rust, Hotz-Miller CCP)
  • Estimating auction models (first-price, ascending, common value)
  • Debugging convergence failures in structural estimation
  • Choosing between estimation approaches for a given model

Skip when:

  • The task is reduced-form causal inference (use causal-inference skill)
  • The task is pure simulation design (use numerical-auditor agent)
  • The user just needs standard regression (statsmodels/linearmodels suffice)

Quick Reference: Structural Methods

Method Use Case Key Package Estimator
NFXP Dynamic discrete choice (small state space) scipy.optimize MLE / GMM
MPEC Dynamic discrete choice (large state space, slow inner loop) cyipopt (IPOPT) MLE / GMM
BLP Differentiated products demand with RC logit pyblp GMM (2-step)
CCP (Hotz-Miller) Dynamic models, counterfactuals not needed scipy 2-step semiparametric
GPV First-price auctions, nonparametric values scipy Nonparametric
Ascending auction English auctions, private values scipy MLE on order statistics

The Structural Estimation Workflow

Every structural estimation follows the same logical arc:

Economic Model → Equilibrium/Decision Rule → Observable Implications
    → Moment Conditions → Estimator → Optimization → Inference

Step 1: Model Specification

Define primitives clearly before writing any code:

Read the full file on GitHub · 198 lines

Files

What ships with it

3 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.

Changes

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.

  1. 3d ago First seen · 198 lines · 128 tokens per session scan A 8321fb9befe1

Subscribe to this mod's changes

structural-modeling is a skill published in the GitHub repository James-Traina/compound-science (13 stars, last pushed 5mo ago), licensed MIT. It adds 128 tokens to every session and 2,514 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens

auditing-subgroup-fairness

Audit an OpenMed NER or de-identification model for performance disparities across demographic subgroups (sex, age band, race/ethnicity when available) using openmed.eval.fairnessreport. Use when the user wants per-subgroup recall and leakage, wants to check whether de-identification under-protects a group, wants to…

maziyarpanahi/openmed · 148 tokens

overleaf-sync

Two-way sync between a local paper directory and an Overleaf project, so ARIS audit/edit workflows stay on the local copy while collaborators edit in the Overleaf web UI. Use when user says "同步 overleaf", "overleaf sync", "推送到 overleaf", "connect overleaf", "Overleaf 桥接", "pull overleaf", "push overleaf", or wants to…

wanshuiyin/Auto-claude-code-research-in-sleep · 97 tokens

mixed-precision

Use FP16/BF16 mixed precision to accelerate training and reduce memory. Use when optimizing GPU performance.

aiming-lab/AutoResearchClaw · 25 tokens