home / skills / omer-metin / skills-for-antigravity / account-abstraction

account-abstraction skill

/skills/account-abstraction

This skill helps you implement and audit ERC-4337 account abstraction, smart wallets, and paymaster workflows with precise validation and risk-aware guidance.

npx playbooks add skill omer-metin/skills-for-antigravity --skill account-abstraction

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.2 KB
---
name: account-abstraction
description: Comprehensive expertise in ERC-4337 account abstraction, smart contract wallets, paymasters, bundlers, and user operation handling. Covers social recovery, session keys, gas sponsorship, and wallet SDKs. Use when "account abstraction, ERC-4337, smart wallet, paymaster, bundler, user operation, gasless transaction, session keys, social recovery, smart account, " mentioned. 
---

# Account Abstraction

## Identity



## 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.

Overview

This skill delivers practical, hands-on expertise in ERC-4337 account abstraction, smart contract wallets, paymasters, bundlers, and user operation handling. It focuses on secure smart account design patterns such as social recovery and session keys, gas sponsorship models, and integration with wallet SDKs. Use it to architect, diagnose, or validate production-ready account abstraction flows.

How this skill works

I inspect implementation patterns and validate them against the provided reference guidance for creation, known sharp-edge failures, and strict validation rules. I analyze user operations, bundler behavior, paymaster logic, and smart wallet interfaces to identify security, UX, and gas-efficiency issues. I provide corrective recommendations, implementation templates, and testable validation checks.

When to use it

  • Designing or reviewing an ERC-4337 smart contract wallet (smart account) architecture
  • Implementing paymasters for gas sponsorship or gasless transactions
  • Building or debugging bundlers and user operation lifecycles
  • Adding session keys, social recovery, or delegated signing to wallets
  • Validating wallet SDK integrations and onboarding flows

Best practices

  • Follow established creation patterns for account abstraction primitives and prefer battle-tested templates for entrypoint and account contracts
  • Validate all user operation fields against strict rules before submission (nonce, signature, gas limits, callData integrity)
  • Design paymasters with explicit budget controls and replay protection to limit financial exposure
  • Use session keys with scoped permissions and expiry instead of long-lived universal keys
  • Build social recovery with multi-step verification and off-chain attestations to reduce single-point failure

Example use cases

  • Audit a custom smart account and produce a prioritized list of critical fixes and compliance checks
  • Design a paymaster that sponsors gas for onboarding while preventing abuse via rate limits and stake checks
  • Implement session-key flows in a mobile wallet SDK with scoped minting and time-bound permissions
  • Troubleshoot bundler failures by tracing user operation signing, entryPoint validation, and paymaster acceptance
  • Create test suites that assert validations for nonce replay, gas estimation, and signature verification

FAQ

Can this skill verify a wallet is ERC-4337 compliant?

Yes — I validate against the strict validation rules and known failure modes, checking entryPoint expectations, user operation fields, and required contract behaviours.

How do you reduce risk when sponsoring gas?

Implement spend limits, per-user rate controls, stake or collateral requirements, and explicit revert handling to avoid unlimited liability.