gas

Estimate Ethereum gas prices and transaction costs via live RPC queries.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/mashharuki/flare-sample --skill gas-mashharuki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gas
Source: https://github.com/mashharuki/flare-sample/tree/main/.claude/skills/eth-gas
Command: npx skills add https://github.com/mashharuki/flare-sample --skill gas-mashharuki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear, up-to-date estimates of Ethereum gas prices and transaction costs to replace outdated, order-of-magnitude wrong assumptions and help users choose between mainnet and L2s or set realistic fee policies.

Core Features & Use Cases

  • Live fee guidance: Explains current base fee and priority fee expectations and how to programmatically check them via RPC.
  • Cost benchmarking: Converts gas usage into USD totals for common actions (ETH transfer, ERC-20 transfer, swaps, contract deploys) and compares mainnet vs major L2s.
  • Practical recommendations: Suggests sensible maxFeePerGas and maxPriorityFeePerGas ranges, spike-detection heuristics, and when to prefer mainnet vs L2 for different product types.

Quick Start

Ask the skill to estimate current gas costs for an ETH transfer and an ERC-20 swap using live base fee and ETH price.

Frequently Asked Questions about gas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I estimate current Ethereum gas fees for a transaction using live base fee data?

To estimate Ethereum gas fees, query a live RPC node for the current base fee and priority fee, then apply gwei-to-USD calculations using the latest ETH price. This provides accurate transaction cost estimates for mainnet actions.

What is the difference in transaction costs between Ethereum mainnet and major L2s?

Ethereum mainnet and L2 transaction cost differences are determined by comparing live base fee data and gas usage across networks. Converting gas usage into USD totals for common actions reveals when L2s offer significant savings over mainnet.

How do I set realistic maxFeePerGas and maxPriorityFeePerGas values for my transactions?

Set realistic maxFeePerGas and maxPriorityFeePerGas values by querying live base fee expectations via RPC and applying spike-detection heuristics. This approach ensures your transaction fees are competitive without overpaying during network congestion.

Can I calculate the USD cost for an ERC-20 token swap or contract deployment using current gas prices?

Calculate the USD cost for an ERC-20 swap or contract deployment by multiplying the estimated gas units for that action by the live base fee and current ETH price. This benchmarking applies to common mainnet and L2 actions.

When should I prefer Ethereum mainnet over an L2 for my product's transaction fees?

Prefer Ethereum mainnet over an L2 when evaluating cost benchmarks for different product types alongside recent protocol upgrades and gas limit context. Mainnet is often preferred for high-value transactions where L2 security trade-offs are not acceptable.