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/zaryab2000/decipher-gas-optimizoor/explaingit 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/commands/zaryab2000/decipher-gas-optimizoor/explain)<a href="https://agentmods.dev/commands/zaryab2000/decipher-gas-optimizoor/explain"><img src="https://agentmods.dev/badge/commands/zaryab2000/decipher-gas-optimizoor/explain.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.00672 |
| Opus 5 | $0.00000 | $0.00336 |
| Sonnet 5 | $0.00000 | $0.00134 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
explain 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 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.
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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/decipher-gas-optimizoor:explain
Explain the EVM mechanic behind a specific gas optimization pattern with exact cost numbers, before/after code, and when NOT to apply it.
Accepted patterns
cold-sload | slot-packing | unchecked | custom-errors | calldata |
external-vs-public | immutable | loop-caching | unbounded-loop
If the user supplies an unknown pattern, respond:
Unknown pattern "[X]". Accepted patterns: cold-sload, slot-packing, unchecked, custom-errors, calldata, external-vs-public, immutable, loop-caching, unbounded-loop
Output format (use for every pattern)
Produce exactly five sections:
- What it is — one sentence.
- The EVM mechanic — why the naive code is expensive at the opcode level.
- Gas cost difference — exact numbers in a table.
- Before / after example — minimal Solidity snippets.
- When NOT to apply — concrete conditions.
Pattern stubs
Use these as anchors; fill in from your knowledge of EVM gas mechanics.
| Pattern | Core mechanic | Key numbers |
|---|---|---|
cold-sload |
First SLOAD in a tx costs 2,100 gas (EIP-2929); warm = 100; MLOAD = 3 | Cache to local var: 2,100 → 3 gas per subsequent read |
slot-packing |
Each 32-byte storage slot = one SSTORE/SLOAD; fields share a slot if they fit | Cold SSTORE 22,100 gas/slot; saving 1 slot = 22,100 gas on first write |
unchecked |
Solidity 0.8+ emits ISZERO+JUMPI after every arithmetic op | ~30 gas/op; safe only when overflow is provably impossible |
custom-errors |
require(c,"str") ABI-encodes full string; custom error = 4-byte selector |
~15–50 gas/revert + ~200 gas × string_bytes at deployment |
calldata |
memory param triggers CALLDATACOPY (3 gas/byte); calldata reads directly |
~3 gas/byte saved; for 10-element bytes32[] = ~960 gas |
external-vs-public |
public generates internal+external entry points; external skips internal |
~24 gas/call (scalar); thousands for array params via calldata |
immutable |
Immutable values baked into deployed bytecode as PUSH32 | ~3 gas/read vs 2,100 gas cold SLOAD; use when set once in constructor |
loop-caching |
Storage reads inside loops pay 100 gas (warm) per iteration | Cache before loop: 2,100 gas once + 3 gas × N vs 100 gas × N |
unbounded-loop |
Block gas limit ~30M; cold-storage loop: max ~14,285 iterations before DoS | Not a per-call saving — a correctness risk; fix with pagination or pull pattern |
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.
- 5d ago First seen · 46 lines · 0 tokens per session scan A fced36386f9d
explain is a command published in the GitHub repository zaryab2000/decipher-gas-optimizoor (7 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 672 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-31.
Other commands, from other repositories
update-solidity
I need your help to update the Solidity compiler version support in the @tevm/solc package. This involves checking for new Solidity releases, using the version script to get their version hashes, and updating the appropriate files.
scaffold
Create a new Stellar dApp project from scratch using the framework templates.
deploy
Deploy Stellar contracts to a target network.
deploy
Deploy Solana program (devnet first, then mainnet).
project
Follow the project management workflow defined in .agents/skills/project/SKILL.md.
compare
Fan out a review to multiple AI providers and render their findings side-by-side.