Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions skills/metamask-agent-wallet/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Use when the user asks anything about blockchain wallets, transacti
license: MIT
metadata:
author: metamask
version: "2.0.0"
version: "2.1.0"
---

# MetaMask Agentic CLI Skill
Expand All @@ -23,7 +23,7 @@ Match the user's intent to a command and reference file, then read the reference
| Login in MetaMask Agentic CLI | `mm login` | [auth.md](references/auth.md) |
| Choose a wallet mode and set up policies | `mm init` | [auth.md](references/auth.md) |
| Show current init settings | `mm init show` | [auth.md](references/auth.md) |
| Sign in via QR code (coming soon) | `mm login qr` | [auth.md](references/auth.md) |
| Sign in via QR code with MetaMask Mobile | `mm login qr` | [auth.md](references/auth.md) |
| Sign in via Google | `mm login google` | [auth.md](references/auth.md) |
| Sign in via email OTP | `mm login email` | [auth.md](references/auth.md) |
| Sign out | `mm logout` | [auth.md](references/auth.md) |
Expand Down Expand Up @@ -67,14 +67,24 @@ Match the user's intent to a command and reference file, then read the reference
| Create or refresh Predict credentials | `mm predict auth` | [predict.md](references/predict.md) |
| Repair Predict approvals | `mm predict approve` | [predict.md](references/predict.md) |
| Check Predict back-end status | `mm predict status` | [predict.md](references/predict.md) |
| Check if Polymarket is geoblocked for your IP | `mm predict geoblock` | [predict.md](references/predict.md) |
| List prediction markets | `mm predict markets list` | [predict.md](references/predict.md) |
| Search prediction markets | `mm predict markets search` | [predict.md](references/predict.md) |
| Inspect a prediction market | `mm predict markets get` | [predict.md](references/predict.md) |
| List Polymarket events | `mm predict events list` | [predict.md](references/predict.md) |
| Inspect a Polymarket event | `mm predict events get` | [predict.md](references/predict.md) |
| List Polymarket event series | `mm predict series list` | [predict.md](references/predict.md) |
| Inspect a Polymarket event series | `mm predict series get` | [predict.md](references/predict.md) |
| List Polymarket tags | `mm predict tags list` | [predict.md](references/predict.md) |
| Inspect a Polymarket tag | `mm predict tags get` | [predict.md](references/predict.md) |
| Preview a prediction order cost | `mm predict quote` | [predict.md](references/predict.md) |
| Place a prediction market order | `mm predict place` | [predict.md](references/predict.md) |
| Cancel prediction orders | `mm predict cancel` | [predict.md](references/predict.md) |
| View prediction market positions | `mm predict positions` | [predict.md](references/predict.md) |
| View open prediction orders | `mm predict orders` | [predict.md](references/predict.md) |
| Show full Predict portfolio snapshot | `mm predict portfolio` | [predict.md](references/predict.md) |
| List redeemable (winning) positions | `mm predict redeem list` | [predict.md](references/predict.md) |
| Redeem winning positions | `mm predict redeem` | [predict.md](references/predict.md) |
| Check Predict deposit wallet balance | `mm predict balance` | [predict.md](references/predict.md) |
| Fund Predict deposit wallet | `mm predict deposit` | [predict.md](references/predict.md) |
| Withdraw pUSD from Predict deposit wallet | `mm predict withdraw` | [predict.md](references/predict.md) |
Expand Down Expand Up @@ -170,6 +180,7 @@ Do not pass unvalidated user input into any command.
| Predict trading | Always confirm token ID, side, size, price, order type, market, and outcome before executing |
| Predict deposit | Always confirm amount before executing |
| Predict withdraw | Always confirm amount and recipient (`--to` defaults to owner EOA) before executing |
| Predict redeem | Always confirm the target (condition ID or `--all`) before executing; `--all` redeems every winning position |
| Cancel-all operations | Always confirm scope and exact destructive effect before executing |
| Auth / wallet management | May execute without confirmation, except `reset` which requires explicit user confirmation |
| Read-only queries | May execute without confirmation |
Expand Down
4 changes: 2 additions & 2 deletions skills/metamask-agent-wallet/references/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mm init show

## `login` Command

Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (QR, Google, or email). QR is recommended but not auto-selected.
Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (MetaMask Mobile QR, Google, or email). QR is recommended but not auto-selected.

### Syntax

Expand Down Expand Up @@ -84,7 +84,7 @@ mm login --token "cliToken:cliRefreshToken"
### Note

