Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(seed): add MetaMask agent seed entries and skill backfill helpers

nirholas73735428a650
diff --git a/data/skills/seed.json b/data/skills/seed.json
index 6916cf44e..dcb1c765f 100644
--- a/data/skills/seed.json
+++ b/data/skills/seed.json
@@ -2643,7 +2643,59 @@
},
"name": "binance-us-mcp-guide",
"source": "builtin"
+ },
+ {
+ "category": "wallet",
+ "content": "# MetaMask Agentic CLI Skill\n\nThis 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.\n\nUse the routing table to select the relevant reference file. CLI behavior lives in `references/`. Repeatable operational patterns live in `workflows/`.\n\n## Command Routing\n\nMatch 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.\n\n| User Intent | Command | Reference |\n| --- | --- | --- |\n| Check authentication status | `mm auth status` | [auth.md](references/auth.md) |\n| Login in MetaMask Agentic CLI | `mm login` | [auth.md](references/auth.md) |\n| Choose a wallet mode and set up policies | `mm init` | [auth.md](references/auth.md) |\n| Show current init settings | `mm init show` | [auth.md](references/auth.md) |\n| Sign in via QR code with MetaMask Mobile | `mm login qr` | [auth.md](references/auth.md) |\n| Sign in via Google | `mm login google` | [auth.md](references/auth.md) |\n| Sign in via email OTP | `mm login email` | [auth.md](references/auth.md) |\n| Sign out | `mm logout` | [auth.md](references/auth.md) |\n| Reset CLI session | `mm reset` | [auth.md](references/auth.md) |\n| Show CLI configuration | `mm config get` | [auth.md](references/auth.md) |\n| Set CLI configuration | `mm config set` | [auth.md](references/auth.md) |\n| Set BYOK mnemonic encryption password | `mm wallet password set` | [auth.md](references/auth.md) |\n| Change BYOK mnemonic encryption password | `mm wallet password change` | [auth.md](references/auth.md) |\n| Remove BYOK mnemonic encryption password | `mm wallet password remove` | [auth.md](references/auth.md) |\n| Interpret raw CLI error codes | `AuthError`, `ValidationError`, `WALLET_ERROR` | [errors.md](references/errors.md) |\n| Decode EVM calldata into a human-readable intent | `mm decode` | [decode.md](references/decode.md) |\n| Create a wallet | `mm wallet create` | [wallet.md](references/wallet.md) |\n| List all wallets | `mm wallet list` | [wallet.md](references/wallet.md) |\n| Switch active wallet | `mm wallet select` | [wallet.md](references/wallet.md) |\n| Show active wallet details | `mm wallet show` | [wallet.md](references/wallet.md) |\n| Show active wallet address | `mm wallet address` | [wallet.md](references/wallet.md) |\n| Check the active wallet balance | `mm wallet balance` | [wallet.md](references/wallet.md) |\n| Show current trading mode and policies | `mm wallet trading-mode get` | [wallet.md](references/wallet.md) |\n| Set trading mode (guard or beast) | `mm wallet trading-mode set` | [wallet.md](references/wallet.md) |\n| Sign a plaintext message | `mm wallet sign-message` | [signing.md](references/signing.md) |\n| Sign EIP-712 typed data | `mm wallet sign-typed-data` | [signing.md](references/signing.md) |\n| Send a raw EVM transaction | `mm wallet send-transaction` | [transaction.md](references/transaction.md) |\n| Transfer native tokens or ERC-20 tokens | `mm transfer` | [transfer.md](references/transfer.md) |\n| List supported chains by the CLI | `mm chains list` | [chain.md](references/chain.md) |\n| List pending wallet requests | `mm wallet requests list` | [polling.md](references/polling.md) |\n| Watch a wallet polling id | `mm wallet requests watch` | [polling.md](references/polling.md) |\n| Query spot or historical prices | `mm price ...` | [market-data.md](references/market-data.md) |\n| Discover tokens, token networks, or token metadata | `mm token ...` | [market-data.md](references/market-data.md) |\n| List perpetual markets | `mm perps markets` | [perps.md](references/perps.md) |\n| Check perps account balance | `mm perps balance` | [perps.md](references/perps.md) |\n| List open perpetual positions | `mm perps positions` | [perps.md](references/perps.md) |\n| Get a quote for a perpetual order | `mm perps quote` | [perps.md](references/perps.md) |\n| List resting perpetual orders | `mm perps orders` | [perps.md](references/perps.md) |\n| Open a perpetual position | `mm perps open` | [perps.md](references/perps.md) |\n| Close a perpetual position | `mm perps close` | [perps.md](references/perps.md) |\n| Modify leverage, take-profit, or stop-loss | `mm perps modify` | [perps.md](references/perps.md) |\n| Cancel a resting perps order | `mm perps cancel` | [perps.md](references/perps.md) |\n| Deposit USDC into a perps venue | `mm perps deposit` | [perps.md](references/perps.md) |\n| Withdraw USDC from a perps venue | `mm perps withdraw` | [perps.md](references/perps.md) |\n| Transfer USDC between spot and perp accounts | `mm perps transfer` | [perps.md](references/perps.md) |\n| List perpetual futures venues | `mm perps list-venues` | [perps.md](references/perps.md) |\n| List available DEXs for a venue | `mm perps dexs` | [perps.md](references/perps.md) |\n| Set Predict trading mode | `mm predict mode` | [predict.md](references/predict.md) |\n| One-time Predict setup | `mm predict setup` | [predict.md](references/predict.md) |\n| Create or refresh Predict credentials | `mm predict auth` | [predict.md](references/predict.md) |\n| Repair Predict approvals | `mm predict approve` | [predict.md](references/predict.md) |\n| Check Predict back-end status and account setup | `mm predict status` | [predict.md](references/predict.md) |\n| Check if Polymarket is geoblocked for your IP | `mm predict geoblock` | [predict.md](references/predict.md) |\n| List prediction markets | `mm predict markets list` | [predict.md](references/predict.md) |\n| Search prediction markets | `mm predict markets search` | [predict.md](references/predict.md) |\n| Inspect a prediction market | `mm predict markets get` | [predict.md](references/predict.md) |\n| List Polymarket events | `mm predict events list` | [predict.md](references/predict.md) |\n| Inspect a Polymarket event | `mm predict events get` | [predict.md](references/predict.md) |\n| List Polymarket event series | `mm predict series list` | [predict.md](references/predict.md) |\n| Inspect a Polymarket event series | `mm predict series get` | [predict.md](references/predict.md) |\n| List Polymarket tags | `mm predict tags list` | [predict.md](references/predict.md) |\n| Inspect a Polymarket tag | `mm predict tags get` | [predict.md](references/predict.md) |\n| Preview a prediction order cost | `mm predict quote` | [predict.md](references/predict.md) |\n| Place a prediction market order | `mm predict place` | [predict.md](references/predict.md) |\n| Cancel prediction orders | `mm predict cancel` | [predict.md](references/predict.md) |\n| View prediction market positions | `mm predict positions` | [predict.md](references/predict.md) |\n| View open prediction orders | `mm predict orders` | [predict.md](references/predict.md) |\n| Show full Predict portfolio snapshot | `mm predict portfolio` | [predict.md](references/predict.md) |\n| List redeemable (winning) positions | `mm predict redeem list` | [predict.md](references/predict.md) |\n| Redeem winning positions | `mm predict redeem` | [predict.md](references/predict.md) |\n| Check Predict deposit wallet balance | `mm predict balance` | [predict.md](references/predict.md) |\n| Fund Predict deposit wallet | `mm predict deposit` | [predict.md](references/predict.md) |\n| Withdraw pUSD from Predict deposit wallet | `mm predict withdraw` | [predict.md](references/predict.md) |\n| Fetch prediction order book | `mm predict book` | [predict.md](references/predict.md) |\n| Watch a Predict job | `mm predict watch` | [predict.md](references/predict.md) |\n| Get a swap or bridge quote | `mm swap quote` | [swap.md](references/swap.md) |\n| Execute a token swap or bridge | `mm swap execute` | [swap.md](references/swap.md) |\n| Check swap or bridge status | `mm swap status` | [swap.md](references/swap.md) |\n| Bridge tokens to another chain | `mm swap execute` | [swap.md](references/swap.md) |\n\n## Workflows\n\nCLI 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.\n\n| Pattern | Workflow |\n| --- | --- |\n| First time setup and onboarding | [onboarding.md](workflows/onboarding.md) |\n| Login flow | [login.md](workflows/login.md) |\n| Troubleshooting decision tree | [troubleshooting.md](workflows/troubleshooting.md) |\n| Swap quote-review-execute flow | [swap.md](workflows/swap.md) |\n| Bridge quote-review-execute flow | [bridge.md](workflows/bridge.md) |\n| Open a perpetual position flow | [perps-open-position.md](workflows/perps-open-position.md) |\n| Close a perpetual position flow | [perps-close-position.md](workflows/perps-close-position.md) |\n| Modify a perpetual position flow | [perps-modify-position.md](workflows/perps-modify-position.md) |\n| Predict first-time setup and credentials | [predict-setup.md](workflows/predict-setup.md) |\n| Deposit or withdraw pUSD from Predict wallet | [predict-funding.md](workflows/predict-funding.md) |\n| Search and browse prediction markets | [predict-markets.md](workflows/predict-markets.md) |\n| Quote and place a prediction order | [predict-place-order.md](workflows/predict-place-order.md) |\n| View or cancel Predict orders and positions | [predict-manage-orders.md](workflows/predict-manage-orders.md) |\n| View Predict portfolio and redeem winnings | [predict-portfolio.md](workflows/predict-portfolio.md) |\n| Token discovery, prices, and market data | [market-data.md](workflows/market-data.md) |\n| Supply assets to Aave V3 | [aave-supply.md](workflows/aave-supply.md) |\n| Withdraw assets from Aave V3 | [aave-withdraw.md](workflows/aave-withdraw.md) |\n| Borrow from Aave V3 | [aave-borrow.md](workflows/aave-borrow.md) |\n| Repay Aave V3 debt | [aave-repay.md](workflows/aave-repay.md) |\n| Toggle Aave V3 collateral | [aave-collateral.md](workflows/aave-collateral.md) |\n| Check Aave V3 positions and health factor | [aave-positions.md](workflows/aave-positions.md) |\n| Discover Aave V3 tokens, rates, and liquidity | [aave-markets.md](workflows/aave-markets.md) |\n\n## Global Flags\n\nEvery `mm` command accepts these flags:\n\n| Flag | Short | Description |\n| --- | --- | --- |\n| `--format` | `-f` | Output format: `text`, `json`, `yaml`, `toml`, or `toon` (defaults to `text` in TTY, `json` when piped) |\n| `--json` | | Shorthand for `--format=json` |\n| `--toon` | | Shorthand for `--format=toon` |\n| `--verbose` | `-v` | Show debug logs on stderr. Use for troubleshooting |\n\nAlways use `--toon` for command output unless the user explicitly requests a different format.\n\n## Preflight\n\nRun these checks before the first CLI operation in a session, in order.\n\n### 1. Version compatibility\n\nThis skill is written for `@metamask/agentic-cli` **v1.0.0** (see `cliVersion` in the frontmatter). Check the installed version:\n\n```bash\nmm --version\n```\n\nThe 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):\n\n```bash\nnpm view @metamask/agentic-cli version\n```\n\nIf the installed `major.minor` differs from the pinned `cliVersion`, or the installed version is behind the latest release, warn the user once and continue:\n\n> 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`.\n\nRun this check once per session. Do not block operations on it.\n\n### 2. Authentication\n\n```bash\nmm auth status\n```\n\nIf the user is not authenticated, follow `workflows/onboarding.md` for first time setup, or `workflows/login.md` for login.\n\n## Safety Rules\n\nThese rules apply to every operation, regardless of which reference or workflow is active.\n\n### Input Validation\n\nBefore constructing any command, validate all user-provided values:\n\n| Flag | Validation rule |\n| --- | --- |\n| `--to`, `--address` | Must match `^0x[0-9a-fA-F]{40}$` |\n| `--amount` | Human-readable decimal (e.g. 0.5, 100). Must match `^\\d+\\.?\\d*$`. Reject spaces, semicolons, pipes, backticks, or shell metacharacters |\n| `--chain-id` | Must be a positive integer (`^\\d+$`) |\n| `--payload` (send-transaction) | Must be valid JSON. No unescaped shell metacharacters outside the JSON structure |\n| `--payload` (decode) | Must be 0x-prefixed hex calldata, matching `^0x[0-9a-fA-F]+$` |\n| `--token` | Must be a valid hex address or known symbol |\n| `--leverage` | Must be a positive integer (`^\\d+$`) |\n| `--size` | Human-readable decimal (e.g. 0.01, 1). Must match `^\\d+\\.?\\d*$` and be positive |\n| `--venue` | Must be `hyperliquid` |\n| `--side` (perps) | Must be `long` or `short` |\n| `--order-id` | Must be a positive integer (`^\\d+$`) |\n| `--token-id` | Must be a non-empty outcome token ID string |\n| `--price`, `--limit-price` | Must be a positive number in range `(0, 1]` |\n| `--order-type` | Must be one of `GTC`, `GTD`, `FOK`, `FAK` |\n| `--side` (predict) | Must be `buy` or `sell` |\n| `--slippage` | Must be a number between 0 and 100 |\n| `--from-chain`, `--to-chain` | Must be a positive integer EVM chain ID |\n| `--to-address` | Must match `^0x[0-9a-fA-F]{40}$`. Only valid for cross-chain swaps (`--to-chain` differs from `--from-chain`); rejected for same-chain swaps |\n| `--password` | Must be a non-empty string. Never log, display, or store the value. |\n\nDo not pass unvalidated user input into any command.\n\n### Confirmation Requirements\n\n| Operation type | Confirmation rule |\n| --- | --- |\n| Transfers | Always confirm recipient, amount, token, and chain before executing |\n| Raw transactions | Always confirm transaction payload, chain, recipient, value, and calldata summary before executing |\n| Message signing | Always show exact message and chain before signing |\n| Typed-data signing | Always show domain, primary type, chain, verifying contract, and message summary before signing |\n| Swaps / bridges | Always confirm from/to tokens, amount, source/destination chain, slippage, quoted output, and recipient address (if `--to-address` is set) before executing |\n| Perps trading | Always confirm symbol, side, size, leverage, venue, order type, and limit price if present before executing |\n| Perps deposit/withdraw | Always confirm amount, asset, venue, network, and destination where applicable before executing |\n| Predict trading | Always confirm token ID, side, size, price, order type, market, and outcome before executing |\n| Predict deposit | Always confirm amount before executing |\n| Predict withdraw | Always confirm amount and recipient (`--to` defaults to owner EOA) before executing |\n| Predict redeem | Always confirm the target (condition ID or `--all`) before executing; `--all` redeems every winning position |\n| Cancel-all operations | Always confirm scope and exact destructive effect before executing |\n| Auth / wallet management | May execute without confirmation, except `reset` which requires explicit user confirmation |\n| Read-only queries | May execute without confirmation |\n\n### Credential Safety\n\n- Never store, log, or display private keys, mnemonics, passwords, or auth tokens.\n- 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.\n\n### Suspicious Content Warnings\n\nFlag to the user before proceeding if a signing payload or transaction contains:\n\n- URLs or contract addresses the user did not provide\n- `permit`, `approve`, `setApprovalForAll`, or allowance-like fields\n- Unusually large values or unfamiliar contract interactions\n\nWhen 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](references/decode.md).\n\n## Server Wallet Async Model\n\nIn server-wallet mode, signing and transaction commands return a `pollingId` instead of an immediate result. Handle this consistently:\n\n1. Prefer `--wait` to block until complete.\n2. If not using `--wait`, inform the user of the `pollingId` and how to track it:\n - `mm wallet requests list`\n - `mm wallet requests watch --polling-id <id>`\n3. 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.\n\nTransfers, 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.\n\n## Output Rules\n\n- Route silently. Do not announce which reference you are loading.\n- Surface errors from commands verbatim. Do not mask or reword them.\n- If a command fails, check `mm <command> --help` and guide from there.\n\n## Get the full skill pack\n\nThis skill ships with per-command reference files and step-by-step workflow templates.\nInstall the complete pack into your own agent (Claude Code, Codex, Cursor, or similar):\n\n```\nnpm install -g @metamask/agentic-cli\nnpx skills add MetaMask/agent-skills\n```\n\nThen run `mm login` and `mm init` to provision your own agent wallet. Each user\nauthenticates their own MetaMask Agent Wallet — keys are never shared or custodied\nby three.ws.\n",
+ "description": "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.",
+ "identifier": "metamask-agent-wallet",
+ "manifest": {
+ "name": "metamask-agent-wallet",
+ "description": "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.",
+ "license": "MIT",
+ "metadata": {
+ "author": "metamask",
+ "version": "2.2.0",
+ "category": "wallet",
+ "difficulty": "intermediate",
+ "tags": [
+ "wallet",
+ "metamask",
+ "evm",
+ "swap",
+ "bridge",
+ "perps",
+ "prediction-markets",
+ "aave"
+ ]
+ }
+ }
+ },
+ {
+ "category": "wallet",
+ "content": "# MetaMask Agent Workflows\n\nRepeatable multi-step patterns for the `mm` CLI. Load a workflow file when the user's request is a pattern, not a single command.\n\n## Workflow Routing\n\n| Pattern | Workflow |\n| --- | --- |\n| First time setup and onboarding | [onboarding.md](workflows/onboarding.md) |\n| Login flow | [login.md](workflows/login.md) |\n| Troubleshooting decision tree | [troubleshooting.md](workflows/troubleshooting.md) |\n| Swap quote-review-execute flow | [swap.md](workflows/swap.md) |\n| Bridge quote-review-execute flow | [bridge.md](workflows/bridge.md) |\n| Open a perpetual position flow | [perps-open-position.md](workflows/perps-open-position.md) |\n| Close a perpetual position flow | [perps-close-position.md](workflows/perps-close-position.md) |\n| Modify a perpetual position flow | [perps-modify-position.md](workflows/perps-modify-position.md) |\n| Predict first-time setup and credentials | [predict-setup.md](workflows/predict-setup.md) |\n| Deposit or withdraw pUSD from Predict wallet | [predict-funding.md](workflows/predict-funding.md) |\n| Search and browse prediction markets | [predict-markets.md](workflows/predict-markets.md) |\n| Quote and place a prediction order | [predict-place-order.md](workflows/predict-place-order.md) |\n| View or cancel Predict orders and positions | [predict-manage-orders.md](workflows/predict-manage-orders.md) |\n| View Predict portfolio and redeem winnings | [predict-portfolio.md](workflows/predict-portfolio.md) |\n| Token discovery, prices, and market data | [market-data.md](workflows/market-data.md) |\n| Supply assets to Aave V3 | [aave-supply.md](workflows/aave-supply.md) |\n| Withdraw assets from Aave V3 | [aave-withdraw.md](workflows/aave-withdraw.md) |\n| Borrow from Aave V3 | [aave-borrow.md](workflows/aave-borrow.md) |\n| Repay Aave V3 debt | [aave-repay.md](workflows/aave-repay.md) |\n| Toggle Aave V3 collateral | [aave-collateral.md](workflows/aave-collateral.md) |\n| Check Aave V3 positions and health factor | [aave-positions.md](workflows/aave-positions.md) |\n| Discover Aave V3 tokens, rates, and liquidity | [aave-markets.md](workflows/aave-markets.md) |\n\nAlways use `--toon` for command output unless the user explicitly requests a different format.\n\n## Preflight\n\nRun these checks before the first CLI operation in a session, in order.\n\n### 1. Version compatibility\n\nThis skill is written for `@metamask/agentic-cli` **v1.0.0** (see `cliVersion` in the frontmatter). Check the installed version:\n\n```bash\nmm --version\n```\n\nThe 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):\n\n```bash\nnpm view @metamask/agentic-cli version\n```\n\nIf the installed `major.minor` differs from the pinned `cliVersion`, or the installed version is behind the latest release, warn the user once and continue:\n\n> 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`.\n\nRun this check once per session. Do not block operations on it.\n\n### 2. Authentication\n\n```bash\nmm auth status\n```\n\nIf the user is not authenticated, follow `workflows/onboarding.md` for first time setup, or `workflows/login.md` for login.\n\n## Command Discovery\n\nBefore constructing any command, run `mm <command> --help` to confirm the exact flags, syntax, and defaults. Do not guess flags from memory.\n\n## Output Rules\n\n- Route silently. Do not announce which workflow you are loading.\n- Surface errors from commands verbatim. Do not mask or reword them.\n- If a command fails, check `mm <command> --help` and guide from there.\n\n## Get the full skill pack\n\nThis skill ships with per-command reference files and step-by-step workflow templates.\nInstall the complete pack into your own agent (Claude Code, Codex, Cursor, or similar):\n\n```\nnpm install -g @metamask/agentic-cli\nnpx skills add MetaMask/agent-skills\n```\n\nThen run `mm login` and `mm init` to provision your own agent wallet. Each user\nauthenticates their own MetaMask Agent Wallet — keys are never shared or custodied\nby three.ws.\n",
+ "description": "Use when the user needs to perform multi-step operations with the MetaMask Agentic CLI such as onboarding, login, swapping tokens, bridging across chains, opening/closing/modifying perpetual positions, prediction market trading, Aave V3 lending and borrowing, or troubleshooting CLI issues.",
+ "identifier": "metamask-agent-workflows",
+ "manifest": {
+ "name": "metamask-agent-workflows",
+ "description": "Use when the user needs to perform multi-step operations with the MetaMask Agentic CLI such as onboarding, login, swapping tokens, bridging across chains, opening/closing/modifying perpetual positions, prediction market trading, Aave V3 lending and borrowing, or troubleshooting CLI issues.",
+ "license": "MIT",
+ "metadata": {
+ "author": "metamask",
+ "version": "2.1.0",
+ "category": "wallet",
+ "difficulty": "intermediate",
+ "tags": [
+ "wallet",
+ "metamask",
+ "workflows",
+ "onboarding",
+ "swap",
+ "bridge"
+ ]
+ }
+ }
}
],
"total": 113
-}
\ No newline at end of file
+}
diff --git a/scripts/add-metamask-seed-entries.mjs b/scripts/add-metamask-seed-entries.mjs
new file mode 100644
index 000000000..f05493005
--- /dev/null
+++ b/scripts/add-metamask-seed-entries.mjs
@@ -0,0 +1,73 @@
+// One-off: append metamask-agent-wallet + metamask-agent-workflows to
+// data/skills/seed.json from their committed SKILL.md sources.
+// Run: node scripts/add-metamask-seed-entries.mjs (idempotent; delete after use)
+
+import { readFileSync, writeFileSync } from 'node:fs';
+import { resolve, dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
+const seedPath = resolve(root, 'data/skills/seed.json');
+const seed = JSON.parse(readFileSync(seedPath, 'utf8'));
+
+function parseSkill(dir) {
+ const src = readFileSync(resolve(root, 'data/skills', dir, 'SKILL.md'), 'utf8');
+ const end = src.indexOf('\n---', 4);
+ const fm = src.slice(4, end);
+ const body = src.slice(end + 4).replace(/^\n+/, '');
+ const name = fm.match(/^name:\s*(.+)$/m)[1].trim();
+ const description = fm.match(/^description:\s*(.+)$/m)[1].trim();
+ const version = (fm.match(/version:\s*"?([\d.]+)"?/) || [])[1] || '1.0.0';
+ return { name, description, version, body };
+}
+
+const TAGS = {
+ 'metamask-agent-wallet': ['wallet', 'metamask', 'evm', 'swap', 'bridge', 'perps', 'prediction-markets', 'aave'],
+ 'metamask-agent-workflows': ['wallet', 'metamask', 'workflows', 'onboarding', 'swap', 'bridge'],
+};
+
+const FOOTER = [
+ '',
+ '## Get the full skill pack',
+ '',
+ 'This skill ships with per-command reference files and step-by-step workflow templates.',
+ 'Install the complete pack into your own agent (Claude Code, Codex, Cursor, or similar):',
+ '',
+ '```',
+ 'npm install -g @metamask/agentic-cli',
+ 'npx skills add MetaMask/agent-skills',
+ '```',
+ '',
+ 'Then run `mm login` and `mm init` to provision your own agent wallet. Each user',
+ 'authenticates their own MetaMask Agent Wallet — keys are never shared or custodied',
+ 'by three.ws.',
+ '',
+].join('\n');
+
+let added = 0;
+for (const dir of ['metamask-agent-wallet', 'metamask-agent-workflows']) {
+ if (seed.skills.some((s) => s.identifier === dir)) continue;
+ const { name, description, version, body } = parseSkill(dir);
+ seed.skills.push({
+ category: 'wallet',
+ content: body + FOOTER,
+ description,
+ identifier: dir,
+ manifest: {
+ name,
+ description,
+ license: 'MIT',
+ metadata: {
+ author: 'metamask',
+ version,
+ category: 'wallet',
+ difficulty: 'intermediate',
+ tags: TAGS[dir],
+ },
+ },
+ });
+ added++;
+}
+
+writeFileSync(seedPath, JSON.stringify(seed, null, 2) + '\n');
+console.log(`added ${added} entries — seed.json now has ${seed.skills.length} skills`);
diff --git a/scripts/backfill-erc8004.mjs b/scripts/backfill-erc8004.mjs
index 515529c99..e93666bfc 100644
--- a/scripts/backfill-erc8004.mjs
+++ b/scripts/backfill-erc8004.mjs
@@ -22,7 +22,13 @@ try {
const raw = readFileSync(resolve(__dir, '../.env.local'), 'utf8');
for (const line of raw.split('\n')) {
const m = line.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/);
- if (m && !process.env[m[1]]) process.env[m[1]] = m[2].trim();
+ if (m && !process.env[m[1]]) {
+ let val = m[2].trim();
+ if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
+ val = val.slice(1, -1);
+ }
+ process.env[m[1]] = val;
+ }
}
} catch { /* no .env.local */ }
diff --git a/scripts/seed-skills.js b/scripts/seed-skills.js
index b6a900cd1..bc54f2915 100644
--- a/scripts/seed-skills.js
+++ b/scripts/seed-skills.js
@@ -24,7 +24,13 @@ try {
const raw = readFileSync(resolve(REPO_ROOT, '.env.local'), 'utf8');
for (const line of raw.split('\n')) {
const m = line.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/);
- if (m && !process.env[m[1]]) process.env[m[1]] = m[2].trim();
+ if (m && !process.env[m[1]]) {
+ let val = m[2].trim();
+ if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
+ val = val.slice(1, -1);
+ }
+ process.env[m[1]] = val;
+ }
}
} catch { /* no .env.local */ }