audit-state-tax

audit-state-tax is a command for coding agents from PolicyEngine/policyengine-claude. It costs 21 tokens per session (3,649 once invoked), scanned A, original, MIT.

A read-only review of state income-tax changes in a pull request against official PDF tax forms or guides.

In plain words
What is it for?
It audits either changed parameters or all implemented parameters, finds an official source when needed, and can show the findings locally or post them to GitHub.
Why use it?
It helps catch incorrect tax parameter values by comparing code with the state's published instructions.

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/audit-state-tax
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 audit-state-tax

README.md
[![agentmods](https://agentmods.dev/badge/commands/policyengine/policyengine-claude/audit-state-tax.svg)](https://agentmods.dev/commands/policyengine/policyengine-claude/audit-state-tax)
Your own site
<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/audit-state-tax"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/audit-state-tax.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,649 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00021 $0.03649
Opus 5 $0.00010 $0.01825
Sonnet 5 $0.00004 $0.00730
Haiku 4.5 $0.00002 $0.00365

Measured 5d ago against content hash d012e2063aed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

audit-state-tax scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Download it: `curl -L -o /tmp/{state}-audit-source.pdf "URL"`
commands/audit-state-tax.md · 395 lines

How it starts

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

Auditing State Tax PR: $ARGUMENTS

READ-ONLY MODE: This command audits parameter values in a state income tax PR against official PDF sources and posts findings to GitHub. It does NOT make code changes.

Arguments

$ARGUMENTS should contain:

  • PR number (required) — e.g., 7130
  • PDF URL (optional) — link to the state's official tax form instructions or tax guide. If omitted, the command will auto-discover the source.
  • Options:
    • --local — show findings locally only, skip GitHub posting
    • --full — audit ALL implemented parameters (not just PR changes) against the PDF

Examples:

/audit-state-tax 7130
/audit-state-tax 7130 --full
/audit-state-tax 7130 --local
/audit-state-tax 7130 https://oregon.gov/.../form-or-40-inst_2025.pdf
/audit-state-tax 7130 https://oregon.gov/.../form-or-40-inst_2025.pdf --full

Phase 0: Parse Arguments & Setup

Parse $ARGUMENTS:
- PR_NUMBER: first numeric argument
- PDF_URL: first URL argument (may be empty — will auto-discover in Phase 1.5)
- LOCAL_ONLY: true if --local flag present
- FULL_AUDIT: true if --full flag present

Determine Posting Mode

If --local flag: Skip prompt, proceed in local-only mode.

If no flag: Use AskUserQuestion:

Question: "Post audit findings to GitHub when complete?"
Options:
  - "Yes, post to GitHub" (default)
  - "No, show locally only"

Phase 1: Gather PR Context

Collect information about the PR without switching branches:

gh pr view $PR_NUMBER --json title,body,author,baseRefName,headRefName
gh pr diff $PR_NUMBER > /tmp/state-tax-pr-diff.txt

From the diff, identify:

  • State abbreviation (e.g., or, md) from file paths like parameters/gov/states/{st}/tax/
  • Tax year being updated
  • Files changed: parameter YAMLs, variable Python files, tests
  • What topics are covered: rates, deductions, credits, exemptions, etc.

Phase 1.5: Auto-Discover PDF Source (if no URL provided)

Skip this phase if the user provided a PDF URL.

Read the full file on GitHub · 395 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. 5d ago First seen · 395 lines · 21 tokens per session scan A d012e2063aed

Subscribe to this mod's changes

audit-state-tax is a command published in the GitHub repository PolicyEngine/policyengine-claude (32 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 3,649 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.