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.
git clone --depth 1 https://github.com/omermaksutii/RugProofWrote 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/omermaksutii/rugproof/invariant)<a href="https://agentmods.dev/commands/omermaksutii/rugproof/invariant"><img src="https://agentmods.dev/badge/commands/omermaksutii/rugproof/invariant.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.1 | $0.00019 | $0.00808 |
| Opus 5 | $0.00010 | $0.00404 |
| Sonnet 5 | $0.00004 | $0.00162 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
invariant 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 6d 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/invariant — generate invariant tests
Property-based testing in Foundry. The single highest-leverage test artifact you can produce — invariants catch bugs no example-based test does.
Procedure
Step 1 — Identify invariants
Dispatch invariant-writer subagent. It reads the contract and proposes invariants based on protocol type:
Token / ERC-20:
totalSupply() == sum(balanceOf(a) for a in all_addrs)- balances never overflow
- transfers preserve totalSupply (no minting / burning)
Vault / ERC-4626:
totalAssets() >= sum(convertToAssets(balanceOf(a)) for a in all_holders)previewDeposit + previewWithdrawround-trip ≤ initial valuetotalSupply == 0 ⇒ totalAssets == 0- shares only mintable via
deposit/mint, only burnable viawithdraw/redeem
AMM:
K = reserve0 * reserve1non-decreasing after fee-paying swaps- LP token supply ratio matches reserves ratio over time
Lending:
sumDebt <= sumCollateralValue * MAX_LTV(modulo bad debt)- borrow + repay is value-preserving
- no negative balances
Governance:
- vote weight is snapshotted; can't be modified after proposal creation
- timelock delay always elapses before execution
Step 2 — Generate Foundry invariant harness
contract VaultInvariants is Test {
Vault vault;
Handler handler; // ← actor that calls arbitrary fns with bounded random inputs
function setUp() public {
vault = new Vault();
handler = new Handler(vault);
targetContract(address(handler));
}
function invariant_TotalAssetsCoversShares() public {
uint256 sum;
address[] memory users = handler.getActors();
for (uint i; i < users.length; ++i) {
sum += vault.convertToAssets(vault.balanceOf(users[i]));
}
assertGe(vault.totalAssets(), sum, "vault would be insolvent");
}
}
Plus a Handler contract that has deposit, withdraw, transfer, etc. — each bounded to realistic random inputs.
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.
- 6d ago First seen · 100 lines · 19 tokens per session scan A f95ed7d2cba2
invariant is a command published in the GitHub repository omermaksutii/RugProof (9 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 808 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.
Other commands, from other repositories
krait-fuzz
Run an invariant-based fuzzing campaign: Understand → Extract Invariants → Generate Foundry Tests → Run & Fix Iteratively → Report.
verify-e2e-flow
Verify that the E2E scripts for the specified chain follow the documented transaction flow.
fix-bch-e2e-p1
Fix errors in BCH E2E test (Pattern 1: P2PKH Single-sig).
fix-btc-e2e-p1
Fix errors in BTC E2E test (Pattern 1: P2PKH Single-sig).
fix-btc-e2e-p10
Fix errors in BTC E2E test (Pattern 10: P2TR MuSig2 N-of-N).
fix-btc-e2e-p11
Fix errors in BTC E2E test (Pattern 11: P2TR Tapscript M-of-N).