smithery/jeremylongshore

optimizing-gas-fees

Optimize blockchain gas costs by analyzing prices, patterns, and timing. Use when checking gas prices, estimating costs, or finding optimal windows. Trigger with phrases like "gas prices", "optimize gas", "transaction cost", "when to transact". '

Installation

$ npx skills add smithery/jeremylongshore --skill optimizing-gas-fees

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/jeremylongshore · top by installs.

npx skills add smithery/jeremylongshore

Browse all from smithery/jeremylongshore

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.27.0
LicenseMIT
CompatibilityDesigned for Claude Code
Allowed toolsRead, Bash(python3:*)
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,140 B
  • docs SUMMARY.md 273 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Optimizing Gas Fees

Overview

Gas fee optimization skill that:

  • Fetches real-time gas prices from multiple sources
  • Estimates transaction costs in ETH and USD
  • Analyzes historical patterns to find optimal timing
  • Predicts future gas prices
  • Compares gas across multiple chains

Prerequisites

  • Python 3.8+ with requests library
  • Network access to RPC endpoints
  • Optional: ETHERSCANAPIKEY for higher rate limits
  • Optional: Custom RPC URLs via environment variables

Instructions

  1. Check current gas prices (optionally for a specific chain):

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py current cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py current --chain polygon ``

  1. Estimate transaction cost for known operations or custom gas limits (available operations: ethtransfer, erc20transfer, erc20approve, uniswapv2swap, uniswapv3swap, sushiswapswap, curveswap, nftmint, nfttransfer, opensealisting, aavedeposit, aavewithdraw, compoundsupply, compoundborrow, bridge_deposit):

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py estimate --operation uniswapv2swap --all-tiers cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py estimate --gas-limit 150000 --tier fast # 150000 = configured value ``

  1. Find the optimal transaction window with lowest expected gas:

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gas_optimizer.py optimal ``

  1. View gas patterns (hourly or daily):

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py patterns cd ${CLAUDESKILLDIR}/scripts && python3 gasoptimizer.py patterns --daily ``

  1. Predict future gas prices for a given hour:

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gas_optimizer.py predict --time 14 ``

  1. Compare gas prices across multiple chains:

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gas_optimizer.py compare ``

  1. View base fee history for recent blocks:

``bash cd ${CLAUDESKILLDIR}/scripts && python3 gas_optimizer.py history --blocks 50 ``

Output

  • Current: Base fee, priority fee, and tier prices (slow/standard/fast/instant)
  • Estimate: Gas cost in native token and USD for each tier
  • Patterns: Historical hourly/daily patterns with low-gas markers
  • Optimal: Recommended transaction window with expected savings
  • Predict: Gas forecast for specific time with confidence
  • Compare: Side-by-side gas prices across chains

Supported Chains

Chain Native Token Block Time
Ethereum ETH ~12 sec
Polygon MATIC ~2 sec
Arbitrum ETH ~0.25 sec
Optimism ETH ~2 sec
Base ETH ~2 sec

Price Tiers

Tier Percentile Confirmation Time
Slow 10th 10+ blocks (~2+ min)
Standard 50th 3-5 blocks (~1 min)
Fast 75th 1-2 blocks (~30 sec)
Instant 90th Next block (~12 sec)

Error Handling

See ${CLAUDESKILLDIR}/references/errors.md for:

  • RPC connection issues
  • API rate limiting
  • Price feed errors
  • Pattern analysis errors

Examples

See ${CLAUDESKILLDIR}/references/examples.md for:

  • Quick start commands
  • Cost estimation scenarios
  • Multi-chain comparison
  • Practical workflows

Resources