Agent skill

Smart Accounts Kit

by LeoYeAI in LeoYeAI/openclaw-master-skills

Web3 development using MetaMask Smart Accounts Kit. An agent skill from LeoYeAI/openclaw-master-skills.

MITAuto-check passedBackend & APIs

Install Smart Accounts Kit

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-accounts-kit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills smart-accounts-kit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/smart-accounts-kit .claude/skills/smart-accounts-kit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smart-accounts-kit
GitHub stars
2.2k
Token cost
~6.5k tokens
SKILL.md length
1,476 words
Files
5 (incl. references)
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

Web3 development using MetaMask Smart Accounts Kit. An agent skill from LeoYeAI/openclaw-master-skills.

  • Works in 3 steps: Smart Accounts (ERC-4337) → Delegation Framework (ERC-7710) → Advanced Permissions (ERC-7715)
  • The user wants to build dApps with ERC-4337 smart accounts
  • SKILL.md covers Quick Reference, Package Installation, Core Concepts Summary and Quick Code Examples, plus 6 more sections
  • Calls npm; needs SESSION_KEY

What it does

Smart Accounts Kit is an agent skill from LeoYeAI/openclaw-master-skills. Web3 development using MetaMask Smart Accounts Kit. Use when the user wants to build dApps with ERC-4337 smart accounts, send user operations, batch transactions, configure signers (EOA, passkey, multisig), implement gas abstraction with paymasters, create delegations, or request advanced permissions (ERC-7715). Supports Viem integration, multiple signer types (Dynamic, Web3Auth, Wagmi), gasless transactions, and the Delegation Framework.

Its SKILL.md is about 6.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `_meta.json`, `references/advanced-permissions.md` and `references/delegations.md`).

It sits in Backend & APIs, covering Smart contracts. It works with viem and wagmi. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • The user wants to build dApps with ERC-4337 smart accounts
  • Send user operations
  • Batch transactions
  • Configure signers (EOA

Example prompts

  • “/smart-accounts-kit”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Smart Accounts (ERC-4337)
  2. Delegation Framework (ERC-7710)
  3. Advanced Permissions (ERC-7715)

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • calldata.swiss-knife.xyz
    • metamask.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SESSION_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smart Accounts Kit loads about 6.5k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 1,476 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~6.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~20k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 1,476 words, ~6,537 tokens.

Download SKILL.mdSave it as .claude/skills/smart-accounts-kit/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
smart-accounts-kit
description
Web3 development using MetaMask Smart Accounts Kit. Use when the user wants to build dApps with ERC-4337 smart accounts, send user operations, batch transactions, configure signers (EOA, passkey, multisig), implement gas abstraction with paymasters, create delegations, or request advanced permissions (ERC-7715). Supports Viem integration, multiple signer types (Dynamic, Web3Auth, Wagmi), gasless transactions, and the Delegation Framework.

Quick Reference

This skill file provides quick access to the MetaMask Smart Accounts Kit v0.3.0. For detailed information, refer to the specific reference files.

📚 Detailed References:

Package Installation

bash
npm install @metamask/smart-accounts-kit@0.3.0

For custom caveat enforcers:

bash
forge install metamask/delegation-framework@v1.3.0

Core Concepts Summary

1. Smart Accounts (ERC-4337)

Three implementation types:

ImplementationBest ForKey Feature
Hybrid (Implementation.Hybrid)Standard dApp usersEOA + passkey signers, most flexible
MultiSig (Implementation.MultiSig)Treasury/DAO operationsThreshold-based security, Safe-compatible
Stateless7702 (Implementation.Stateless7702)Power users with existing EOAKeep same address, add smart account features via EIP-7702

Decision Guide:

  • Building for general users? → Hybrid
  • Managing treasuries or multi-party control? → MultiSig
  • Upgrading existing EOAs without address change? → Stateless7702
2. Delegation Framework (ERC-7710)

Grant permissions from delegator to delegate:

  • Scopes - Initial authority (spending limits, function calls)
  • Caveats - Restrictions enforced by smart contracts
  • Types - Root, open root, redelegation, open redelegation
  • Lifecycle - Create → Sign → Store → Redeem
3. Advanced Permissions (ERC-7715)

Request permissions via MetaMask extension:

  • Human-readable UI confirmations
  • ERC-20 and native token permissions
  • Requires MetaMask Flask 13.5.0+
  • User must have smart account

Quick Code Examples

Create Smart Account
typescript
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0x...')

const smartAccount = await toMetaMaskSmartAccount({
  client: publicClient,
  implementation: Implementation.Hybrid,
  deployParams: [account.address, [], [], []],
  deploySalt: '0x',
  signer: { account },
})
Create Delegation
typescript
import { createDelegation } from '@metamask/smart-accounts-kit'
import { parseUnits } from 'viem'

const delegation = createDelegation({
  to: delegateAddress,
  from: delegatorSmartAccount.address,
  environment: delegatorSmartAccount.environment,
  scope: {
    type: 'erc20TransferAmount',
    tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
    maxAmount: parseUnits('10', 6),
  },
  caveats: [
    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },
    { type: 'limitedCalls', limit: 5 },
  ],
})
Sign Delegation
typescript
const signature = await smartAccount.signDelegation({ delegation })
const signedDelegation = { ...delegation, signature }
Redeem Delegation
typescript
import { createExecution, ExecutionMode } from '@metamask/smart-accounts-kit'
import { DelegationManager } from '@metamask/smart-accounts-kit/contracts'
import { encodeFunctionData, erc20Abi } from 'viem'

