gas-optimize

Analyze Solidity contracts and rank gas optimization opportunities with code diffs.

1|1|Updated May 6, 2026
One-click install
npx skills add https://github.com/Thanasimos/Thanas-flare-builders-toolkit --skill gas-optimize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gas-optimize
Source: https://github.com/Thanasimos/Thanas-flare-builders-toolkit/tree/main/gas-optimize
Command: npx skills add https://github.com/Thanasimos/Thanas-flare-builders-toolkit --skill gas-optimize

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze a Solidity contract for gas optimization opportunities. Identifies savings with specific techniques, gas numbers, and before/after code. Covers L1 and L2 considerations.

Core Features & Use Cases

  • Identify hot-path gas cost hotspots and propose concrete refactors with before/after snippets.
  • Rank recommendations by impact and provide estimated gas savings for SLOAD/SSTORE usage, calldata, and external calls.
  • Use cases include optimizing deployment gas, reducing per-call costs, and improving long-running scans of large contracts.

Quick Start

Provide the Solidity contract file path or source code and I will generate a prioritized gas-optimization report with before/after code and estimated savings.

Frequently Asked Questions about gas-optimize

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

FAQPage Schema
How do I optimize Solidity smart contracts for gas savings?

Gas optimization for Solidity involves analyzing contract source code, state variables, and call patterns to identify hot-path cost hotspots. This Skill generates a prioritized report with concrete before/after code diffs and estimated savings for SLOAD/SSTORE usage and external calls.

What's the best way to reduce SLOAD and SSTORE gas costs in smart contracts?

Reducing SLOAD and SSTORE gas costs requires analyzing storage-heavy state interactions and function call patterns. This Skill ranks recommendations by impact, providing specific before/after code snippets and estimated savings for storage operations.

Can I analyze gas optimization for L2 deployments using Solidity code diffs?

Yes, you can analyze gas optimization for L2 deployments. The analysis covers common patterns across both L1 and L2 deployments, producing ranked recommendations with before/after code and estimated savings tailored to your target network.

How do compiler and optimizer settings affect Solidity gas optimization?

Compiler and optimizer settings directly impact Solidity gas optimization by altering how state variables and loops are executed. The analysis evaluates these settings to produce accurate, ranked code refactors and estimated gas savings.

Does gas optimization work for reducing both deployment gas and per-call costs?

Gas optimization works for reducing both deployment gas and per-call costs. It identifies hot-path gas cost hotspots and proposes concrete refactors, targeting long-running scans of large contracts and individual transaction efficiency.