Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Deep EVM bytecode analysis and decompilation capabilities for smart contract security, gas optimization, and reverse engineering. Provides tools for analyzing opcodes, storage layouts, proxy patterns, and bytecode verification.
.claude/skills/a5c-ai-evm-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 119% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-04 | ✗→✗ | = Same ✗ | 93% | 0% |
| case-05 | ✗→✗ | = Same ✗ | 120% | 0% |
Expert-level EVM bytecode analysis and decompilation for smart contract security audits, gas optimization, and reverse engineering.
This skill can leverage the following MCP servers:
| Server | Purpose | Install | |--------|---------|---------| | EVM MCP Tools | Smart contract auditing, security analysis | 0xGval/evm-mcp-tools | | Solidity Contract Analyzer | Contract code analysis with metadata | Skywork |
Common EVM opcodes and gas costs:
| Category | Opcodes | Base Gas | |----------|---------|----------| | Arithmetic | ADD, SUB, MUL, DIV | 3-5 | | Comparison | LT, GT, EQ, ISZERO | 3 | | Bitwise | AND, OR, XOR, NOT, SHL, SHR | 3 | | Memory | MLOAD, MSTORE | 3 + memory expansion | | Storage | SLOAD | 100 (warm) / 2100 (cold) | | Storage | SSTORE | 100-20000 (varies) | | Control | JUMP, JUMPI | 8-10 | | Call | CALL, DELEGATECALL, STATICCALL | 100 + memory + value |
solidity// Basic types (slot 0, 1, 2...) uint256 public a; // slot 0 uint256 public b; // slot 1 // Packed storage uint128 public c; // slot 2, bytes 0-15 uint128 public d; // slot 2, bytes 16-31 // Mappings: keccak256(key . slot) mapping(address => uint256) public balances; // slot 3 // balances[addr] at keccak256(addr . 3) // Dynamic arrays: length at slot, data at keccak256(slot) uint256[] public arr; // length at slot 4, arr[i] at keccak256(4) + i
Implementation: 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
Admin: 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103
Beacon: 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50PUSH1 0x80 // Free memory pointer
PUSH1 0x40
MSTORE
...
CODECOPY // Copy runtime code
RETURN // Return runtime codePUSH4 <selector> // 4-byte function selector
EQ // Compare with calldata[0:4]
PUSH2 <offset> // Jump destination
JUMPI // Jump if match// Reentrancy indicator: CALL before SSTORE
CALL
...
SSTORE
// Unchecked return: CALL without ISZERO check
CALL
// Missing: ISZERO, JUMPI for error handling
// Self-destruct (deprecated but detectable)
SELFDESTRUCTbash# Using cast (Foundry) cast code <address> --rpc-url <rpc> # Using curl curl -X POST <rpc> \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getCode","params":["<address>","latest"],"id":1}'
bash# Disassemble with cast cast disassemble <bytecode> # Or use online tools # - evm.codes/playground # - ethervm.io/decompile
bash# Read specific storage slot cast storage <address> <slot> --rpc-url <rpc> # Read EIP-1967 implementation slot cast storage <address> 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc --rpc-url <rpc>
bash# Get deployed bytecode cast code <address> --rpc-url <rpc> > deployed.bin # Compile source and compare forge build diff deployed.bin out/Contract.sol/Contract.bin
This skill integrates with the following processes:
gas-optimization.js - Identify gas-heavy opcodessmart-contract-security-audit.js - Bytecode-level vulnerability detectionsmart-contract-upgrade.js - Proxy slot verificationformal-verification.js - Bytecode correctness verification| Tool | Purpose | URL | |------|---------|-----| | Foundry Cast | CLI bytecode interaction | foundry-rs/foundry | | evm.codes | Opcode reference | evm.codes | | Dedaub | Decompiler | dedaub.com | | Heimdall | Advanced decompiler | heimdall-rs | | panoramix | Python decompiler | eveem.org |
javascript// Analyze proxy contract const analysis = { type: 'proxy', pattern: 'EIP-1967 Transparent', implementation: '0x...', admin: '0x...', // Storage layout storageSlots: { 0: { name: '_initialized', type: 'uint8' }, 1: { name: '_initializing', type: 'bool' }, // ... }, // Function selectors selectors: { '0xa9059cbb': 'transfer(address,uint256)', '0x23b872dd': 'transferFrom(address,address,uint256)', // ... }, // Gas hotspots gasHotspots: [ { offset: 0x1a4, opcode: 'SSTORE', context: 'balance update' }, { offset: 0x2f0, opcode: 'CALL', context: 'external call' } ] };
skills/gas-optimization/SKILL.md - Gas optimization techniquesagents/solidity-auditor/AGENT.md - Security audit agentreferences.md - External resources| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 17,691 | 7,114 | -60% | 1 | 1 | 0% | 1,601 | 3,499 | +119% | 0 | 0 | — |
case-02 | fail→pass | 6,894 | 6,004 | -13% | 1 | 1 | 0% | 1,365 | 3,192 | +134% | 0 | 0 | — |
case-03 | fail→pass | 10,744 | 7,460 | -31% | 1 | 1 | 0% | 2,312 | 3,244 | +40% | 0 | 0 | — |
case-04 | fail→fail | 9,234 | 8,857 | -4% | 1 | 1 | 0% | 1,912 | 3,688 | +93% | 0 | 0 | — |
case-05 | fail→fail | 6,347 | 4,867 | -23% | 1 | 1 | 0% | 1,291 | 2,845 | +120% | 0 | 0 | — |
case-06 | fail→fail | 7,639 | 9,366 | +23% | 1 | 1 | 0% | 1,448 | 3,344 | +131% | 0 | 0 | — |
case-07 | fail→fail | 9,213 | 5,777 | -37% | 1 | 1 | 0% | 1,710 | 2,903 | +70% | 0 | 0 | — |
case-08 | fail→fail | 3,670 | 4,727 | +29% | 1 | 1 | 0% | 603 | 2,680 | +344% | 0 | 0 | — |
case-09 | fail→fail | 3,974 | 2,896 | -27% | 1 | 1 | 0% | 896 | 2,489 | +178% | 0 | 0 | — |
case-10 | fail→fail | 3,674 | 1,961 | -47% | 1 | 1 | 0% | 649 | 2,224 | +243% | 0 | 0 | — |
case-11 | fail→fail | 9,991 | 10,811 | +8% | 1 | 1 | 0% | 1,739 | 3,448 | +98% | 0 | 0 | — |
case-12 | fail→fail | 8,534 | 6,171 | -28% | 1 | 1 | 0% | 1,562 | 2,949 | +89% | 0 | 0 | — |
case-13 | fail→fail | 4,158 | 3,358 | -19% | 1 | 1 | 0% | 777 | 2,464 | +217% | 0 | 0 | — |
case-14 | fail→fail | 4,666 | 4,009 | -14% | 1 | 1 | 0% | 864 | 2,624 | +204% | 0 | 0 | — |
case-15 | fail→fail | 7,806 | 2,428 | -69% | 1 | 1 | 0% | 1,377 | 2,280 | +66% | 0 | 0 | — |
case-16 | fail→fail | 7,512 | 6,455 | -14% | 1 | 1 | 0% | 1,506 | 3,169 | +110% | 0 | 0 | — |
case-17 | fail→fail | 6,127 | 2,878 | -53% | 1 | 1 | 0% | 1,218 | 2,439 | +100% | 0 | 0 | — |
case-18 | fail→fail | 5,751 | 2,408 | -58% | 1 | 1 | 0% | 930 | 2,276 | +145% | 0 | 0 | — |
case-19 | fail→fail | 4,888 | 3,594 | -26% | 1 | 1 | 0% | 857 | 2,538 | +196% | 0 | 0 | — |
case-20 | fail→fail | 4,149 | 3,370 | -19% | 1 | 1 | 0% | 689 | 2,428 | +252% | 0 | 0 | — |
case-21 | fail→fail | 8,440 | 5,853 | -31% | 1 | 1 | 0% | 1,560 | 2,958 | +90% | 0 | 0 | — |
case-22 | fail→fail | 6,405 | 7,425 | +16% | 1 | 1 | 0% | 1,305 | 3,319 | +154% | 0 | 0 | — |
case-23 | fail→fail | 6,471 | 5,218 | -19% | 1 | 1 | 0% | 1,329 | 2,984 | +125% | 0 | 0 | — |
case-24 | fail→fail | 9,782 | 6,793 | -31% | 1 | 1 | 0% | 2,077 | 3,298 | +59% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.