Automated summary
This skill analyzes gas prices across multiple blockchains to estimate, forecast, and optimize transaction costs.
Strengths
- Fetches real-time prices with four tiers (slow, standard, fast, instant) and converts them into native token and USD amounts
- Estimates costs for predefined operations (Uniswap/Curve swaps, ERC-20 transfers, NFT mint, Aave deposits) or a custom gas limit
- Analyzes hourly and daily patterns to recommend a transaction window and predict future prices
- Compares five chains side by side (Ethereum, Polygon, Arbitrum, Optimism, Base)
Limitations
- Relies on external RPC endpoints and an optional Etherscan key; rate limits can affect results
- Predictions are based on history and cannot guarantee future prices
- The set of estimable operations is fixed and does not cover custom contracts
Use it when you need to pick the right moment or fee tier before sending an on-chain transaction.
Avoid it for chains it does not support, or when you expect it to execute a transaction — it only analyzes and estimates.
Security analysis
CautionThe skill is a legitimate gas-fee analysis tool and shows no destructive, exfiltrating, or obfuscated behavior. However, it grants broad python3 execution and requires network access to RPC/API endpoints, so it should be treated as a powerful-tool skill rather than fully safe.
- •allowed-tools grants broad Bash(python3:*) execution, not limited to the gas optimizer script path
- •Skill instructs local Python execution with network/RPC access and optional ETHERSCAN_API_KEY usage
- •Bundled scripts are referenced via {baseDir}/scripts but not included in SKILL.md, so network endpoints and secret handling cannot be fully verified
Examples
What are Ethereum gas prices right now, and what would a Uniswap v2 swap cost at each tier in ETH and USD?Show me the hourly gas patterns for Ethereum and tell me the best window to send a transaction in the next 24 hours.Compare gas costs across Ethereum, Arbitrum, Base and Polygon for an ERC-20 transfer, and estimate the cost at the standard tier.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:*) version: 1.0.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT
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_KEYfor higher rate limits - Optional: Custom RPC URLs via environment variables
Instructions
1. Check Current Gas Prices
cd {baseDir}/scripts && python3 gas_optimizer.py current
For specific chain:
cd {baseDir}/scripts && python3 gas_optimizer.py current --chain polygon
2. Estimate Transaction Cost
For known operations:
cd {baseDir}/scripts && python3 gas_optimizer.py estimate --operation uniswap_v2_swap --all-tiers
For custom gas limit:
cd {baseDir}/scripts && python3 gas_optimizer.py estimate --gas-limit 150000 --tier fast
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
3. Find Optimal Transaction Window
cd {baseDir}/scripts && python3 gas_optimizer.py optimal
4. View Gas Patterns
Hourly patterns:
cd {baseDir}/scripts && python3 gas_optimizer.py patterns
Daily patterns:
cd {baseDir}/scripts && python3 gas_optimizer.py patterns --daily
5. Predict Future Gas
cd {baseDir}/scripts && python3 gas_optimizer.py predict --time 14
6. Compare Chains
cd {baseDir}/scripts && python3 gas_optimizer.py compare
7. View Base Fee History
cd {baseDir}/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 {baseDir}/references/errors.md for:
- RPC connection issues
- API rate limiting
- Price feed errors
- Pattern analysis errors
Examples
See {baseDir}/references/examples.md for:
- Quick start commands
- Cost estimation scenarios
- Multi-chain comparison
- Practical workflows
Resources
- EIP-1559 - Fee market specification
- Etherscan Gas Tracker - Reference oracle
- L2Fees - L2 cost comparison
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/optimizing-gas-fees-ms1aw5h1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/optimizing-gas-fees-ms1aw5h1/download' --output '.skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md.part' && mv '.skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md.part' '.skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Bash(python3:*)
Original excerpt: Prerequisites
- Python 3.8+ with requests library
- Network access to RPC endpoints
- Optional:
ETHERSCAN_API_KEYfor higher rate limits - Optional: Custom RPC URLs via environment variables
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md' && test -s '.skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/optimizing-gas-fees' && cp -R '.skill-downloads/optimizing-gas-fees-ms1aw5h1' '.claude/skills/optimizing-gas-fees'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/optimizing-gas-fees-ms1aw5h1'openskills read 'optimizing-gas-fees-ms1aw5h1'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/optimizing-gas-fees-ms1aw5h1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.