analyze-policy

analyze-policy is a command for coding agents from PolicyEngine/policyengine-claude. It costs 0 tokens per session (6,505 once invoked), scanned A, original, MIT.

A workflow for analysing a proposed tax or benefit policy with PolicyEngine's microsimulation model, which estimates effects across many households.

In plain words
What is it for?
It accepts a bill, URL, or plain-language reform description, then classifies it, finds prior results, runs a one-year or ten-year simulation, and diagnoses mismatches.
Why use it?
It helps determine whether a reform can be modelled, estimate its impact, compare the result with earlier published runs, and investigate differences.

Command

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 commands/policyengine/policyengine-claude/analyze-policy
Clone the repo
git clone --depth 1 https://github.com/PolicyEngine/policyengine-claude

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-policy

README.md
[![agentmods](https://agentmods.dev/badge/commands/policyengine/policyengine-claude/analyze-policy.svg)](https://agentmods.dev/commands/policyengine/policyengine-claude/analyze-policy)
Your own site
<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/analyze-policy"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/analyze-policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,505 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.00000 $0.06505
Opus 5 $0.00000 $0.03252
Sonnet 5 $0.00000 $0.01301
Haiku 4.5 $0.00000 $0.00651

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

Security

Grade A, and why

analyze-policy 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.

commands/analyze-policy.md · 544 lines

How it starts

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

Analyze Policy

End-to-end policy analysis pipeline. Takes a reform (bill number, URL, or description), classifies whether it's modelable, finds prior PE scores, runs the microsim, compares to priors, and — if the run mismatches — diagnoses which calibration target is likely driving the gap.

The structured analogue of /encode-policy-v2 for the analyst persona: less about implementing new programs, more about running impact analysis on a proposed reform and validating it against PolicyEngine's published baseline.

Arguments

  • $ARGUMENTS — One of:
    • State + bill number: UT SB60, RI H7127
    • Federal bill: US HR1234 or US S5678
    • URL: a direct bill/proposal/order URL
    • Description: natural-language reform ("ARPA-style federal CTC expansion: $3,600/$3,000, full refundability")

Flags:

  • --country {us|uk|ca} (default us)
  • --horizon <spec> — time horizon for the microsim. When omitted, the pipeline prompts the analyst at the start of Phase 4. Accepts:
    • 1 — single-year (default entry: current year), fastest, ~6-10 min. Uses /economy/{policy}/over/{baseline}?time_period=YYYY.
    • 10 — full 10-year (year 2026-2035 for US), ~15-25 min wall clock. Uses the native /economy/{policy}/over/{baseline}/budget-window?start_year=YYYY&window_size=N endpoint.
    • custom:YYYY[,YYYY...] — specific years (e.g. custom:2026,2029,2030,2035) — submitted as N single-year calls.
    • custom:YYYY-YYYY — year range (e.g. custom:2026-2028) — mapped to budget-window with start_year+window_size.
  • --year YYYY (only used with --horizon 1; default current year)
  • --mode {api|local} (default api for microsim execution)
  • --skip-microsim (process-test mode — stops at Stage 5, predicts from prior anchor)
  • --auto-investigate (if Stage 5 returns INVESTIGATE, auto-run top calibration hypothesis)
  • --write-report PATH (default /tmp/analyze-policy-{policy_id}.md)
  • --log-to <dest>[,<dest>...] (override auto-routing; see Phase 8). Examples: --log-to archive, --log-to "archive,issue:policyengine-{country}-data" (country auto-substituted from --country; US data issues route to PolicyEngine/microcosm), --log-to draft:policyengine-app-v2/app/src/data/posts/articles/arpa-ctc.md
  • --no-log (skip Phase 8 entirely — write the /tmp report only)
  • --auto-confirm (skip confirmation prompts before opening GitHub issues; only honor in non-interactive contexts)

Read the full file on GitHub · 544 lines

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 · 544 lines · 0 tokens per session scan A 90b571fd7070

Subscribe to this mod's changes

analyze-policy is a command published in the GitHub repository PolicyEngine/policyengine-claude (32 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,505 tokens. 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.