metamask-agent-wallet-skillControl 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).
Install via ClawdBot CLI:
clawdbot install andreolf/metamask-agent-wallet-skillControls a sandboxed MetaMask wallet for autonomous blockchain transactions with configurable permission guardrails.
This skill allows AI agents to interact with dapps and execute transactions through a dedicated MetaMask wallet. All operations are subject to user-defined constraints (spend limits, protocol allowlists, approval thresholds).
Security Model: The agent controls a separate wallet in an isolated browser profile. Never use your main wallet.
cd metamask-agent-skill
npm install
npx playwright install chromium
npm run setup
This will:
~/.agent-wallet/chrome-profileTransfer a small amount to your agent wallet:
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"]
}
}
connect <dapp-url>
Navigates to dapp and connects the agent wallet.
Example: connect https://app.uniswap.org
swap <amount> <token-in> for <token-out> [on <dex>]
Executes a token swap on an allowed DEX.
Example: swap 0.01 ETH for USDC on uniswap
send <amount> <token> to <address>
Sends tokens to an address (within spend limits).
Example: send 10 USDC to 0x1234...
sign <message>
Signs an arbitrary message. Use with caution.
balance [token]
Returns wallet balances.
history [count]
Shows recent agent transactions with outcomes.
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 |
When a transaction exceeds requireApproval.above:
"revoked": true in permissions.json to disable all actionsAll transactions are logged to ~/.agent-wallet/logs/:
{
"timestamp": 1706900000000,
"action": "swap",
"intent": { "to": "0x...", "value": "0", "data": "0x..." },
"guardResult": { "allowed": true },
"outcome": "confirmed",
"txHash": "0x..."
}
Use history command to view recent transactions.
Add the contract address to allowedProtocols in permissions.json.
Wait 24h or increase spendLimit.daily.
Ensure the browser profile path is correct and MetaMask is installed.
The dapp may be trying to call a blocked method or unsupported chain.
src/
āāā index.ts # Main entry point
āāā browser.ts # Playwright browser management
āāā wallet.ts # MetaMask interaction primitives
āāā guard.ts # Permission enforcement
āāā logger.ts # Transaction logging
āāā price.ts # USD price estimation
āāā types.ts # TypeScript types
āāā config.ts # Configuration loading
When Gator accounts are available, permissions.json can be replaced with on-chain permission attestations. The guard will validate against Gator's permission registry instead of local config.
Generated Mar 1, 2026
An AI agent automatically rebalances a user's DeFi portfolio by executing token swaps on Uniswap or 1inch when market conditions shift. It adheres to daily spend limits and protocol allowlists to ensure safe, autonomous adjustments without manual intervention.
The agent facilitates cross-chain transfers by interacting with bridging protocols on allowed chains like Ethereum, Polygon, and Arbitrum. It handles gas payments and token approvals within configured constraints, streamlining multi-chain operations for users.
Users deploy the agent to manage yield farming strategies, such as depositing liquidity or claiming rewards on whitelisted protocols. It executes transactions based on predefined rules while enforcing spend caps and approval thresholds for risk management.
For NFT projects, the agent automates minting and secondary market trades on platforms like OpenSea by connecting to dapps and sending transactions. It uses permission guardrails to limit spending and restrict interactions to approved contracts.
Businesses use the agent to handle routine crypto payments, such as payroll in stablecoins or vendor settlements, with automated compliance checks. It ensures transactions stay within daily limits and only interact with allowed protocols for auditability.
Offer a monthly subscription where users pay for access to the AI agent skill, including updates and support. Revenue is generated from tiered plans based on transaction volume or advanced features like multi-wallet management.
License the skill to cryptocurrency exchanges, wallets, or DeFi platforms as an integrated automation tool. Charge licensing fees or revenue-sharing agreements based on user adoption and transaction throughput.
Provide a managed service where businesses outsource their crypto transaction automation with enhanced security monitoring and compliance reporting. Charge based on the complexity of permission setups and audit requirements.
š¬ Integration Tip
Ensure the isolated browser profile and MetaMask setup are correctly configured to avoid popup detection issues; regularly update allowed protocols in permissions.json to match evolving dapp integrations.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.