watch

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

A toggleable mode that adds a gas-cost note after each Solidity edit made during the current session.

In plain words
What is it for?
Use it to turn gas annotations on or off and receive notes about the changed pattern, estimated gas difference, and affected function.
Why use it?
It keeps the likely cost effect of code changes visible while the contract is being edited.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

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

Good fit Use it to turn gas annotations on or off and receive notes about the changed pattern, estimated gas difference, and affected function.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/zaryab2000/decipher-gas-optimizoor/watch.svg)](https://agentmods.dev/commands/zaryab2000/decipher-gas-optimizoor/watch)
Your own site
<a href="https://agentmods.dev/commands/zaryab2000/decipher-gas-optimizoor/watch"><img src="https://agentmods.dev/badge/commands/zaryab2000/decipher-gas-optimizoor/watch.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 644 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.00644
Opus 5 $0.00000 $0.00322
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00064

Measured 8d ago against content hash 189ad5f36462, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

watch 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 8d 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/watch.md · 74 lines

How it starts

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

/decipher-gas-optimizoor:watch

Toggle real-time gas annotation mode. When active, Claude appends a gas impact note after every Solidity edit it makes in the current session.

Activation

When the user runs /decipher-gas-optimizoor:watch (with no --off flag), output exactly:

Gas Watch Mode: ACTIVE — I will annotate every Solidity edit with a gas impact note.

No other output. No confirmation questions. Mode is immediately active.

Behavior while active

After every message in which Claude writes, edits, or rewrites Solidity code, append this annotation block at the end of the response — after describing the change but before any follow-up questions:

---
Gas note: [what changed and why it affects gas]
Estimated: [+/-X gas] per call to [function name or "all callers"]

Rules for the annotation:

  • Be specific: name the opcode or pattern (SLOAD, SSTORE, calldata vs memory, unchecked, custom error, etc.).
  • Include a numeric estimate. Use ranges when the exact saving depends on input size or call frequency (e.g., "~97 gas/warm SLOAD avoided × N iterations").
  • If the change has no gas impact (e.g., a comment change or NatSpec addition), write:
    Gas note: No gas impact — comment/NatSpec only.
    
  • If the change introduces a gas regression, flag it clearly:
    Gas note: REGRESSION — [what got worse and why]
    Estimated: +X gas per call to [function name]
    
  • One annotation block per response, even if multiple files were edited. Summarize all edits in a single note; list separate line items if edits affect different functions.

Example annotation

Gas note: Replaced `require(msg.sender == owner, "Not owner")` with custom error
`NotOwner()` — eliminates ABI-encoded string revert data (4 bytes selector vs ~96 bytes
`Error(string)` encoding) and reduces deployment bytecode by ~200 bytes.
Estimated: -20 gas per call to setOwner() on the revert path; -~40,000 gas deployment.

Deactivation

When the user runs /decipher-gas-optimizoor:watch --off, output exactly:

Read the full file on GitHub · 74 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. 8d ago First seen · 74 lines · 0 tokens per session scan A 189ad5f36462

Subscribe to this mod's changes

watch 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 644 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.