baseline

baseline is a command for Claude Code from zaryab2000/decipher-gas-optimizoor. It costs 0 tokens per session (639 once invoked), scanned A, original, MIT.

A command for reading, rebuilding, or filtering Foundry's `.gas-snapshot` file. Foundry is a toolkit for building and testing Solidity contracts, and the snapshot records gas used by test functions.

In plain words
What is it for?
Use it to display all recorded gas results, update the file after running the build and snapshot commands, or show results for a particular contract or function.
Why use it?
It gives the project a consistent reference point for comparing gas usage over time. If no snapshot exists, it tells you how to create one.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the decipher-gas-optimizoor plugin — 11 skills, 5 commands, 1 agent shipped together

Good fit Use it to display all recorded gas results, update the file after running the build and snapshot commands, or show results for a particular contract or function.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zaryab2000/decipher-gas-optimizoor/baseline
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.

Clone the repo
git clone --depth 1 https://github.com/zaryab2000/decipher-gas-optimizoor

Made for: Claude Code.

Or install decipher-gas-optimizoor, the plugin that ships this one along with the rest of its 11 skills, 5 commands, 1 agent.

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 baseline

README.md
[![agentmods](https://agentmods.dev/badge/commands/zaryab2000/decipher-gas-optimizoor/baseline.svg)](https://agentmods.dev/commands/zaryab2000/decipher-gas-optimizoor/baseline)
Your own site
<a href="https://agentmods.dev/commands/zaryab2000/decipher-gas-optimizoor/baseline"><img src="https://agentmods.dev/badge/commands/zaryab2000/decipher-gas-optimizoor/baseline.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00639
Opus 5 $0.00000 $0.00319
Sonnet 5 $0.00000 $0.00128
Haiku 4.5 $0.00000 $0.00064

Measured 7d ago against content hash 214ced14e6c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

baseline 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 7d 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/baseline.md · 106 lines

How it starts

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

/decipher-gas-optimizoor:baseline

Read, update, or query the .gas-snapshot file produced by forge snapshot.

Arguments

  • (no args) — display a summary table of the current baseline
  • --update — rebuild the baseline by running forge build + forge snapshot
  • --show <X> — filter the baseline to lines matching contract name or function name X

Mode 1: No arguments (show summary)

Read .gas-snapshot in the current working directory.

If the file does not exist, output:

No gas baseline found. Run /decipher-gas-optimizoor:baseline --update to create one.

If the file exists, parse every line. Each line has the format:

ContractName:functionName() gas: 12345

Output a summary table using EXACTLY this format:

## Gas Baseline Summary
**File:** .gas-snapshot | **Functions recorded:** N

| Contract | Function | Gas |
| -------- | -------- | --- |
| TokenVault | deposit() | 38,400 |
| TokenVault | withdraw() | 32,100 |
| StakingPool | stake() | 55,200 |

Sort rows by contract name alphabetically, then by function name alphabetically within each contract. Format gas values with comma separators.

End with:

Total: N functions across M contracts.


Mode 2: --update

Run in sequence:

forge build

If build fails, display errors and stop. Do not proceed to snapshot with a broken build.

forge snapshot

After completion, count the lines in .gas-snapshot to determine N.

Output:

Gas baseline updated: N functions recorded in .gas-snapshot

Commit the baseline to version control: git add .gas-snapshot && git commit -m "chore: update gas baseline"


Mode 3: --show X

Read .gas-snapshot. Filter lines where the line text contains X (case-insensitive substring match against both the contract name portion and the function name portion).

If no lines match, output:

No entries found matching "[X]" in .gas-snapshot

If lines match, output them in table format:

## Gas Baseline: entries matching "[X]"

| Contract | Function | Gas |
| -------- | -------- | --- |
| TokenVault | deposit() | 38,400 |

Read the full file on GitHub · 106 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. 7d ago First seen · 106 lines · 0 tokens per session scan A 214ced14e6c3

Subscribe to this mod's changes

baseline 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 639 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.