- If already authenticated, the CLI returns `ALREADY_AUTHENTICATED`. Run `mm logout` first, then log in again.
- `mm login qr` returns `COMING_SOON`. Use Google or email sign-in instead.
- `mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat). On production it returns `COMING_SOON`; use Google or email sign-in instead.
- Pairing codes tolerate `-` and whitespace separators (e.g. `608-225` is equivalent to `608225`).
- Use `mm login google --no-wait` or `mm login email --no-wait` for non-interactive/CI flows. Bare `mm login --no-wait` fails without a TTY because no method is selected.
- `--no-wait` is not supported with QR login. Complete authentication later with `mm login --token`.
Expand Down
1 change: 1 addition & 0 deletions skills/metamask-agent-wallet/references/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ This reference lists error codes the CLI actually emits. SDK-only or remapped co
| `PREDICT_METHOD_UNAVAILABLE` | Predict method not available |
| `PREDICT_DEPOSIT_FAILED` | Predict deposit failed |
| `PREDICT_ERROR` | Generic Predict error |
| `PREDICT_GEOBLOCKED` | Polymarket is not available in your region; Predict features cannot be used from this location. Emitted by `mm predict setup` (region guard) and surfaced by `mm predict geoblock` |
| `UNSUPPORTED_PREDICT_CHAIN` | Predict chain not supported |

## Network & Filesystem Errors
Expand Down
249 changes: 248 additions & 1 deletion skills/metamask-agent-wallet/references/predict.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ mm predict status
mm predict status
```

## `predict geoblock` Command

Check whether Polymarket access is geoblocked for your current IP. Returns `blocked`, `ip`, `country`, and `region`.

### Syntax

```bash
mm predict geoblock
```

### Example

```bash
mm predict geoblock
```

## `predict markets list` Command

List tradeable Predict markets with Gamma-style filters.
Expand Down Expand Up @@ -199,6 +215,160 @@ mm predict markets get will-the-new-york-knicks-win-the-2026-nba-finals
mm predict markets get 0x713641f745d71f6ec61f906237ffca3c8583f251e49384429a63ceb0ccdb2d37
```

## `predict events list` Command

List Polymarket events (groupings of related markets) with Gamma-style filters.

### Syntax

```bash
mm predict events list [--tag-slug <slug>] [--tag-id <n>] [--active] [--closed] [--featured] [--order <field>] [--ascending] [--liquidity-min <n>] [--start-date-min <datetime>] [--start-date-max <datetime>] [--end-date-min <datetime>] [--end-date-max <datetime>] [--limit <n>] [--offset <n>]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `--tag-slug` | No | Filter by tag slug (e.g. sports, politics) |
| `--tag-id` | No | Filter by tag ID (from `mm predict tags list`) |
| `--active` | No | Active events only |
| `--closed` | No | Include closed/resolved events |
| `--featured` | No | Only featured/trending events |
| `--order` | No | Sort field: `volume_24hr`, `volume`, `liquidity`, `start_date`, `end_date` |
| `--ascending` | No | Sort ascending (defaults to descending) |
| `--liquidity-min` | No | Minimum event liquidity |
| `--start-date-min` | No | Minimum event start date-time |
| `--start-date-max` | No | Maximum event start date-time |
| `--end-date-min` | No | Minimum event end date-time |
| `--end-date-max` | No | Maximum event end date-time |
| `--limit` | No | Maximum events to return, 1-500 |
| `--offset` | No | Result offset (0-based) |

### Example

```bash
mm predict events list --tag-slug sports --limit 10
mm predict events list --active --featured
```

## `predict events get` Command

Inspect a single Polymarket event by slug or ID.

### Syntax

```bash
mm predict events get <event>
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `<event>` | Yes | Event slug or ID (positional) |

### Example

```bash
mm predict events get some-event-slug
```

## `predict series list` Command

List Polymarket event series (recurring groupings of events).

### Syntax

```bash
mm predict series list [--recurrence <recurrence>] [--active] [--featured] [--tag-slug <slug>] [--limit <n>] [--offset <n>]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `--recurrence` | No | Filter by recurrence: `annual`, `daily`, `weekly`, or `monthly` |
| `--active` | No | Active series only |
| `--featured` | No | Only featured series |
| `--tag-slug` | No | Filter by tag slug |
| `--limit` | No | Maximum series to return, 1-500 |
| `--offset` | No | Result offset (0-based) |

### Example

```bash
mm predict series list --recurrence weekly --limit 10
```

## `predict series get` Command

Inspect a single event series by ID.

### Syntax

```bash
mm predict series get <id>
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `<id>` | Yes | Series ID (positional) |

### Example

```bash
mm predict series get 12345
```

## `predict tags list` Command

List Polymarket tags, useful for `--tag-slug` / `--tag-id` filters on events and markets.

### Syntax

```bash
mm predict tags list [--limit <n>] [--offset <n>] [--is-carousel]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `--limit` | No | Maximum tags to return, 1-500 |
| `--offset` | No | Result offset (0-based) |
| `--is-carousel` | No | Only carousel tags |