const callData = encodeFunctionData({
  abi: erc20Abi,
  args: [recipient, parseUnits('1', 6)],
  functionName: 'transfer',
})

const execution = createExecution({ target: tokenAddress, callData })

const redeemCalldata = DelegationManager.encode.redeemDelegations({
  delegations: [[signedDelegation]],
  modes: [ExecutionMode.SingleDefault],
  executions: [[execution]],
})

// Via smart account
const userOpHash = await bundlerClient.sendUserOperation({
  account: delegateSmartAccount,
  calls: [{ to: delegateSmartAccount.address, data: redeemCalldata }],
})

// Via EOA
const txHash = await delegateWalletClient.sendTransaction({
  to: environment.DelegationManager,
  data: redeemCalldata,
})
Request Advanced Permissions
typescript
import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'

const walletClient = createWalletClient({
  transport: custom(window.ethereum),
}).extend(erc7715ProviderActions())

const grantedPermissions = await walletClient.requestExecutionPermissions([
  {
    chainId: chain.id,
    expiry: now + 604800,
    signer: {
      type: 'account',
      data: { address: sessionAccount.address },
    },
    permission: {
      type: 'erc20-token-periodic',
      data: {
        tokenAddress,
        periodAmount: parseUnits('10', 6),
        periodDuration: 86400,
        justification: 'Transfer 10 USDC daily',
      },
    },
    isAdjustmentAllowed: true,
  },
])
Redeem Advanced Permissions
typescript
// Smart account
import { erc7710BundlerActions } from '@metamask/smart-accounts-kit/actions'

const bundlerClient = createBundlerClient({
  client: publicClient,
  transport: http(bundlerUrl),
}).extend(erc7710BundlerActions())

const permissionsContext = grantedPermissions[0].context
const delegationManager = grantedPermissions[0].signerMeta.delegationManager

const userOpHash = await bundlerClient.sendUserOperationWithDelegation({
  publicClient,
  account: sessionAccount,
  calls: [
    {
      to: tokenAddress,
      data: calldata,
      permissionsContext,
      delegationManager,
    },
  ],
})

// EOA
import { erc7710WalletActions } from '@metamask/smart-accounts-kit/actions'

const walletClient = createWalletClient({
  account: sessionAccount,
  chain,
  transport: http(),
}).extend(erc7710WalletActions())

const txHash = await walletClient.sendTransactionWithDelegation({
  to: tokenAddress,
  data: calldata,
  permissionsContext,
  delegationManager,
})

Key API Methods

Smart Accounts
  • toMetaMaskSmartAccount() - Create smart account
  • aggregateSignature() - Combine multisig signatures
  • signDelegation() - Sign delegation
  • signUserOperation() - Sign user operation
  • signMessage() / signTypedData() - Standard signing
