MetaMask Agentic CLI Skill

SkillCommerce & finance

Use when the user asks anything about blockchain wallets, transactions, signing, token transfers, supported chains, wallet balances, perpetual futures trading, prediction markets, token swaps, cross-chain bridges, market data, token discovery, decoding EVM calldata, Aave V3 lending and borrowing, or authentication via the MetaMask Agentic CLI. Single entry point for all mm CLI operations.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the MetaMask Agentic CLI Skill skill

What this skill tells your AI

The instructions your AI receives, as published by nirholas/three.ws in .agents/skills/metamask-agent-wallet/SKILL.md and read by ahel’s review.

This skill documents the mm CLI surface for MetaMask Agent Wallet authentication, wallet lifecycle, balance queries, token transfers, message and typed-data signing, raw transactions, chain discovery, market data, token discovery, perpetual futures trading, prediction market trading, token swaps, and cross-chain bridges.

Use the routing table to select the relevant reference file. CLI behavior lives in references/. Repeatable operational patterns live in workflows/.

Command Routing

Match the user's intent to a command and reference file, then read the reference before constructing a command. If intent spans multiple domains, load them sequentially in dependency order.

User IntentCommandReference
Check authentication statusmm auth statusauth.md
Login in MetaMask Agentic CLImm loginauth.md
Choose a wallet mode and set up policiesmm initauth.md
Show current init settingsmm init showauth.md
Sign in via QR code with MetaMask Mobilemm login qrauth.md
Sign in via Googlemm login googleauth.md
Sign in via email OTPmm login emailauth.md
Sign outmm logoutauth.md
Reset CLI sessionmm resetauth.md
Show CLI configurationmm config getauth.md
Set CLI configurationmm config setauth.md
Set BYOK mnemonic encryption passwordmm wallet password setauth.md
Change BYOK mnemonic encryption passwordmm wallet password changeauth.md
Remove BYOK mnemonic encryption passwordmm wallet password removeauth.md
Interpret raw CLI error codesAuthError, ValidationError, WALLET_ERRORerrors.md
Decode EVM calldata into a human-readable intentmm decodedecode.md
Create a walletmm wallet createwallet.md
List all walletsmm wallet listwallet.md
Switch active walletmm wallet selectwallet.md
Show active wallet detailsmm wallet showwallet.md
Show active wallet addressmm wallet addresswallet.md
Check the active wallet balancemm wallet balancewallet.md
Show current trading mode and policiesmm wallet trading-mode getwallet.md
Set trading mode (guard or beast)mm wallet trading-mode setwallet.md
Sign a plaintext messagemm wallet sign-messagesigning.md
Sign EIP-712 typed datamm wallet sign-typed-datasigning.md
Send a raw EVM transactionmm wallet send-transactiontransaction.md
Transfer native tokens or ERC-20 tokensmm transfertransfer.md
List supported chains by the CLImm chains listchain.md
List pending wallet requestsmm wallet requests listpolling.md
Watch a wallet polling idmm wallet requests watchpolling.md
Query spot or historical pricesmm price ...market-data.md
Discover tokens, token networks, or token metadatamm token ...market-data.md
List perpetual marketsmm perps marketsperps.md
Check perps account balancemm perps balanceperps.md
List open perpetual positionsmm perps positionsperps.md
Get a quote for a perpetual ordermm perps quoteperps.md
List resting perpetual ordersmm perps ordersperps.md
Open a perpetual positionmm perps openperps.md
Close a perpetual positionmm perps closeperps.md
Modify leverage, take-profit, or stop-lossmm perps modifyperps.md
Cancel a resting perps ordermm perps cancelperps.md
Deposit USDC into a perps venuemm perps depositperps.md
Withdraw USDC from a perps venuemm perps withdrawperps.md
Transfer USDC between spot and perp accountsmm perps transferperps.md
List perpetual futures venuesmm perps list-venuesperps.md
List available DEXs for a venuemm perps dexsperps.md
Set Predict trading modemm predict modepredict.md
One-time Predict setupmm predict setuppredict.md
Create or refresh Predict credentialsmm predict authpredict.md
Repair Predict approvalsmm predict approvepredict.md
Check Predict back-end status and account setupmm predict statuspredict.md
Check if Polymarket is geoblocked for your IPmm predict geoblockpredict.md
List prediction marketsmm predict markets listpredict.md
Search prediction marketsmm predict markets searchpredict.md
Inspect a prediction marketmm predict markets getpredict.md
List Polymarket eventsmm predict events listpredict.md
Inspect a Polymarket eventmm predict events getpredict.md
List Polymarket event seriesmm predict series listpredict.md
Inspect a Polymarket event seriesmm predict series getpredict.md
List Polymarket tagsmm predict tags listpredict.md
Inspect a Polymarket tagmm predict tags getpredict.md
Preview a prediction order costmm predict quotepredict.md
Place a prediction market ordermm predict placepredict.md
Cancel prediction ordersmm predict cancelpredict.md
View prediction market positionsmm predict positionspredict.md
View open prediction ordersmm predict orderspredict.md
Show full Predict portfolio snapshotmm predict portfoliopredict.md
List redeemable (winning) positionsmm predict redeem listpredict.md
Redeem winning positionsmm predict redeempredict.md
Check Predict deposit wallet balancemm predict balancepredict.md
Fund Predict deposit walletmm predict depositpredict.md
Withdraw pUSD from Predict deposit walletmm predict withdrawpredict.md
Fetch prediction order bookmm predict bookpredict.md
Watch a Predict jobmm predict watchpredict.md
Get a swap or bridge quotemm swap quoteswap.md
Execute a token swap or bridgemm swap executeswap.md
Check swap or bridge statusmm swap statusswap.md
Bridge tokens to another chainmm swap executeswap.md