### Example

```bash
mm predict tags list --limit 50
```

## `predict tags get` Command

Fetch a single Polymarket tag by numeric ID or slug.

### Syntax

```bash
mm predict tags get <tag>
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `<tag>` | Yes | Tag ID (integer) or slug string (positional) |

### Example

```bash
mm predict tags get sports
mm predict tags get 100
```

## `predict quote` Command

Preview order cost and fill before placing.
Expand Down Expand Up @@ -323,6 +493,80 @@ mm predict positions
mm predict positions --market <condition-id>
```

## `predict portfolio` Command

Full portfolio snapshot: deposit wallet pUSD balance, open positions with estimated value, and outstanding redeemable winnings.

### Syntax

```bash
mm predict portfolio [--password <password>]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] |

### Example

```bash
mm predict portfolio
```

## `predict redeem list` Command

List all redeemable (winning) positions in your deposit wallet, with position size and market question.

### Syntax

```bash
mm predict redeem list [--password <password>]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] |

### Example

```bash
mm predict redeem list
```

## `predict redeem` Command

Redeem winning tokens after market resolution. Redeem one position by condition ID, or all redeemable positions with `--all`. With `--wait`, polls for the transaction receipt.

### Syntax

```bash
mm predict redeem [<condition-id>] [--all] [--wait] [--password <password>]
```

### Supported Flags

| Name | Required | Description |
| --- | --- | --- |
| `<condition-id>` | Yes (unless `--all`) | Market condition ID to redeem (positional) |
| `--all` | No | Redeem all redeemable positions |
| `--wait` | No | Block until the redemption transaction is confirmed |
| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] |

### Validation Rules

- Provide either a `<condition-id>` or `--all`, not both.

### Example

```bash
mm predict redeem 0xABC123... --wait
mm predict redeem --all --wait
```

## `predict orders` Command

View open Predict orders.
Expand Down Expand Up @@ -475,9 +719,12 @@ mm predict watch --id <job-id> --wait
## Notes

- Before trading, run `mm predict setup --wait` to initialize credentials, deploy the deposit wallet, and set approvals.
- `mm predict setup` aborts early with `PREDICT_GEOBLOCKED` if your IP resolves to a restricted region, before any wallet interaction. Use `mm predict geoblock` to check region status without running setup.
- Use `mm predict markets get <slug>` to get outcome token IDs required by `quote`, `place`, `book`, and `balance --token-id`.
- Use `mm predict events`, `mm predict series`, and `mm predict tags` to browse Polymarket content; tag slugs/IDs from `mm predict tags list` feed the `--tag-slug` / `--tag-id` filters on `events` and `markets`.
- After a market resolves, use `mm predict redeem list` to see winnings and `mm predict redeem <condition-id> --wait` (or `--all`) to claim them. `mm predict portfolio` shows balance, open positions, and redeemable winnings in one snapshot.
- Prices are per-share and must be in the range [0, 1].
- Side must be `buy` or `sell`.
- The `predict mode` command switches between `mainnet` and `testnet`.
- If the user does not specify a mode, the CLI uses the previously set mode.
- Setup, approve, deposit, withdraw, and order flows can return job IDs. Track them with `mm predict watch <job-id> --wait`.
- Setup, approve, deposit, withdraw, redeem, and order flows can return job IDs. Track them with `mm predict watch <job-id> --wait`.
8 changes: 5 additions & 3 deletions skills/metamask-agent-wallet/workflows/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ Reference command syntax in `references/auth.md`.

## Flow

1. Ask the user which login method they want: Google or Email. QR login is coming soon and is not available.
1. Ask the user which login method they want: MetaMask Mobile QR, Google, or Email.
2. Execute login.
3. Verify with token.

## Login

`mm login qr` returns `COMING_SOON`. Use Google or email sign-in.
For non-interactive/CI flows, use Google or email with `--no-wait`:

```bash
mm login google --no-wait
mm login email --no-wait
```

Use `--no-wait` for non-interactive environments. The command prints a sign-in URL.
The command prints a sign-in URL.

`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`. QR login keeps the CLI attached to the relay, so it does not support `--no-wait`.

## Verify

Expand Down
2 changes: 1 addition & 1 deletion skills/metamask-agent-wallet/workflows/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If this fails, the CLI is not installed. Guide the user to install it before pro

## Login Flow

Ask the user which login method they want to use: Google or Email. QR login is coming soon (`mm login qr` returns `COMING_SOON`).
Ask the user which login method they want to use: MetaMask Mobile QR, Google, or Email. QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to Google or email there.

### Login

Expand Down
Loading
Loading