Delegations
  • createDelegation() - Create delegation with delegate
  • createOpenDelegation() - Create open delegation
  • createCaveatBuilder() - Build caveats array
  • createExecution() - Create execution struct
  • redeemDelegations() - Encode redemption calldata
  • signDelegation() - Sign with private key
  • getSmartAccountsEnvironment() - Resolve environment
  • deploySmartAccountsEnvironment() - Deploy contracts
  • overrideDeployedEnvironment() - Override environment
Advanced Permissions
  • erc7715ProviderActions() - Wallet client extension for requesting
  • requestExecutionPermissions() - Request permissions
  • erc7710BundlerActions() - Bundler client extension
  • sendUserOperationWithDelegation() - Redeem with smart account
  • erc7710WalletActions() - Wallet client extension
  • sendTransactionWithDelegation() - Redeem with EOA

Supported ERC-7715 Permission Types

ERC-20 Token Permissions
Permission TypeDescription
erc20-token-periodicPer-period limit that resets at each period
erc20-token-streamLinear streaming with amountPerSecond rate
Native Token Permissions
Permission TypeDescription
native-token-periodicPer-period ETH limit that resets
native-token-streamLinear ETH streaming with amountPerSecond rate

Common Delegation Scopes

Spending Limits
ScopeDescription
erc20TransferAmountFixed ERC-20 limit
erc20PeriodTransferPer-period ERC-20 limit
erc20StreamingLinear streaming ERC-20
nativeTokenTransferAmountFixed native token limit
nativeTokenPeriodTransferPer-period native token limit
nativeTokenStreamingLinear streaming native
erc721TransferERC-721 (NFT) transfer
Function Calls
ScopeDescription
functionCallSpecific methods/addresses allowed
ownershipTransferOwnership transfers only

Common Caveat Enforcers

Target & Method
  • allowedTargets - Limit callable addresses
  • allowedMethods - Limit callable methods
  • allowedCalldata - Validate specific calldata
  • exactCalldata / exactCalldataBatch - Exact calldata match
  • exactExecution / exactExecutionBatch - Exact execution match
Value & Token
  • valueLte - Limit native token value
  • erc20TransferAmount - Limit ERC-20 amount
  • erc20BalanceChange - Validate ERC-20 balance change
  • erc721Transfer / erc721BalanceChange - ERC-721 restrictions
  • erc1155BalanceChange - ERC-1155 validation
Time & Frequency
  • timestamp - Valid time range (seconds)
  • blockNumber - Valid block range
  • limitedCalls - Limit redemption count
  • erc20PeriodTransfer / erc20Streaming - Time-based ERC-20
  • nativeTokenPeriodTransfer / nativeTokenStreaming - Time-based native
Security & State
  • redeemer - Limit redemption to specific addresses
  • id - One-time delegation with ID
  • nonce - Bulk revocation via nonce
  • deployed - Auto-deploy contract
  • ownershipTransfer - Ownership transfer only
  • nativeTokenPayment - Require payment
  • nativeBalanceChange - Validate native balance
  • multiTokenPeriod - Multi-token period limits

Execution Modes

ModeChainsProcessingOn Failure
SingleDefaultOneSequentialRevert
SingleTryOneSequentialContinue
BatchDefaultMultipleInterleavedRevert
BatchTryMultipleInterleavedContinue

Contract Addresses (v1.3.0)

Core
ContractAddress
EntryPoint0x0000000071727De22E5E9d8BAf0edAc6f37da032
SimpleFactory0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c
DelegationManager0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3
MultiSigDeleGatorImpl0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7
HybridDeleGatorImpl0x48dBe696A4D990079e039489bA2053B36E8FFEC4

Critical Rules

Always Required
  1. Always use caveats - Never create unrestricted delegations
  2. Deploy delegator first - Account must be deployed before redeeming
  3. Check smart account status - ERC-7715 requires user has smart account
Behavior
  1. Caveats are cumulative - In delegation chains, restrictions stack
  2. Function call default - v0.3.0 defaults to NO native token (use valueLte)
  3. Batch mode caveat - No compatible caveat enforcers available
Requirements
  1. ERC-7715 requirements - MetaMask Flask 13.5.0+, smart account
  2. Multisig threshold - Need at least threshold signers
  3. 7702 upgrade - Stateless7702 requires EIP-7702 upgrade first

Advanced Patterns

Parallel User Operations (Nonce Keys)

