policyengine-microsimulation
ALWAYS USE THIS SKILL for PolicyEngine microsimulation, population-level analysis, winners/losers calculations. Use this skill's code pattern, but explore the codebase to find specific parameter paths if needed.
npx skills add majiayu000/claude-skill-registry --skill policyengine-microsimulation-skill --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PolicyEngine Microsimulation ## Documentation References - **Microsimulation API**: https://policyengine.github.io/policyengine-us/usage/microsimulation.html - **Parameter Discovery**: https://policyengine.github.io/policyengine-us/usage/parameter-discovery.html - **Reform.from_dict()**: https://policyengine.github.io/policyengine-core/usage/reforms.html ## CRITICAL: Use calc() with MicroSeries - No Manual Weights Ever **MicroSeries handles all weighting automatically. Never access .weights or do manual weight math.** ```python # ✅ CORRECT - MicroSeries handles everything change = reformed.calc('household_net_income', period=2026, map_to='person') - \ baseline.calc('household_net_income', period=2026, map_to='person') loser_share = (change < 0).mean() # Weighted automatically! # ❌ WRONG - never access .weights or do manual math loser_share = change.weights[change.values < 0].sum() / change.weights.sum() ``` ## Quick Start ```python from policyengine_us import Microsimulation from policyengine_core.reforms import Reform baseline = Microsimulation() reform = Reform.from_dict({ 'gov.irs.credits.ctc.amount.base[0].amount': {'2026-01-01.2100-12-31': 3000} }, 'policyengine_us') reforme
- Documentation References
- CRITICAL: Use calc() with MicroSeries - No Manual Weights Ever
- Quick Start
- Available Datasets (HuggingFace)
- Key MicroSeries Methods
- Finding Parameter Paths
grep -r "salt" policyengine_us/parameters/gov/irs/ --include="*.yaml"
What does the policyengine-microsimulation skill do?
ALWAYS USE THIS SKILL for PolicyEngine microsimulation, population-level analysis, winners/losers calculations. Use this skill's code pattern, but explore the codebase to find specific parameter paths if needed.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill policyengine-microsimulation-skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
