policyengine-core

Execute vectorized policy simulations for tax and benefit calculations.

31|6|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policyengine-core
Source: https://github.com/PolicyEngine/policyengine-claude/tree/main/skills/policyengine-core-skill
Command: npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy.

What problem does it solve?

Building a robust, high-performance microsimulation engine capable of handling complex tax and benefit rules across multiple entities and time periods is a significant engineering challenge. PolicyEngine Core provides this foundational engine, ensuring accuracy, consistency, and performance for all calculations.

Core Features & Use Cases

  • Simulation Engine: Processes tax rules, manages variables, parameters, and entity relationships (person, family, household, tax unit).
  • Vectorized Operations: Designed for high performance by processing many households simultaneously.
  • Automatic Dependency Resolution: Automatically resolves variable dependencies, ensuring calculations are performed in the correct order.
  • Formula Caching: Caches calculation results to speed up repeated requests.
  • Use Case: Understand how a country package (like policyengine-us) defines a variable like income_tax, and how PolicyEngine Core automatically resolves its dependencies on adjusted_gross_income and standard_deduction.

Quick Start

Use the policyengine-core skill to understand how the Variable class is implemented in the core engine.

Frequently Asked Questions about policyengine-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a microsimulation engine that handles tax and benefit calculations across multiple entities?

PolicyEngine Core is a microsimulation engine that executes policy simulations by applying tax and benefit rules across entities like persons, families, and households over multiple time periods. It automates variable dependency resolution and caches results for high-throughput vectorized calculations.

Can I use vectorized operations to process thousands of households simultaneously in policy simulations?

Yes. PolicyEngine Core processes many households simultaneously through vectorized operations, designed for high performance. It automatically resolves variable dependencies in the correct calculation order and caches results to speed up repeated requests.

How does automatic dependency resolution work in tax and benefit rule calculations?

PolicyEngine Core automatically resolves variable dependencies, ensuring calculations execute in the correct order. For example, it traces how `income_tax` depends on `adjusted_gross_income` and `standard_deduction`, then calculates prerequisites before dependent variables.

What's the best way to manage entity relationships and time periods in policy microsimulation?

PolicyEngine Core manages complex entity relationships (person, family, tax unit, household) and handles period-based calculations (e.g., 2024–2025). It provides rule-based, transparent calculations with built-in variable and parameter management across these dimensions.

Do I need to manually cache formula results in high-performance policy calculations?

No. PolicyEngine Core includes automatic formula caching to speed up repeated requests, eliminating manual cache management for policy simulations across web, Python packages, and API workflows.

Can PolicyEngine Core integrate with country-specific tax and benefit packages?

Yes. PolicyEngine Core powers country packages like `policyengine-us` by providing the foundational simulation engine. Country packages define variables and rules; the core engine handles dependency resolution, vectorization, and calculation logic consistently across contexts.