Profile gas and cut the dominant costs — storage writes and loops — then estimate the user-facing cost. Reach for this on a cost or UX-cost question.
Scanned 9/23/2026
npx -y skills add mcorbett51090/RavenClaude --skill optimize-gas --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Optimize Gas?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/mcorbett51090-optimize-gas)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: optimize-gas
description: "Profile gas and cut the dominant costs — storage writes and loops — then estimate the user-facing cost. Reach for this on a cost or UX-cost question."
---
# Skill: Optimize gas
Micro-optimizing while an unbounded loop or redundant SSTORE dominates wastes the effort (§3 #3).
## Step 1 — Profile the function
Find where gas goes; SSTORE and loops dominate (§3 #3).
## Step 2 — Pack and cache
Pack storage slots, cache storage reads in memory, prefer events over storage for off-chain-needed data (§3 #3).
## Step 3 — Bound the loops
Replace loops over unbounded arrays with pull patterns / pagination (§3 #3).
## Step 4 — Estimate user cost
Tx cost in token + USD via `blockchain_web3_calc.py gas-cost`, with dated price inputs (§3 #8).
## Output
A gas profile with the dominant cost named, the fixes ranked by savings, and a dated user-facing cost estimate.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!