PolicyEngine
- 23 skills
- 0 followers
- 8 hours ago last updated
- ▌ Fix Pr · policyengine bundleUse when the user invokes $fix-pr or asks Codex or Claude Code to apply fixes to a PolicyEngine PR based on $review-program findings, GitHub review comments, CI failures, or local review reports.
- ▌ Policyengine · policyengineALWAYS load this skill before writing any Python that computes taxes, benefits, or policy impacts with PolicyEngine — household calculations, microsimulation, reform scoring, poverty or distributional analysis, state/district/constituency breakdowns. Triggers: policyengine, microsimulation, calculate_household, reform impact, budgetary impact, cost of a policy, revenue estimate, poverty rate, child poverty, winners and losers, decile, Gini, inequality, CTC, EITC, SNAP, income tax, universal credit, state-level analysis, congressional district, constituency, Microcosm (formerly Populace) dataset, MicroSeries, ensure_datasets, economic_impact_analysis, managed_microsimulation. NOT for: implementing new variables/parameters inside country models (use policyengine-model-development) or calling the REST API from JS (use policyengine-api).
- ▌ Review Program · policyengine bundleALWAYS LOAD THIS SKILL for PolicyEngine PR reviews, including when the user invokes $review-program or Codex /review on a PolicyEngine PR. Performs read-only code validation, source-reference checks, regulatory review, optional PDF audit, summary reporting, and optional GitHub comment posting.
- ▌ Policyengine Uk · policyengineLoad before writing PolicyEngine-UK code — UK household calculations, income tax (incl. Scottish and Welsh variations), National Insurance, Universal Credit and other benefits, poverty and reform analysis. Covers the person/benunit/household entity model (UK has NO tax_unit), pe.uk.calculate_household, BHC vs AHC poverty, ITL1 regions, populace_uk_2023 data, and the policyengine_uk Scenario surface for country-model development. Triggers: Microcosm (formerly Populace), policyengine uk, pe.uk, Universal Credit, child benefit, pension credit, housing benefit, council tax, income tax, national insurance, personal allowance, Scottish income tax, Welsh rate, benunit, hbai, in_poverty_bhc, in_poverty_ahc, ITL1 region, populace_uk, HUGGING_FACE_TOKEN, UK reform, Scenario. NOT for: US or Canada models (see policyengine-us / policyengine-canada), general microsimulation mechanics (see policyengine), or implementing new UK variables/parameters inside the model (see policyengine-model-development).
- ▌ Policyengine Us · policyengineUS tax-benefit domain knowledge for analysts computing household or population impacts with the policyengine package (pe.us). Load for: which entity a US program attaches to (tax_unit vs spm_unit vs person), tax-unit role flags and filing status, post-OBBBA current-law values (2026 CTC, standard deduction, SALT cap), the parameter tree (gov.irs / gov.states.{xx} / gov.usda.snap / gov.ssa), state income-tax and credit coverage, and SNAP monthly/FPL semantics. Triggers: EITC, CTC, SNAP, TANF, SSI, income tax, state income tax, standard deduction, SALT cap, federal poverty level, spm_unit, tax_unit, filing status, is_tax_unit_dependent, household_net_income, in_poverty, state credit, CalEITC, ca_eitc, ny_eitc, OBBBA. NOT for: implementing new US variables/parameters (use policyengine-model-development); Medicaid/ACA/CHIP/Medicare (use policyengine-healthcare); the core calculate_household / Simulation / reform mechanics shared across countries (use the policyengine skill).
- ▌ Encode Policy V2 · policyengine bundleUse when the user invokes $encode-policy-v2 or asks Codex or Claude Code to implement a new PolicyEngine-US state benefit program or a new structural program component from official rules. Covers existing-program routing, source collection and selective PDF inspection, user-approved scope, implementation, tests, validation, draft PR preparation, and independent review-fix rounds.
- ▌ Policyengine API · policyengineLoad when consuming or developing the PolicyEngine REST APIs — the v1 Flask API at api.policyengine.org (production today) or the v2 alpha microservices in policyengine-api-v2. Covers the v1 endpoint surface (household calc, economy-over-baseline polling), the v2 architecture (three services, uv/Docker/Cloud Run, OpenAPI client-gen), and when to use REST vs the Python package. Triggers: PolicyEngine API, api.policyengine.org, REST endpoint, household calculate, economy over baseline, v2 API, api-full, api-simulation, api-tagger, OpenAPI client, v2.api.policyengine.org. NOT for: Python analysis (use the policyengine skill) or calling the API from the app frontend (policyengine-app).
- ▌ Policyengine App · policyengineLoad when developing policyengine-app-v2 — the site served at policyengine.org. Covers the bun/turbo monorepo, the Next.js 15 App Router host in website/, the legacy Vite SPA in app/ being migrated, ui-kit + designTokens theming, multizone rewrites, and how the frontend calls the PolicyEngine API. Triggers: policyengine-app-v2, policyengine.org, app-v2, website host, App Router page, server component split, appZoneRoutes, multizone rewrite, designTokens, BASE_URL, household calc from the app, economy over baseline, calculator app, bun run build. NOT for: building a standalone embedded tool (use policyengine-tools), design tokens in isolation (policyengine-design), or the API server itself (policyengine-api).
- ▌ Policyengine Data · policyengineLoad for PolicyEngine's data layer — how the microdata behind population microsimulations is built, calibrated, versioned, and named. Covers the Microcosm stack (Frame kernel, microcosm-fit conditional models, microcosm-calibrate weights with L0 sparsity, build/release gates), the certified datasets that flow into policyengine bundles (populace_us_2024 sparse ~57k default, populace_us_2024_acs_local ~1.6M local-area, populace_uk_2023 private), the "one national dataset filtered by geography" local-area philosophy, the calibration diagnostics dashboard, and where data work goes now that policyengine-us-data is archived. Triggers: Microcosm (formerly Populace), Frame, microcosm-fit, microcosm-calibrate, calibration target, survey weights, reweighting, imputation, QRF, quantile loss, L0 sparsity, sparse 57k, local-area data, ACS, FRS, WAS, enhanced microdata, DEFAULT_DATASET. NOT for: running simulations (see policyengine) or diagnosing a specific score mismatch (see policyengine-calibration-diagnostics).
- ▌ Policyengine Tools · policyengineLoad when building a standalone PolicyEngine interactive tool, calculator, or dashboard that deploys to Vercel and embeds into policyengine.org as a Next.js multizone. Covers the required stack (Next App Router + Tailwind v4 + @policyengine/ui-kit + bun), multizone zone config (basePath/assetPrefix, host rewrites, apps.json), Modal backends (gateway + worker + polling), chart patterns, and the dual-mode SEO strategy. Triggers: new tool, standalone calculator, dashboard, embed in policyengine.org, multizone, basePath, assetPrefix, appZoneRoutes, Modal backend, scale to zero, vercel --scope policy-engine, ui-kit theme.css, recharts colors. NOT for: developing policyengine.org itself (use policyengine-app) or token values (policyengine-design).
- ▌ Policyengine Canada · policyengineHow to compute Canadian household tax/benefit outcomes with PolicyEngine, and the hard limits. Load when a task involves Canadian taxes or benefits (CCB, GST/HST credit, CWB, OAS, provincial tax) at the household level. Key facts: pe.ca does NOT exist — Canada is not in the policyengine wrapper; use the policyengine_canada package directly via Simulation(situation=...); there is no representative microdata (only a synthetic template), so population microsimulation, national costs, and poverty rates are NOT possible — household-level only. Triggers: Canada, Canadian, CCB, Canada Child Benefit, GST credit, HST, GST/HST credit, CWB, Canada Workers Benefit, OAS, GIS, Ontario, Quebec, province, provincial tax, AFNI, full custody, policyengine canada, policyengine_canada. NOT for: US or UK analysis (use policyengine-us / policyengine-uk); anything population-scale for Canada (not supported).
- ▌ Policyengine Design · policyengineLoad when styling any PolicyEngine frontend — choosing colors, fonts, spacing, chart colors, or consuming @policyengine/ui-kit. Covers the two-import globals.css, the three-layer theme.css (@theme vs @theme inline), verified 0.4.0 token values and component exports, the dark-mode contract, and the Plotly chart house style. Triggers: PolicyEngine colors, design tokens, brand palette, teal, CSS variables, theme.css, ui-kit, @theme, @theme inline, dark mode, chart colors, fill var(--chart-1), Plotly format_fig, never hardcode hex, DashboardShell, Header. NOT for: multizone/deploy wiring (use policyengine-tools) or app-v2 internals (policyengine-app).
- ▌ Policyengine Content · policyengine bundleGenerate branded social assets from a PolicyEngine blog post or announcement — 1200x630 social images and platform-optimized post copy for LinkedIn/X, localized for UK/US audiences. Triggers: "make a social image", "social card for this post", "generate content", "LinkedIn post for", "X post for", "promote this blog post", "social copy", "announcement graphic".
- ▌ Policyengine Writing · policyenginePolicyEngine writing style for any public-facing prose — blog posts, research reports, documentation, PR descriptions, social copy, READMEs. Enforces active voice, quantitative precision, sentence-case headings, and the analytical neutrality a nonpartisan 501(c)(3) requires: no policy prescriptions dressed as findings, no speculative claims, no one-sided framing, and explained counterintuitive results. Triggers: "write a blog post", "PolicyEngine blog", "policy analysis writeup", "PR description", "research report", "documentation", "social post", "changelog prose", "sounds like advocacy", "is this neutral", "sentence case", "writing style", "make it quantitative".
- ▌ Policyengine Standards · policyenginePolicyEngine coding standards, environment setup, formatters, changelog, and CI requirements across every repo — what makes a PR pass and merge cleanly. Covers uv + .venv, ruff, bun, towncrier changelog fragments, the "wait for CI" PR pattern, and the repo-rename checklist. Triggers: "CI failing", "linting", "formatting", "before committing", "PR standards", "code style", "ruff", "prettier", "changelog", "towncrier", "create a PR", "wait for CI", "rename a repo", "set up the venv", "which Python version".
- ▌ Policyengine Healthcare · policyengineUS healthcare domain knowledge (Medicaid, ACA premium tax credit, CHIP, Medicare) for analysts using the policyengine package. Load for: why ACA PTC and Medicaid changes show $0 in household_net_income (the include_health_benefits_in_net_income gotcha) and how to measure health impact instead; the aca_ptc / medicaid / medicaid_category / slcsp / is_aca_ptc_eligible / per_capita_chip variables; Medicaid category precedence (42 CFR 435.119); the _fc/_nfc split; why a flat reform dict fails on required_contribution_percentage; slcsp returning $0 for the ineligible; and what "IRA reform" means. Triggers: Medicaid, ACA, premium tax credit, PTC, aca_ptc, SLCSP, CHIP, Medicare, MAGI, coverage gap, Medicaid expansion, IRA subsidy extension, required contribution percentage, age curve, family tier, medicaid_category. NOT for: non-health US programs (use policyengine-us); new health variables (use policyengine-model-development); core calculate_household / Simulation mechanics (use the policyengine skill).
- ▌ Policyengine User Guide · policyengineUsing the PolicyEngine web app (policyengine.org) to analyze how tax and benefit reforms affect a household or the whole population — the household calculator, the policy editor, and society-wide impact charts. For people using the site, not building it. Triggers: "how to use PolicyEngine", "household calculator", "build a reform on the website", "policyengine.org walkthrough", "web app guide", "share a reform link", "read the impact charts".
- ▌ Policyengine Github Agent · policyengineWorking with the PolicyEngine GitHub agent bot on issues and PRs — how it is invoked and the hard rule that keeps it from looping. Load before replying to, or posting as, the bot. Triggers: "@policyengine bot", "GitHub agent", "policyengine-github-agent", "bot doom loop", "bot mentioned itself", "who can invoke the bot", "core-developers team".
- ▌ Policyengine Prior Scores · policyengineCurated anchor list of PolicyEngine's previously-published scored reforms, plus the map of the real prior-scores infrastructure in this repo (presets, the scorekeepers registry, the /prior-scores command, and the prior-scores-finder agent). Use to find a benchmark magnitude to anchor a new analysis (Stage 3 / Stage 5 of /analyze-policy) or to cite PE's prior work on a similar reform. Triggers: "prior PE score", "PolicyEngine has scored", "what did PE find", "PE benchmark", "anchor reform", "comparable reform", "EITC expansion scored", "CTC expansion scored", "SALT cap analysis", "state CTC analysis", "ARPA reform impact", "American Family Act score", "published_scores", "preset reform", "scorekeepers". NOT for: broader blog discovery (see policyengine-research-lookup) or diagnosing why a run mismatches a prior (see policyengine-calibration-diagnostics).
- ▌ Policyengine Research Lookup · policyengineFind and cite PolicyEngine's published blog posts and research articles as evidence or proof points — for talks, pitches, grant narratives, and "has PolicyEngine written about X?" Triggers: "find a blog post", "PolicyEngine research on", "published analysis", "proof point", "has PolicyEngine written about", "cite our work on", "which post covers", "blog post about".
- ▌ Policyengine Model Development · policyengine bundleLoad when editing a PolicyEngine country model repo (policyengine-us, policyengine-uk, policyengine-canada) — adding or changing variables, parameters, YAML tests, or contributed reforms. This is the engineering layer (how formulas, parameter YAML, and tests are written), distinct from running analysis. Triggers: add a variable, add a parameter, write a formula, defined_for, adds/subtracts, value_type, definition_period, entity, SPMUnit, TaxUnit, vectorize, where/select, period vs period.this_year, monthly_age, YAML test, absolute_error_margin, contrib reform, in_effect, create_x_reform, neutralize_variable, modify_parameters, changelog.d, StateCode, TANF/SNAP encoding, bracket parameter, -.inf, single_amount, right=True, band top, over X but not over Y. NOT for: household calculations, microsimulation, reform scoring, or distributional analysis (use the policyengine skill); calling the REST API (use policyengine-api).
- ▌ Policyengine Plugin Maintenance · policyengineMaintaining the policyengine-skills source repo and its generated policyengine-claude wrapper — adding or editing skills, bundles, and the Claude/Codex targets, and keeping the verification harness green. For maintaining the catalog, not for using PolicyEngine. Triggers: "update plugin", "add a skill", "edit a bundle", "fix skill routing", "wrong skill loaded", "rebuild the wrapper", "plugin maintenance", "policyengine-skills", "policyengine-claude", "stale reference test", "verify example failing", "skill frontmatter".
- ▌ Policyengine Calibration Diagnostics · policyengineSensitivity registry for PolicyEngine microsim results — maps {program x deviation signature} to the calibration target or imputed variable most likely driving a mismatch, and reads the live per-target diagnostics for the current Microcosm release. The knowledge base behind the calibration-diagnostics agent and /analyze-policy Stage 5.6. Load when investigating why a microsim result differs from a prior score, or when reviewing whether a reform classification is calibration-sensitive. Triggers: "why does my reform not match", "policyengine cost off", "calibration mismatch", "imputed variable", "takeup rate", "non-filer", "itemizer share", "small state variance", "calibration target", "Microcosm (formerly Populace) target", "calibration dashboard", "target-diagnostics", "relative_error", "diagnose mismatch", "deviation signature".