Smart accounts use a 256-bit nonce structure: 192-bit key + 64-bit sequence. Each unique key has its own independent sequence, enabling parallel execution. This is critical for backend services processing multiple delegations concurrently.

Installation

For proper nonce handling, install the permissionless SDK alongside the Smart Accounts Kit:

bash
npm install permissionless
How Parallel Nonces Work

ERC-4337 uses a single uint256 nonce where:

  • 192 bits = key identifier (allows parallel streams)
  • 64 bits = sequence number (increments per key)

Each key has an independent sequence, so UserOps with different keys execute in parallel without ordering constraints.

Getting Nonce with Permissionless
typescript
import { getAccountNonce } from 'permissionless'
import { entryPoint07Address } from 'viem/account-abstraction'

// Get nonce for a specific key
const parallelNonce = await getAccountNonce(publicClient, {
  address: smartAccount.address,
  entryPointAddress: entryPoint07Address,
  key: BigInt(Date.now()), // Unique key for parallel execution
})

const userOpHash = await bundlerClient.sendUserOperation({
  account: smartAccount,
  calls: [redeemCalldata],
  nonce: parallelNonce, // Properly encoded 256-bit nonce
})
Parallel Execution Pattern
typescript
import { getAccountNonce } from 'permissionless'
import { entryPoint07Address } from 'viem/account-abstraction'

// Execute multiple redemption UserOps in parallel
const redeems = await Promise.all(
  delegations.map(async (delegation, index) => {
    // Generate unique key for this operation
    const nonceKey = BigInt(Date.now()) + BigInt(index * 1000)
    
    // Get properly encoded nonce for this key
    const nonce = await getAccountNonce(publicClient, {
      address: backendSmartAccount.address,
      entryPointAddress: entryPoint07Address,
      key: nonceKey,
    })
    
    const redeemCalldata = DelegationManager.encode.redeemDelegations({
      delegations: [[delegation]],
      modes: [ExecutionMode.SingleDefault],
      executions: [[execution]],
    })
    
    return bundlerClient.sendUserOperation({
      account: backendSmartAccount,
      calls: [{ to: backendSmartAccount.address, data: redeemCalldata }],
      nonce, // Parallel execution enabled via unique key
    })
  })
)
Without Permissionless (Manual Approach)

The EntryPoint contract encodes nonce as: sequence | (key << 64)

If not using permissionless, encode manually:

typescript
// EntryPoint: nonceSequenceNumber[sender][key] | (uint256(key) << 64)
const key = BigInt(Date.now())
const sequence = 0n // New key starts at sequence 0
const nonce = sequence | (key << 64n)
// Or equivalently: (key << 64n) | sequence

However, getAccountNonce from permissionless is recommended as it:

  • Fetches the current sequence for the key from the EntryPoint
  • Properly encodes the 256-bit value
  • Handles edge cases and validation
Key Points
  • Different keys = parallel execution — no ordering guarantees between different keys
  • Same key = sequential execution — sequence increments monotonically per key
  • Use cases: Backend redemption services, DCA apps, high-frequency trading, batch operations
  • Nonce generation: getAccountNonce returns the full 256-bit nonce properly encoded
Common Mistakes
MistakeResult
Reusing same nonce keySequential execution (defeats purpose)
Using Date.now() without offsetPotential collision if multiple ops fire simultaneously
Not using getAccountNonceMay miss current sequence, causing replacement instead of new op
Assuming orderingRace conditions in dependent operations
Error Handling
typescript
const results = await Promise.allSettled(redeems)

results.forEach((result, index) => {
  if (result.status === 'rejected') {
    // Check for specific errors
    if (result.reason.message?.includes('AA25')) {
      console.error(`Nonce collision for op ${index}`)
    }
    // Handle or retry
  }
})
Backend Delegation Redemption

For server-side automation (DCA bots, keeper services, automated trading):

typescript
// 1. Backend creates its own smart account as delegate
const backendAccount = await toMetaMaskSmartAccount({
  client: publicClient,
  implementation: Implementation.Hybrid,
  deployParams: [backendOwner.address, [], [], []],
  deploySalt: '0x',
  signer: { account: backendOwner },
})