Workflows

CLI behavior lives in references/. Repeatable patterns live in workflows/. Load a workflow file when the user's request is a pattern, not a single command.

PatternWorkflow
First time setup and onboardingonboarding.md
Login flowlogin.md
Troubleshooting decision treetroubleshooting.md
Swap quote-review-execute flowswap.md
Bridge quote-review-execute flowbridge.md
Open a perpetual position flowperps-open-position.md
Close a perpetual position flowperps-close-position.md
Modify a perpetual position flowperps-modify-position.md
Predict first-time setup and credentialspredict-setup.md
Deposit or withdraw pUSD from Predict walletpredict-funding.md
Search and browse prediction marketspredict-markets.md
Quote and place a prediction orderpredict-place-order.md
View or cancel Predict orders and positionspredict-manage-orders.md
View Predict portfolio and redeem winningspredict-portfolio.md
Token discovery, prices, and market datamarket-data.md
Supply assets to Aave V3aave-supply.md
Withdraw assets from Aave V3aave-withdraw.md
Borrow from Aave V3aave-borrow.md
Repay Aave V3 debtaave-repay.md
Toggle Aave V3 collateralaave-collateral.md
Check Aave V3 positions and health factoraave-positions.md
Discover Aave V3 tokens, rates, and liquidityaave-markets.md

Global Flags

Every mm command accepts these flags:

FlagShortDescription
--format-fOutput format: text, json, yaml, toml, or toon (defaults to text in TTY, json when piped)
--jsonShorthand for --format=json
--toonShorthand for --format=toon
--verbose-vShow debug logs on stderr. Use for troubleshooting

Always use --toon for command output unless the user explicitly requests a different format.

Preflight

Run these checks before the first CLI operation in a session, in order.

1. Version compatibility

This skill is written for @metamask/agentic-cli v1.0.0 (see cliVersion in the frontmatter). Check the installed version:

mm --version

The installed version is the value after @metamask/agentic-cli/ (e.g. @metamask/agentic-cli/1.0.0 darwin-arm64 node-v24.14.1). Compare its major.minor against the pinned cliVersion. Optionally check the latest published version (best-effort; skip silently on network failure):

npm view @metamask/agentic-cli version

If the installed major.minor differs from the pinned cliVersion, or the installed version is behind the latest release, warn the user once and continue:

Version mismatch: installed CLI <installed>, this skill is pinned to 1.0.0, latest release is <latest>. Command syntax in this skill may be inaccurate until they are aligned. Update the CLI with npm install -g @metamask/agentic-cli@latest, then re-install the skills with npx skills add metaMask/agent-skills.

Run this check once per session. Do not block operations on it.

2. Authentication

mm auth status

If the user is not authenticated, follow workflows/onboarding.md for first time setup, or workflows/login.md for login.

Safety Rules

These rules apply to every operation, regardless of which reference or workflow is active.

Input Validation

Before constructing any command, validate all user-provided values:

