Back to Skills

optimizing-gas-fees

verified

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".

View on GitHub

Marketplace

claude-code-plugins-plus

jeremylongshore/claude-code-plugins-plus-skills

Plugin

gas-fee-optimizer

crypto

Repository

jeremylongshore/claude-code-plugins-plus-skills
1.1kstars

plugins/crypto/gas-fee-optimizer/skills/optimizing-gas-fees/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/crypto/gas-fee-optimizer/skills/optimizing-gas-fees/SKILL.md -a claude-code --skill optimizing-gas-fees

Installation paths:

Claude
.claude/skills/optimizing-gas-fees/
Powered by add-skill CLI

Instructions

# 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

```bash
cd {baseDir}/scripts && python3 gas_optimizer.py current
```

For specific chain:
```bash
cd {baseDir}/scripts && python3 gas_optimizer.py current --chain polygon
```

### 2. Estimate Transaction Cost

For known operations:
```bash
cd {baseDir}/scripts && python3 gas_optimizer.py estimate --operation uniswap_v2_swap --all-tiers
```

For custom gas limit:
```bash
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

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

### 4. View Gas Patterns

Hourly patterns:
```bash
cd {baseDir}/scripts && python3 gas_optimizer.py patterns
```

Daily patterns:
```bash
cd {baseDir}/scripts && python3 gas_optimizer.py patterns --daily
```

### 5. Predict Future Gas

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

### 6. Compare Chains

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

### 7. View Base Fee History

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

## Output

- **Current**: Base fee, priority fee, and tier prices (slow/standard/fast/

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3327 chars