// 2. Backend redeems by sending UserOp FROM its account
const userOpHash = await bundlerClient.sendUserOperation({
  account: backendAccount,
  calls: [{
    to: backendAccount.address,
    data: DelegationManager.encode.redeemDelegations({
      delegations: [[userDelegation]],
      modes: [ExecutionMode.SingleDefault],
      executions: [[swapExecution]],
    })
  }],
})

Use case: Automated dollar-cost averaging (DCA) bots that redeem swap delegations based on market signals or scheduled intervals.

Show full SKILL.md (594 more words)Show less
Counterfactual Account Deployment

Delegator accounts must be deployed before delegations can be redeemed. The DelegationManager reverts with 0xb9f0f171 for counterfactual accounts.

Solution: Deploy automatically via first UserOp:

typescript
// Build redemption calldata
const redeemCalldata = DelegationManager.encode.redeemDelegations({
  delegations: [[signedDelegation]],
  modes: [ExecutionMode.SingleDefault],
  executions: [[execution]],
})

// First redemption deploys the account automatically via initCode
const userOpHash = await bundlerClient.sendUserOperation({
  account: smartAccount, // Will deploy if counterfactual
  calls: [{
    to: smartAccount.address,
    data: redeemCalldata,
    value: 0n,
  }],
})
Session Accounts for AI Agents

For automated services, session accounts act as isolated signers that can only operate within granted delegations. The private key can be generated ephemerally, stored in environment variables, or managed via HSM/server wallets:

typescript
// Session account created from various sources
const sessionAccount = privateKeyToAccount(
  process.env.SESSION_KEY || generatePrivateKey() || hsmWallet.key
)

// Request delegation from user to session account
const delegation = createDelegation({
  to: sessionAccount.address,
  from: userSmartAccount.address,
  environment,
  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('100', 6) },
  caveats: [
    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },
    { type: 'limitedCalls', limit: 10 },
  ],
})
// Session account can only act within delegation constraints

Common Patterns

Pattern 1: ERC-20 with Time Limit
typescript
const delegation = createDelegation({
  to: delegate,
  from: delegator,
  environment,
  scope: {
    type: 'erc20TransferAmount',
    tokenAddress,
    maxAmount: parseUnits('100', 6),
  },
  caveats: [
    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },
    { type: 'limitedCalls', limit: 10 },
    { type: 'redeemer', redeemers: [delegate] },
  ],
})
Pattern 2: Function Call with Value
typescript
const delegation = createDelegation({
  to: delegate,
  from: delegator,
  environment,
  scope: {
    type: 'functionCall',
    targets: [contractAddress],
    selectors: ['transfer(address,uint256)'],
    valueLte: { maxValue: parseEther('0.1') },
  },
  caveats: [{ type: 'allowedMethods', selectors: ['transfer(address,uint256)'] }],
})
Pattern 3: Periodic Native Token
typescript
const delegation = createDelegation({
  to: delegate,
  from: delegator,
  environment,
  scope: {
    type: 'nativeTokenPeriodTransfer',
    periodAmount: parseEther('0.01'),
    periodDuration: 86400,
    startDate: now,
  },
})
Pattern 4: Redelegation Chain
typescript
// Alice → Bob (100 USDC)
const aliceToBob = createDelegation({
  to: bob,
  from: alice,
  environment,
  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('100', 6) },
})

// Bob → Carol (50 USDC, subset of authority)
const bobToCarol = createDelegation({
  to: carol,
  from: bob,
  environment,
  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('50', 6) },
  parentDelegation: aliceToBob,
  caveats: [{ type: 'timestamp', afterThreshold: now, beforeThreshold: expiry }],
})

Troubleshooting Quick Fixes

IssueSolution
Account not deployedUse bundlerClient.sendUserOperation() to deploy
Invalid signatureVerify chain ID, delegation manager, signer permissions
Caveat enforcer revertedCheck caveat parameters match execution, verify order
Redemption failedCheck delegator balance, calldata validity, target contracts
ERC-7715 not workingUpgrade to Flask 13.5.0+, ensure user has smart account
Permission deniedHandle gracefully, provide manual fallback
Threshold not metAdd more signers for multisig
7702 not workingConfirm EOA upgraded via EIP-7702 first

Error Code Reference

