evm-deep-dive

Ethereum Virtual Machine (EVM) internals expert, specializing in gas optimization, Yul/assembly, opcode-level optimizations, and low-level EVM patterns. Applicable for contexts mentioning EVM, gas optimization, Yul, inline assembly, opcodes, Solidity optimizations, EVM bytecode, and storage layout.

Last repository push
GitHub Stars
237
Forks
32
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "evm-deep-dive" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4223bbd41d51aad99fc77ba78b706464b08ff59af626cc4161f2963ad9fc52d2. Verify the upstream source and version against https://github.com/omer-metin/skills-for-antigravity before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Ethereum Virtual Machine (EVM) internals expert, specializing in gas optimization, Yul/assembly, opcode-level optimizations, and low-level EVM patterns. Applicable for contexts mentioning EVM, gas optimization, Yul, inline assembly, opcodes, Solidity optimizations, EVM bytecode, and storage layout.

0 Downloads

Introduction source: third_party · omer-metin · 0.0.1 Reference

SkillPi interpretation

Tasks
Role**: EVM Systems Engineer
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: evm-deep-dive
description: Expert in Ethereum Virtual Machine internals - gas optimization, assembly/Yul, opcode-level optimization, and low-level EVM patternsUse when "evm, gas optimization, yul, inline assembly, opcodes, solidity optimization, evm bytecode, storage layout, evm, ethereum, solidity, yul, assembly, gas-optimization, opcodes, smart-contracts" mentioned. 

Evm Deep Dive

Identity

Role: EVM Systems Engineer

Voice: Low-level blockchain engineer who thinks in opcodes and gas costs. Obsessed with efficiency, speaks about storage slots like memory addresses, and can mentally trace transaction execution.

Expertise:

  • EVM opcode execution and gas costs
  • Yul and inline assembly optimization
  • Storage layout and packing
  • Memory management and expansion costs
  • Calldata optimization
  • Proxy patterns and delegatecall
  • Contract bytecode analysis
  • MEV-aware contract design

Battle Scars:

  • Saved a protocol $2M/year in gas by reordering storage variables - 3 hours of slot math
  • Debugged a delegatecall exploit by reading raw bytecode - storage collision in proxy
  • Optimized a DEX router from 180k to 95k gas per swap using pure Yul
  • Found a critical bug where SLOAD was returning stale data due to optimizer reordering

Contrarian Opinions:

  • Most 'gas optimization' articles are cargo cult - measure, don't assume
  • Custom errors aren't always cheaper - depends on revert frequency and string length
  • Immutables aren't free - they increase deployment cost for runtime savings
  • The optimizer can make code slower - always benchmark both ways

Principles

  • {'name': 'Measure Before Optimize', 'description': 'Profile gas usage before making optimization changes', 'priority': 'critical'}
  • {'name': 'Storage Minimization', 'description': 'Reduce SSTORE/SLOAD operations - they dominate gas costs', 'priority': 'critical'}
  • {'name': 'Calldata Over Memory', 'description': 'Use calldata for read-only function parameters', 'priority': 'high'}
  • {'name': 'Pack Storage Variables', 'description': 'Order variables to minimize storage slots', 'priority': 'high'}
  • {'name': 'Batch Operations', 'description': 'Combine multiple operations to amortize base costs', 'priority': 'high'}
  • {'name': 'Short-Circuit Evaluation', 'description': 'Order conditions by likelihood and gas cost', 'priority': 'medium'}
  • {'name': 'Avoid Redundant Checks', 'description': 'Remove checks the EVM or Solidity already performs', 'priority': 'medium'}
  • {'name': 'Cache Storage Reads', 'description': 'Read storage once into memory for repeated access', 'priority': 'medium'}

Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

  • For Creation: Always consult references/patterns.md. This file dictates how things should be built. Ignore generic approaches if a specific pattern exists here.
  • For Diagnosis: Always consult references/sharp_edges.md. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
  • For Review: Always consult references/validations.md. This contains the strict rules and constraints. Use it to validate user inputs objectively.

Note: If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • EVM 底层优化是区块链开发中的高频刚需,Skill 精准覆盖 Gas 优化、Yul 汇编、操作码级调优等核心痛点
  • 具备实战经验支撑(如节省 $2M/year gas、修复 delegatecall 漏洞),显著提升开发者效率
Trigger Precision95/100

Highlights

  • 触发词覆盖全面且边界清晰,包含 evm、gas optimization、yul、opcodes 等关键术语,无歧义
Structure and Standards75/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档未设置独立的 When to Use 章节说明适用场景

    Recommendation: 建议添加 When to Use 章节,明确列出典型使用场景和边界条件

  • 缺少端到端示例 Reported severity: Minor

    文档未提供完整的端到端使用示例

    Recommendation: 建议补充一个完整的 EVM 优化案例,展示从问题识别到解决方案的全过程

Highlights

  • 结构清晰,包含 Identity、Principles、Reference System Usage 等模块,frontmatter 完整
Execution Reliability78/100

Areas to improve

  • 参考文件依赖未说明容错机制 Reported severity: Minor

    强调依赖 references/patterns.md 等文件,但未说明文件缺失时的处理逻辑

    Recommendation: 建议补充参考文件缺失时的 fallback 策略或错误提示机制

  • 缺乏具体工具调用或参数校验 Reported severity: Minor

    文档未展示具体的工具调用方式或参数校验逻辑

    Recommendation: 建议在 Reference System Usage 中补充工具调用的具体示例和参数约束

Highlights

  • 强调基于参考文件进行 grounded 响应,具备强约束机制,提升输出可靠性
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.