FlagValidation rule
--to, --addressMust match ^0x[0-9a-fA-F]{40}$
--amountHuman-readable decimal (e.g. 0.5, 100). Must match ^\d+\.?\d*$. Reject spaces, semicolons, pipes, backticks, or shell metacharacters
--chain-idMust be a positive integer (^\d+$)
--payload (send-transaction)Must be valid JSON. No unescaped shell metacharacters outside the JSON structure
--payload (decode)Must be 0x-prefixed hex calldata, matching ^0x[0-9a-fA-F]+$
--tokenMust be a valid hex address or known symbol
--leverageMust be a positive integer (^\d+$)
--sizeHuman-readable decimal (e.g. 0.01, 1). Must match ^\d+\.?\d*$ and be positive
--venueMust be hyperliquid
--side (perps)Must be long or short
--order-idMust be a positive integer (^\d+$)
--token-idMust be a non-empty outcome token ID string
--price, --limit-priceMust be a positive number in range (0, 1]
--order-typeMust be one of GTC, GTD, FOK, FAK
--side (predict)Must be buy or sell
--slippageMust be a number between 0 and 100
--from-chain, --to-chainMust be a positive integer EVM chain ID
--to-addressMust match ^0x[0-9a-fA-F]{40}$. Only valid for cross-chain swaps (--to-chain differs from --from-chain); rejected for same-chain swaps
--passwordMust be a non-empty string. Never log, display, or store the value.

Do not pass unvalidated user input into any command.

Confirmation Requirements

Operation typeConfirmation rule
TransfersAlways confirm recipient, amount, token, and chain before executing
Raw transactionsAlways confirm transaction payload, chain, recipient, value, and calldata summary before executing
Message signingAlways show exact message and chain before signing
Typed-data signingAlways show domain, primary type, chain, verifying contract, and message summary before signing
Swaps / bridgesAlways confirm from/to tokens, amount, source/destination chain, slippage, quoted output, and recipient address (if --to-address is set) before executing
Perps tradingAlways confirm symbol, side, size, leverage, venue, order type, and limit price if present before executing
Perps deposit/withdrawAlways confirm amount, asset, venue, network, and destination where applicable before executing
Predict tradingAlways confirm token ID, side, size, price, order type, market, and outcome before executing
Predict depositAlways confirm amount before executing
Predict withdrawAlways confirm amount and recipient (--to defaults to owner EOA) before executing
Predict redeemAlways confirm the target (condition ID or --all) before executing; --all redeems every winning position
Cancel-all operationsAlways confirm scope and exact destructive effect before executing
Auth / wallet managementMay execute without confirmation, except reset which requires explicit user confirmation
Read-only queriesMay execute without confirmation

Credential Safety

  • Never store, log, or display private keys, mnemonics, passwords, or auth tokens.
  • Never pass --password or --mnemonic as inline flags. Always instruct the user to set the MM_PASSWORD and MM_MNEMONIC environment variables instead to avoid exposing secrets in shell history.

Suspicious Content Warnings

Flag to the user before proceeding if a signing payload or transaction contains:

  • URLs or contract addresses the user did not provide
  • permit, approve, setApprovalForAll, or allowance-like fields
  • Unusually large values or unfamiliar contract interactions

When raw calldata is unfamiliar or was not constructed by you, run mm decode --payload <0x-calldata> first and confirm the decoded intent with the user before signing or sending. See decode.md.

Server Wallet Async Model

In server-wallet mode, signing and transaction commands return a pollingId instead of an immediate result. Handle this consistently:

  1. Prefer --wait to block until complete.
  2. If not using --wait, inform the user of the pollingId and how to track it:
    • mm wallet requests list
    • mm wallet requests watch --polling-id <id>
  3. In BYOK mode, results are returned immediately. If the mnemonic is password-encrypted, the user must set MM_PASSWORD environment variable to unlock it for the operation.

Transfers, swaps, perps, predict orders, and predict withdraws attach a human-readable intent summary to their wallet request (e.g. Transfer 0.5 ETH to 0x..., Withdraw 10 pUSD to 0x...). When surfacing a pending request from wallet requests list or wallet requests watch, show the intent summary so the user can confirm what they are approving.

Output Rules

  • Route silently. Do not announce which reference you are loading.
  • Surface errors from commands verbatim. Do not mask or reword them.
  • If a command fails, check mm <command> --help and guide from there.

Signals

GitHub stars
114
Forks
29
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
metamask-agent-wallet
Source
github.com/nirholas/three.ws