Error codes from the MetaMask Delegation Framework contracts (v1.3.0). Use a decoder like calldata.swiss-knife.xyz to identify error signatures.

DelegationManager Errors (Verified)
Error CodeError NameMeaning
0xb5863604InvalidDelegate()Caller is not the delegate — Most common error
0xb9f0f171InvalidDelegator()Caller is not the delegator
0x05baa052CannotUseADisabledDelegation()Attempting to redeem a disabled delegation
0xded4370eInvalidAuthority()Delegation chain authority validation failed
0x1bcaf69fBatchDataLengthMismatch()Array lengths don't match in batch
0x005ecddbAlreadyDisabled()Delegation has already been disabled
0xf2a5f75aAlreadyEnabled()Delegation is already enabled
0xf645eedfECDSAInvalidSignature()Invalid ECDSA signature format
0xfce698f7ECDSAInvalidSignatureLength(uint256)Signature length is incorrect
0xd78bce0cECDSAInvalidSignatureS(bytes32)Signature S value is invalid
0xac241e11EmptySignature()Signature is empty
0xd93c0665EnforcedPause()Contract is paused
0x3db6791cInvalidEOASignature()EOA signature verification failed
0x155ff427InvalidERC1271Signature()Smart contract signature (ERC1271) failed
0x118cdaa7OwnableUnauthorizedAccount(address)Unauthorized account attempted owner-only action
0x1e4fbdf7OwnableInvalidOwner(address)Invalid owner address in ownership transfer
0xf6b6ef5bInvalidShortString()String parameter too short
0xaa0ea2d8StringTooLong(string)String parameter exceeds maximum length
DeleGatorCore Errors (Verified)
Error CodeError NameMeaning
0xd663742aNotEntryPoint()Caller is not the EntryPoint contract
0x0796d945NotEntryPointOrSelf()Caller is neither EntryPoint nor this contract
0x1a4b3a04NotDelegationManager()Caller is not the DelegationManager
0xb96fcfe4UnsupportedCallType(bytes1)Execution call type not supported
0x1187dc06UnsupportedExecType(bytes1)Execution type not supported
0x29c3b7eeNotSelf()Caller is not this contract itself
Common Caveat Enforcer Errors (Revert Strings)
Error StringMeaning
AllowedTargetsEnforcer:target-address-not-allowedTarget contract not in allowed list
AllowedTargetsEnforcer:invalid-terms-lengthTerms length not multiple of 20 bytes
ERC20TransferAmountEnforcer:invalid-terms-lengthTerms must be 52 bytes
ERC20TransferAmountEnforcer:invalid-contractTarget doesn't match allowed token
ERC20TransferAmountEnforcer:invalid-methodMethod is not transfer
ERC20TransferAmountEnforcer:allowance-exceededTransfer exceeds delegated limit
CaveatEnforcer:invalid-call-typeMust use single call type
CaveatEnforcer:invalid-execution-typeMust use default execution type
Most Common Errors in Production

0xb5863604 — InvalidDelegate()

  • Cause: Caller doesn't match the delegate address in delegation
  • Fix: Verify msg.sender equals the to address in the delegation

0xb9f0f171 — InvalidDelegator()

  • Cause: Attempting to enable/disable from wrong address, or counterfactual account
  • Fix: Only delegator can enable/disable; for counterfactual, first UserOp auto-deploys

0x05baa052 — CannotUseADisabledDelegation()

  • Cause: Delegation was disabled by delegator
  • Fix: Ask delegator to re-enable, or use different delegation

0xded4370e — InvalidAuthority()

  • Cause: Broken delegation chain (redelegation parent mismatch)
  • Fix: Ensure redelegation chains are properly ordered (leaf → root)

0x1bcaf69f — BatchDataLengthMismatch()

  • Cause: Array lengths don't match in redeemDelegations call
  • Fix: Ensure permissionContexts, modes, executionCallDatas have equal length

0x3db6791c — InvalidEOASignature()

  • Cause: EOA signature invalid, wrong chain, or wrong delegation manager
  • Fix: Verify signature was created with correct chain ID and delegation manager

Resources

  • NPM: @metamask/smart-accounts-kit
  • Contracts: metamask/delegation-framework@v1.3.0
  • ERC Standards: ERC-4337, ERC-7710, ERC-7715, ERC-7579
  • MetaMask Flask: https://metamask.io/flask

