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 skills add zaryab2000/decipher-gas-optimizoor --skill compiler-optimizergit clone --depth 1 https://github.com/zaryab2000/decipher-gas-optimizoorWrote 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/skills/zaryab2000/decipher-gas-optimizoor/compiler-optimizer)<a href="https://agentmods.dev/skills/zaryab2000/decipher-gas-optimizoor/compiler-optimizer"><img src="https://agentmods.dev/badge/skills/zaryab2000/decipher-gas-optimizoor/compiler-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zaryab2000/decipher-gas-optimizoor/compiler-optimizer"><img src="https://agentmods.dev/badge/skills/zaryab2000/decipher-gas-optimizoor/compiler-optimizer.svg" alt="Reviewed on agentmods" width="80" 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.00113 | $0.01944 |
| Opus 5 | $0.00056 | $0.00972 |
| Sonnet 5 | $0.00023 | $0.00389 |
| Haiku 4.5 | $0.00011 | $0.00194 |
Grade A, and why
compiler-optimizer 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 9d 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 — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
Identify misconfigured or absent Solidity compiler optimizer settings in
foundry.toml and pragma declarations. Mismatched optimizer_runs, missing
via_ir, and outdated compiler versions are free gas savings requiring only
configuration changes.
When to Use
- Writing or reviewing
foundry.toml - Starting a new Foundry project
- Pre-deployment audit of build configuration
- After reviewing pragma versions in
.solfiles - When
forge test --gas-reportshows unexpectedly high gas costs
When NOT to Use
- Non-Foundry projects (Hardhat, Truffle): configuration format differs
- When optimizer is intentionally disabled for faster test iteration (flag for production build profile, not dev profile)
- When the project has recently passed a security audit on a specific version and re-audit is not feasible
Platform Detection
Trigger fires when:
foundry.tomlis present in the project root, or- A
pragma soliditydeclaration is being reviewed in a.solfile
Read foundry.toml with the Read tool. Use Bash to run
forge build --sizes or forge test --gas-report when measurements are
needed to quantify savings.
Quick Reference
optimizer_runs by contract type
| Contract type | Recommended optimizer_runs |
Reason |
|---|---|---|
| DeFi hot path (AMM, lending, swap router) | 1_000_000 |
Runtime savings outweigh bytecode size |
| Factory / deployer contract | 1 |
Minimize deployment cost; called rarely |
| General purpose (default) | 200 |
Balanced — Foundry default |
| Library deployed once, called by many | 1_000_000 |
Amortized deployment cost is negligible |
All profiles should have optimizer = true. Never deploy with optimizer disabled.
via_ir
| Condition | Recommendation |
|---|---|
| Complex DeFi contract (tight loops, heavy structs, multi-call) | via_ir = true |
| Simple contract (< 5 functions, minimal logic) | optional |
| Rapid development iteration | via_ir = false (5–50× slower to compile) |
| Production build profile | via_ir = true always recommended |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 207 lines · 113 tokens per session scan A 7c25b38d2b9a
compiler-optimizer is a skill published in the GitHub repository zaryab2000/decipher-gas-optimizoor (7 stars, last pushed 6mo ago), licensed MIT. It adds 113 tokens to every session and 1,944 once invoked, about $0.0006 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 skills, from other repositories
solidity-gas-optimizer
Analyze and optimize gas consumption in Solidity smart contracts using proven patterns and best practices.
blockchain-expert
Expert-level blockchain, Web3, smart contracts, DeFi, and cryptocurrency development. Use when the user mentions Web3, smart contracts, DeFi, Ethereum, or Solidity, or when the task involves Blockchain Fundamentals, Web3 & DeFi, Smart Contract Security, or Gas Optimization.
blockchain-application
Use this skill when asked about smart contract development, Solidity, Vyper, Rust smart contracts (Solana, NEAR, Polkadot), Haskell/Plutus (Cardano), Cairo/StarkNet, dApp backend development, Truffle, Hardhat, Foundry, Anchor, and blockchain application patterns. Languages: Solidity, Vyper, Rust, Haskell, Cairo, Move.…
web3-expert
Build production-ready Web3 applications including smart contracts, dApps, DeFi protocols, and decentralized storage solutions. Use when the user mentions Web3, smart contracts or Solidity, dApps, DeFi protocols, ethers.js or web3.js, IPFS, or on-chain integration with Ethereum-compatible networks.
flounder
Operates Flounder, an autonomous white-hat security auditor. Use when a user asks for a security audit, bug-bounty review, vulnerability investigation, or exploit proof for a public-source or authorized repository, source tree, package, smart contract, Solidity/EVM project, ZK or proof-system code, deployed address…
ethereum-development
Production-grade Ethereum/EVM development workflow for smart contracts, dApps, transactions, clients, gas optimization, testing, security review, deployment, verification, monitoring, and incident response across Foundry, Hardhat, Solidity, TypeScript, viem, ethers, wagmi, and common EVM networks.