🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

MetaMask Agent Wallet

by @andreolf

Control a sandboxed MetaMask browser extension wallet for autonomous blockchain transactions. Features configurable permission guardrails including spend limits, chain allowlists, protocol restrictions, and approval thresholds. MetaMask-only (other wallets not supported).

Versionv0.1.0
Installs4
βš™οΈ Configuration

1. Install Dependencies

cd metamask-agent-skill
npm install
npx playwright install chromium

2. Create Agent Wallet Profile

npm run setup

This will:

  • Create a fresh Chrome profile at ~/.agent-wallet/chrome-profile
  • Install MetaMask extension
  • Guide you through wallet creation (use a NEW seed phrase)
  • 3. Fund the Wallet

    Transfer a small amount to your agent wallet:

  • ETH for gas (0.01-0.05 ETH recommended)
  • Tokens for operations (start small, e.g., $50 USDC)
  • 4. Configure Permissions

    Edit permissions.json to set your constraints:

    {
      "constraints": {
        "spendLimit": {
          "daily": "50000000",    // $50 in 6-decimal format
          "perTx": "10000000"     // $10 max per transaction
        },
        "allowedChains": [1, 137, 42161],
        "allowedProtocols": ["0x...uniswap", "0x...1inch"]
      }
    }
    

    πŸ“‹ Tips & Best Practices

    "Protocol not allowed"

    Add the contract address to allowedProtocols in permissions.json.

    "Exceeds daily limit"

    Wait 24h or increase spendLimit.daily.

    MetaMask popup not detected

    Ensure the browser profile path is correct and MetaMask is installed.

    Transaction simulation failed

    The dapp may be trying to call a blocked method or unsupported chain.

    πŸ”’ Constraints

    All operations check against permissions.json before execution:

    | Constraint | Description | |------------|-------------| | spendLimit.daily | Max USD value per 24h period | | spendLimit.perTx | Max USD value per transaction | | allowedChains | Whitelisted chain IDs | | allowedProtocols | Whitelisted contract addresses | | blockedMethods | Forbidden function selectors | | requireApproval.above | Threshold requiring user confirmation |

    Approval Flow

    When a transaction exceeds requireApproval.above: 1. Agent pauses execution 2. Transaction details are logged 3. Agent reports: "Transaction requires approval: [details]" 4. User must explicitly approve before agent continues

    View on ClawHub
    TERMINAL
    clawhub install metamask-agent-wallet-skill

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’