Version Info

  • Toolkit: 0.3.0
  • Delegation Framework: 1.3.0
  • Breaking Change: Function call scope defaults to no native token transfer

For detailed documentation, see the reference files in the /references directory.

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/smart-accounts-kit of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • _meta.json
  • references/advanced-permissions.md
  • references/delegations.md
  • references/smart-accounts.md

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Smart Accounts Kit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smart Accounts Kit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smart Accounts Kit this skillLeoYeAI/openclaw-master-skills2.2k—~6.5kAutomated safety check: PassMIT
Bridge Tokenscirclefin/skills155—~4.5kAutomated safety check: NotesApache-2.0
Use Arccirclefin/skills155—~2.1kAutomated safety check: NotesApache-2.0
Alchemy Hello Worldjeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT
Alchemy Core Workflow Bjeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT
Dapp Frontend Patternsccashwell/evm-cortex131—~1.9kAutomated safety check: PassMIT

Similar skills

  • Bridge Tokens

    circlefin/skills

    Build browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit.

    155 GitHub stars~4.5k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Use Arc

    circlefin/skills

    Provide instructions on how to build with Arc, Circle's blockchain where USDC is the native gas token.

    155 GitHub stars~2.1k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Alchemy Hello World

    jeremylongshore/tons-of-skills-marketplace

    Build a minimal, reviewable Alchemy EVM read with viem and prove its network, authentication, and failure behavior.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Alchemy Core Workflow B

    jeremylongshore/tons-of-skills-marketplace

    Build an NFT discovery workflow with Alchemy NFT API v3 and isolate typed on-chain reads through viem.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Dapp Frontend Patterns

    ccashwell/evm-cortex

    A skill your agent uses when building dApp frontends with wagmi v2 and viem.

    131 GitHub stars~1.9k tokensUpdated 11 days ago
    Frontend & DesignAuto-check passed
  • Fizz Convert

    pashov/skills

    Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes.

    1.2k GitHub starsUsed in 2 repos~3.7k tokens
    Backend & APIsAuto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,200 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Smart Accounts Kit

What does Smart Accounts Kit do?

Web3 development using MetaMask Smart Accounts Kit. An agent skill from LeoYeAI/openclaw-master-skills. Smart Accounts Kit is an agent skill from LeoYeAI/openclaw-master-skills. Web3 development using MetaMask Smart Accounts Kit.

When should I use Smart Accounts Kit?

Smart Accounts Kit fits situations like: the user wants to build dApps with ERC-4337 smart accounts; send user operations; batch transactions; configure signers (EOA.

How do I install Smart Accounts Kit in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-accounts-kit -a claude-code`. Or copy the skill folder (skills/smart-accounts-kit in LeoYeAI/openclaw-master-skills) into .claude/skills/smart-accounts-kit in your project. Claude Code loads it when a task matches its description.

How do I install Smart Accounts Kit in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-accounts-kit -a codex`. Or copy the skill folder (skills/smart-accounts-kit in LeoYeAI/openclaw-master-skills) into .agents/skills/smart-accounts-kit in your project. Codex loads it when a task matches its description.

Can I use Smart Accounts Kit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-accounts-kit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-accounts-kit, .gemini/skills/smart-accounts-kit, .github/skills/smart-accounts-kit and .opencode/skills/smart-accounts-kit in your project.

What does Smart Accounts Kit need to run?

Going by SKILL.md and its folder, Smart Accounts Kit needs the command-line tools its instructions call (npm) and credentials named SESSION_KEY. Our summary lists: Node.js.

Does Smart Accounts Kit access the network?

SKILL.md names 2 domains. As links in the text: calldata.swiss-knife.xyz and metamask.io. This is read from the text; nothing was executed.

Is Smart Accounts Kit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Smart Accounts Kit use?

Smart Accounts Kit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smart Accounts Kit use?

About 6.5k tokens (SKILL.md is roughly 26k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Smart Accounts Kit?

Skills that share tags, products or a category with Smart Accounts Kit: Bridge Tokens (circlefin/skills, 155 stars), Use Arc (circlefin/skills, 155 stars), Alchemy Hello World (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Alchemy Core Workflow B (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smart Accounts Kit?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.