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.
npx agentmods add commands/policyengine/policyengine-claude/analyze-policygit clone --depth 1 https://github.com/PolicyEngine/policyengine-claudeWrote 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.
[](https://agentmods.dev/commands/policyengine/policyengine-claude/analyze-policy)<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>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.
| Model | Per session | Once 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 |
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.
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 HR1234orUS S5678 - URL: a direct bill/proposal/order URL
- Description: natural-language reform (
"ARPA-style federal CTC expansion: $3,600/$3,000, full refundability")
- State + bill number:
Flags:
--country {us|uk|ca}(defaultus)--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=Nendpoint.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 tobudget-windowwithstart_year+window_size.
--year YYYY(only used with--horizon 1; default current year)--mode {api|local}(defaultapifor 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 toPolicyEngine/microcosm),--log-to draft:policyengine-app-v2/app/src/data/posts/articles/arpa-ctc.md--no-log(skip Phase 8 entirely — write the/tmpreport only)--auto-confirm(skip confirmation prompts before opening GitHub issues; only honor in non-interactive contexts)
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.
- 3d ago First seen · 544 lines · 0 tokens per session scan A 90b571fd7070
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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.