A comprehensive skill for AI coding agents (Claude Code, OpenClaw, Codex) to build real-time applications on MegaETH, with explicit MegaEVM/spec-version awareness.
This skill provides AI agents with deep knowledge of the MegaETH development ecosystem:
- Transactions:
eth_sendRawTransactionSync(EIP-7966) for low-latency synchronous receipt return without polling - RPC Patterns: JSON-RPC batching, WebSocket keepalive, mini-block subscriptions
- Storage: Optimization patterns to avoid expensive SSTORE costs
- Gas Model: MegaEVM-specific costs and estimation strategies
- Debugging: mega-evme CLI for transaction replay and gas profiling
- Security: MegaETH-specific considerations and audit checklists
- Meridian: x402 payments on MegaETH for seller/server and buyer/agent flows
- MegaNames: .mega naming service — registration, resolution, subdomains, subdomain marketplace
- VRF / Randomness: drand quicknet verifier integration for lotteries, reveals, and game mechanics
npx skills add 0xBreadguy/megaeth-ai-developer-skillsgit clone https://github.com/0xBreadguy/megaeth-ai-developer-skills
# Copy to your agent's skills directoryclawdhub install megaeth-developer├── SKILL.md # Main skill (stack decisions, operating procedure)
├── wallet-operations.md # Wallet setup, balances, transfers, swaps, bridging
├── frontend-patterns.md # React/Next.js, WebSocket, real-time UX
├── rpc-methods.md # RPC reference, rate limits, batching
├── smart-contracts.md # MegaEVM patterns, volatile data, predeploys
├── storage-optimization.md # SSTORE costs, Solady RedBlackTreeLib
├── gas-model.md # Gas costs, estimation, base fee
├── testing.md # Foundry/testing + general debugging entrypoint
├── mega-evme.md # mega-evme local replay/spec-aware debugging workflow
├── security.md # Vulnerabilities and prevention
├── erc7710-delegations.md # ERC-7710 delegation framework, caveats, permissions
├── smart-accounts.md # MetaMask Smart Accounts Kit, signers, user operations
├── gator-cli.md # MetaMask Delegation Toolkit CLI for delegations and redemption flows
├── meridian.md # Meridian x402 payments on MegaETH
├── meganames.md # MegaNames (.mega) — registration, resolution, subdomains, marketplace
├── warren.md # Warren Protocol — on-chain website hosting
├── vrf-drand.md # drand VRF / verifiable randomness on MegaETH
└── resources.md # Links, tools, explorers, bridges, DEX
Once installed, your AI agent will automatically use this skill when you ask about:
- Building dApps on MegaETH
- Transaction submission and confirmation
- Smart contract development with MegaEVM
- Storage optimization and gas costs
- Real-time WebSocket subscriptions
- Debugging failed transactions
- Replaying or locally debugging MegaETH transactions with mega-evme
- Understanding when to use Foundry vs mega-evme for diagnosis
"Set up a wallet for MegaETH"
"Send 0.1 ETH on MegaETH"
"Swap USDM for ETH on MegaETH"
"Bridge ETH from Ethereum to MegaETH"
"Set up a Next.js app with MegaETH wallet connection"
"Deploy a contract to MegaETH with Foundry"
"Why is my transaction using so much gas?"
"How do I subscribe to real-time mini-blocks?"
"Optimize this contract for MegaETH storage costs"
"Debug this failed transaction on MegaETH"
"Set up ERC-7710 delegations and scoped permissions"
"Create a MetaMask Smart Account on MegaETH"
"Use gator-cli with a delegated MegaETH wallet"
"Set up spending limits and time-bound permissions"
"Implement redelegation chains"
"Build a lottery or reveal flow with drand VRF on MegaETH"
"How should I safely integrate randomness on MegaETH?"
"Protect an API route with Meridian on MegaETH"
"Set up a buyer agent to pay with USDm through Meridian"
"Register a .mega name and resolve it"
"Set up subdomain sales with token gating"
"Integrate MegaNames resolution into my dApp"
testing.md→ broad testing, Foundry workflows, common troubleshootingmega-evme.md→ local replay, trace analysis, spec-aware MegaEVM debuggingsmart-contracts.md→ contract design constraints, system contracts, volatile data behavior
MegaETH supports eth_sendRawTransactionSync (EIP-7966), which enables low-latency synchronous receipt return instead of requiring a separate polling loop:
const receipt = await client.request({
method: 'eth_sendRawTransactionSync',
params: [signedTx]
});
// Receipt returned in the same RPC flowMegaETH behavior is spec-versioned through REX5, and not every new MegaEVM behavior is necessarily active on every network yet. Agents should avoid assuming unstable spec behavior (for example REX5 system-contract changes) is live unless the user explicitly asks about current unstable behavior or local node state.
New storage slots are expensive (2M+ gas). The skill teaches agents to:
- Use Solady's RedBlackTreeLib instead of mappings
- Design for slot reuse
- Consider off-chain storage for large data
MegaETH has a stable 0.001 gwei base fee with no EIP-1559 adjustment. The skill teaches agents to:
- Skip unnecessary gas estimation
- Use remote estimation (MegaEVM costs differ from standard EVM)
- Hardcode gas limits for known operations
| Network | Chain ID | RPC | Explorer |
|---|---|---|---|
| Mainnet | 4326 | https://mainnet.megaeth.com/rpc |
https://mega.etherscan.io |
| Testnet | 6343 | https://carrot.megaeth.com/rpc |
https://megaeth-testnet-v2.blockscout.com |
The skill uses progressive disclosure — the main SKILL.md provides core guidance, and the agent reads specialized files only when needed for specific tasks. This keeps context efficient while providing deep expertise when required.
This skill incorporates best practices from:
- MegaETH Official Documentation
- MegaEVM Specification
- EIP-7966 (eth_sendRawTransactionSync)
- MetaMask Smart Accounts Kit
- MetaMask Delegation Toolkit / gator
- MegaETH team technical guidance
Contributions welcome! Please ensure updates reflect current MegaETH ecosystem best practices.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT