Optimize blockchain gas costs by analyzing prices, patterns, and timing.

MITAuto-check passed

Install Optimizing Gas Fees

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-gas-fees -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-gas-fees --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/optimizing-gas-fees .claude/skills/optimizing-gas-fees && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
optimizing-gas-fees
GitHub stars
2.8k
Token cost
~1k tokens
SKILL.md length
294 words
Files
12 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize blockchain gas costs by analyzing prices, patterns, and timing.

  • Works in 7 steps: Check current gas prices (optionally for… → Estimate transaction cost for known… → Find the optimal transaction window with… → …
  • Checking gas prices
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 5 more sections
  • Runs Python scripts from its folder; calls python3; needs ETHERSCAN_API_KEY

What it does

Optimizing Gas Fees is an agent skill from jeremylongshore/tons-of-skills-marketplace. 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".

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `ARD.md`, `PRD.md` and `config/settings.yaml`). Compatibility notes: Designed for Claude Code

It works with Ethereum. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Checking gas prices
  • Estimating costs
  • Finding optimal windows
  • With phrases like gas prices

Example prompts

  • “gas prices”
  • “optimize gas”
  • “transaction cost”
  • “/optimizing-gas-fees”

Requirements

  • Python 3
  • A credential in ETHERSCAN_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Bash(python3:*)

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Check current gas prices (optionally for a specific chain)
  2. Estimate transaction cost for known operations or custom gas limits (available operations: eth_transfer, erc20_transfer, erc20_approve…
  3. Find the optimal transaction window with lowest expected gas
  4. View gas patterns (hourly or daily)
  5. Predict future gas prices for a given hour
  6. Compare gas prices across multiple chains
  7. View base fee history for recent blocks

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash(python3:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • eips.ethereum.org
    • etherscan.io
    • l2fees.info

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ETHERSCAN_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Optimizing Gas Fees loads about 1k tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 294 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 294 words, ~1,035 tokens.

Download SKILL.mdSave it as .claude/skills/optimizing-gas-fees/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
optimizing-gas-fees
description
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".
allowed-tools
Read, Bash(python3:*)
compatibility
Designed for Claude Code
version
1.27.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
crypto, cost-optimization, optimizing-gas

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: ETHERSCAN_API_KEY for higher rate limits
  • Optional: Custom RPC URLs via environment variables

Instructions

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

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py current
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py current --chain polygon
  2. Estimate transaction cost for known operations or custom gas limits (available operations: eth_transfer, erc20_transfer, erc20_approve, uniswap_v2_swap, uniswap_v3_swap, sushiswap_swap, curve_swap, nft_mint, nft_transfer, opensea_listing, aave_deposit, aave_withdraw, compound_supply, compound_borrow, bridge_deposit):

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py estimate --operation uniswap_v2_swap --all-tiers
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py estimate --gas-limit 150000 --tier fast  # 150000 = configured value
  3. Find the optimal transaction window with lowest expected gas:

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py optimal
  4. View gas patterns (hourly or daily):

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py patterns
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py patterns --daily
  5. Predict future gas prices for a given hour:

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py predict --time 14
  6. Compare gas prices across multiple chains:

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py compare
  7. View base fee history for recent blocks:

    bash
    cd ${CLAUDE_SKILL_DIR}/scripts && python3 gas_optimizer.py history --blocks 50
Show full SKILL.md (151 more words)Show less

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

ChainNative TokenBlock Time
EthereumETH~12 sec
PolygonMATIC~2 sec
ArbitrumETH~0.25 sec
OptimismETH~2 sec
BaseETH~2 sec

Price Tiers

TierPercentileConfirmation Time
Slow10th10+ blocks (~2+ min)
Standard50th3-5 blocks (~1 min)
Fast75th1-2 blocks (~30 sec)
Instant90thNext block (~12 sec)

Error Handling

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

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

Examples

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

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

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts, references) in skills/.curated/optimizing-gas-fees of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • ARD.md
  • PRD.md
  • config/settings.yaml
  • references/errors.md
  • references/examples.md
  • references/implementation.md
  • scripts/cost_estimator.py
  • scripts/formatters.py
  • scripts/gas_fetcher.py
  • scripts/gas_optimizer.py
  • scripts/pattern_analyzer.py

Open the folder on GitHubat commit cfae287

Compare with similar skills

Optimizing Gas Fees next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Optimizing Gas Fees compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optimizing Gas Fees this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1kAutomated safety check: PassMIT
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Release Roundethereumjs/ethereumjs-monorepo2.8k—~2kAutomated safety check: PassNone
Update Est Fixturesethereumjs/ethereumjs-monorepo2.8k—~3.3kAutomated safety check: PassNone
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT
BNB Chain MCP Serverinternet-court/internet-court-skill6.6k1 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Release Round

    ethereumjs/ethereumjs-monorepo

    Runs a coordinated EthereumJS npm release round in six human-gated phases — intent and readiness, CHANGELOG, version bump, publish (human executes), post-publish verification, and announcements.

    2.8k GitHub stars~2k tokensUpdated 22 days ago
    DevelopmentAuto-check passed
  • Update Est Fixtures

    ethereumjs/ethereumjs-monorepo

    Updates EthereumJS execution-spec test fixtures from an ethereum/execution-specs release, then (after a human merge) points the monorepo submodule, updates VM npm scripts, reports a first test run…

    2.8k GitHub stars~3.3k tokensUpdated 22 days ago
    DevelopmentAuto-check passed
  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • BNB Chain MCP Server

    internet-court/internet-court-skill

    Connects an agent to the BNB Chain MCP server to read blocks and contracts, move tokens and NFTs, register ERC-8004 agents and use Greenfield storage.

    6.6k GitHub starsUsed in 1 repo~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Minara Crypto Trading and Wallet

    Minara-AI/minara-skills

    Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.

    362 GitHub stars~5.7k tokensUpdated 24 days ago
    Business, Finance & HRAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Optimizing Gas Fees

What does Optimizing Gas Fees do?

Optimize blockchain gas costs by analyzing prices, patterns, and timing. Optimizing Gas Fees is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize blockchain gas costs by analyzing prices, patterns, and timing.

When should I use Optimizing Gas Fees?

Optimizing Gas Fees fits situations like: checking gas prices; estimating costs; finding optimal windows; with phrases like gas prices.

How do I install Optimizing Gas Fees in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-gas-fees -a claude-code`. Or copy the skill folder (skills/.curated/optimizing-gas-fees in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/optimizing-gas-fees in your project. Claude Code loads it when a task matches its description.

How do I install Optimizing Gas Fees in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-gas-fees -a codex`. Or copy the skill folder (skills/.curated/optimizing-gas-fees in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/optimizing-gas-fees in your project. Codex loads it when a task matches its description.

Can I use Optimizing Gas Fees in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-gas-fees -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimizing-gas-fees, .gemini/skills/optimizing-gas-fees, .github/skills/optimizing-gas-fees and .opencode/skills/optimizing-gas-fees in your project.

What does Optimizing Gas Fees need to run?

Going by SKILL.md and its folder, Optimizing Gas Fees needs Python for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named ETHERSCAN_API_KEY. Our summary lists: Python 3; A credential in ETHERSCAN_API_KEY. Its frontmatter pre-approves these tools: Read, Bash(python3:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Optimizing Gas Fees access the network?

SKILL.md names 3 domains. As links in the text: eips.ethereum.org, etherscan.io and l2fees.info. This is read from the text; nothing was executed.

Is Optimizing Gas Fees safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Optimizing Gas Fees use?

Optimizing Gas Fees is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Optimizing Gas Fees use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Optimizing Gas Fees?

Skills that share tags, products or a category with Optimizing Gas Fees: Wagmi Feature Development (wevm/wagmi, 6.8k stars), Release Round (ethereumjs/ethereumjs-monorepo, 2.8k stars), Update Est Fixtures (ethereumjs/ethereumjs-monorepo, 2.8k stars) and Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optimizing Gas Fees?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.