audit-changes

audit-changes is a command for coding agents from omermaksutii/RugProof. It costs 18 tokens per session (471 once invoked), scanned A, original, MIT.

A command that audits only the Solidity or Vyper code changed against a chosen Git base, usually the main branch. It focuses on smart-contract risks such as storage changes, external calls, permissions, replay attacks, and price calculations.

In plain words
What is it for?
Use it before merging or pushing contract changes, with findings tied to the changed code.
Why use it?
It keeps pull-request security reviews focused on new or worsened problems instead of auditing the entire codebase.

Command

Part of the rugproof plugin — 35 commands, 23 agents shipped together

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/omermaksutii/rugproof/audit-changes
Clone the repo
git clone --depth 1 https://github.com/omermaksutii/RugProof

Or install rugproof, the plugin that ships this one along with the rest of its 35 commands, 23 agents.

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-changes

README.md
[![agentmods](https://agentmods.dev/badge/commands/omermaksutii/rugproof/audit-changes.svg)](https://agentmods.dev/commands/omermaksutii/rugproof/audit-changes)
Your own site
<a href="https://agentmods.dev/commands/omermaksutii/rugproof/audit-changes"><img src="https://agentmods.dev/badge/commands/omermaksutii/rugproof/audit-changes.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 471 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.00018 $0.00471
Opus 5 $0.00009 $0.00235
Sonnet 5 $0.00004 $0.00094
Haiku 4.5 $0.00002 $0.00047

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

Security

Grade A, and why

audit-changes 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/audit-changes.md · 50 lines

What it actually says

/audit-changes — audit only what changed

For PR review or pre-push verification. Audits only the diff vs $ARGUMENTS (default: main).

Procedure

  1. Get the diff. git diff --name-only <base>...HEAD -- '*.sol' '*.vy' gives changed files.
  2. For each changed file:
    • Read the file and the diff hunk.
    • Identify what changed: new function, modified function, new state var, etc.
  3. Audit the changes with extra attention to:
    • Upgrade safety — did storage layout change? (use [[storage-layout]])
    • New external-call sites — reentrancy review.
    • New state mutations — access-control review.
    • Changes to signed-message handling — replay review.
    • Changes to oracle reads or price math.
    • Removed requires or relaxed checks.
  4. Cross-reference unchanged code. A diff that adds a new function to a contract requires understanding the existing invariants.
  5. Emit findings only for the diff — but flag pre-existing issues that the diff makes worse.

Output

Audit of diff vs <base>:
  Files changed: N
  Lines changed: +X / -Y
  Findings: <severity breakdown>

Per finding, include the diff snippet and a recommended block-on-merge severity.

CI mode

When run from a hook (pre-push, pre-commit), this command:

  • Reads severity_threshold from .rugproof.yml
  • Exits 0 if no findings at/above threshold
  • Exits 1 with a structured stderr summary otherwise

Notes

  • Don't re-audit code that didn't change.
  • A new comment doesn't justify a finding — only changes to executable code.
  • If the diff is huge, sample the most risky hunks (functions touching state, external calls, signatures) and tell the user the audit was sampled.
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 · 50 lines · 18 tokens per session scan A d4bfea11a3d6

Subscribe to this mod's changes

audit-changes is a command published in the GitHub repository omermaksutii/RugProof (9 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 471 once invoked, about $0.0001 per session on Opus 5. 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-31.