Agent skill · Data & Analytics

gas-optimization

Advanced gas optimization techniques for EVM smart contracts. Covers storage packing, memory vs calldata optimization, assembly/Yul, efficient data structures, batch operations, and benchmark-driven optimization strategies.

a5c-aigithub.com/a5c-aiGitHub ↗
claude-codecodexcan modify filesMIT
Install
npx skills add a5c-ai/babysitter --skill gas-optimization --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Allowed tools: ReadGrepWriteBashEditGlobWebFetch
Path: library/specializations/cryptography-blockchain/skills/gas-optimization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,642
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Gas Optimization Skill Advanced gas optimization techniques for EVM smart contracts with benchmark-driven analysis. ## Capabilities - **Storage Optimization**: Storage packing, slot management, SLOAD/SSTORE minimization - **Memory Management**: Memory vs calldata optimization, expansion costs - **Assembly/Yul**: Low-level optimization for critical paths - **Data Structures**: Gas-efficient mappings, arrays, and structs - **Batch Operations**: Multi-call patterns, bulk transfers - **Benchmarking**: Gas profiling, comparison analysis ## MCP/Tool Integration | Tool | Purpose | Reference | |------|---------|-----------| | **Foundry MCP** | Gas reports, testing | [foundry-mcp-server](https://github.com/PraneshASP/foundry-mcp-server) | | **EVM MCP Tools** | Opcode analysis | [evm-mcp-tools](https://github.com/0xGval/evm-mcp-tools) | ## Storage Optimization ### Storage Layout Packing ```solidity // BAD: 3 storage slots (96 bytes used, 96 bytes allocated) contract BadPacking { uint128 a; // slot 0 (16 bytes) uint256 b; // slot 1 (32 bytes) - can't pack with a uint128 c; // slot 2 (16 bytes) } // GOOD: 2 storage slots (80 bytes used, 64 bytes allocated) contract GoodPacking { uint128 a; /

What's inside
Steps it walks through
  1. Capabilities
  2. MCP/Tool Integration
  3. Storage Optimization
  4. Storage Layout Packing
  5. Minimize Storage Writes
  6. Use Mappings Over Arrays for Lookups
  7. Memory vs Calldata
  8. Function Parameters
  9. String/Bytes Handling
  10. Unchecked Arithmetic
  11. Loop Optimizations
  12. Cache Array Length
  13. Pre-increment
  14. Custom Errors
Ships with 1 file
  • README.md
Commands it runs
Run tests with gas report
forge test --gas-report
Snapshot gas usage
forge snapshot
Compare against previous snapshot
forge snapshot --check
More from babysitter
All skills →
About this skill
What does the gas-optimization skill do?

Advanced gas optimization techniques for EVM smart contracts. Covers storage packing, memory vs calldata optimization, assembly/Yul, efficient data structures, batch operations, and benchmark-driven optimization strategies.

How do I install it?

Run `npx skills add a5c-ai/babysitter --skill gas-optimization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From a5c-ai/babysitter, a repository with 1,642 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going