You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MetaMask Agent CLI Skills
2
2
3
-
SKILLs for the MetaMask Agent CLI. These skills enable AI agents to authenticate, manage wallets, swap tokens, bridge across chains, trade perpetual futures, and more using the MetaMask Agent CLI.
3
+
SKILLs for the MetaMask Agent CLI (`@metamask/agentic-cli` v1.0.0). These skills enable AI agents to authenticate, manage wallets, swap tokens, bridge across chains, trade perpetual futures, and more using the MetaMask Agent CLI.
@@ -127,7 +130,29 @@ Always use `--toon` for command output unless the user explicitly requests a dif
127
130
128
131
## Preflight
129
132
130
-
Always run preflight before any CLI operation.
133
+
Run these checks before the first CLI operation in a session, in order.
134
+
135
+
### 1. Version compatibility
136
+
137
+
This skill is written for `@metamask/agentic-cli`**v1.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
138
+
139
+
```bash
140
+
mm --version
141
+
```
142
+
143
+
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):
144
+
145
+
```bash
146
+
npm view @metamask/agentic-cli version
147
+
```
148
+
149
+
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:
150
+
151
+
> 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`.
152
+
153
+
Run this check once per session. Do not block operations on it.
- In server-wallet mode, if the account already has a remote EVM wallet, `mm init` syncs it and loads the existing trading mode and policies instead of prompting for a new trading mode or creating a wallet.
40
+
37
41
## `init show` Command
38
42
39
43
Display the current initialization settings (wallet mode, trading mode, policies).
@@ -130,9 +134,69 @@ This command does not support flags.
130
134
mm logout
131
135
```
132
136
137
+
## `config get` Command
138
+
139
+
Show persisted CLI configuration. Does not require authentication.
140
+
141
+
### Syntax
142
+
143
+
```bash
144
+
mm config get [env|verbose|format]
145
+
```
146
+
147
+
### Supported Keys
148
+
149
+
| Key | Description |
150
+
| --- | --- |
151
+
|`env`| Target API environment: `prod`, `dev`, or `uat` (defaults to `prod` when unset) |
152
+
|`verbose`| Whether verbose logging is persisted (`true` or `false`) |
153
+
|`format`| Default output format: `json`, `text`, `yaml`, `toml`, or `toon`|
154
+
155
+
Omit the key to return all values.
156
+
157
+
### Example
158
+
159
+
```bash
160
+
mm config get
161
+
mm config get env
162
+
```
163
+
164
+
## `config set` Command
165
+
166
+
Persist a CLI configuration value in `~/.metamask/config.json`. Does not require authentication.
167
+
168
+
### Syntax
169
+
170
+
```bash
171
+
mm config set<env|verbose|format><value>
172
+
```
173
+
174
+
### Supported Keys
175
+
176
+
| Key | Values |
177
+
| --- | --- |
178
+
|`env`|`prod`, `dev`, or `uat`|
179
+
|`verbose`|`true` or `false`|
180
+
|`format`|`json`, `text`, `yaml`, `toml`, or `toon`|
181
+
182
+
### Example
183
+
184
+
```bash
185
+
mm config set env prod
186
+
mm config set env dev
187
+
mm config set env uat
188
+
mm config set format toon
189
+
```
190
+
191
+
### Note
192
+
193
+
- Set the target environment **before** signing in. To switch environments after login, run `mm logout` or `mm reset` first, then `mm config set env`.
194
+
-`MM_ENV=prod|dev|uat` overrides the persisted environment for a single invocation (useful in CI).
195
+
- Non-prod sessions are stored in env-scoped files under `~/.metamask/` (e.g. `session.dev.json`, `session.uat.json`); prod uses `session.json`.
196
+
133
197
## `reset` Command
134
198
135
-
Clear the local CLI session entirely.
199
+
Clear the local CLI session entirely, including auth credentials, wallet state, mnemonic, swap quotes, and persisted config.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/onboarding.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,34 @@ Reference command syntax in `references/auth.md` and `references/wallet.md`.
7
7
## Flow
8
8
9
9
1. Check CLI installation.
10
-
2. Login.
11
-
3. Initialize wallet mode.
12
-
4. Verify auth status.
13
-
5. Show wallet address.
10
+
2. Configure environment (if not using production).
11
+
3. Login.
12
+
4. Initialize wallet mode.
13
+
5. Verify auth status.
14
+
6. Show wallet address.
14
15
15
16
## Check CLI Installation
16
17
17
18
```bash
18
19
mm --version
19
20
```
20
21
21
-
If this fails, the CLI is not installed. Guide the user to install it before proceeding.
22
+
If this fails, the CLI is not installed. Guide the user to install it with `npm install -g @metamask/agentic-cli@latest` before proceeding.
23
+
24
+
Then run the version compatibility check from the skill `Preflight` section: compare the installed `major.minor` against the pinned `cliVersion` and the latest published release, and warn the user if they are out of sync.
25
+
26
+
## Configure Environment
27
+
28
+
Production (`prod`) is the default. Set the target environment **before** login if the user needs dev or uat:
29
+
30
+
```bash
31
+
mm config get env
32
+
mm config set env dev
33
+
```
34
+
35
+
For a one-off override without persisting, use `MM_ENV=dev mm login` (or `uat`).
36
+
37
+
To switch environments after a prior login, run `mm logout` or `mm reset` first, then `mm config set env`.
22
38
23
39
## Login Flow
24
40
@@ -49,7 +65,11 @@ First check if the project is already initialized:
49
65
mm init show
50
66
```
51
67
52
-
If already initialized, skip this step. Otherwise, ask the user which wallet mode they want:
68
+
If already initialized, skip this step.
69
+
70
+
For server-wallet mode, if the account already has a remote wallet, `mm init` syncs it and reuses the existing trading mode — no trading-mode prompt.
71
+
72
+
Otherwise, ask the user which wallet mode they want:
53
73
-`server-wallet` (recommended) — keys are hosted by MetaMask infrastructure. No need to manage private keys or mnemonics.
54
74
-`byok` — bring your own mnemonic. The user manages their own keys locally.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/troubleshooting.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ Run or suggest these in order:
8
8
9
9
```bash
10
10
mm --version
11
+
mm config get env
11
12
mm auth status
12
13
mm <failing-command> --help
13
14
```
@@ -20,7 +21,7 @@ If `auth status` reports anything other than authenticated, fix authentication b
20
21
| --- | --- | --- |
21
22
|`mm: command not found`| Binary not installed or not on `PATH`| Check install and PATH |
22
23
| Async command returns a polling id and appears stuck | Request was dispatched without `--wait`| Use `mm wallet requests list` or `mm wallet requests watch --polling-id <id>`|
23
-
| Auth errors after previously working | Expired token or wrong environment | Check `mm auth status` and environment/session file |
24
+
| Auth errors after previously working | Expired token or wrong environment | Check `mm config get env`, `mm auth status`, and the env-scoped session file under `~/.metamask/`|
24
25
|`CHAIN_ID_MISMATCH` on typed data | Payload `domain.chainId` differs from `--chain-id`| Align the two chain IDs |
25
26
|`MNEMONIC_LOCKED` or `WRONG_PASSWORD`| BYOK mnemonic is encrypted and password was wrong or missing | Set the correct `MM_PASSWORD` environment variable and re-run |
26
27
|`ALREADY_ENCRYPTED` on `wallet password set`| Mnemonic already has a password | Use `mm wallet password change` instead |
Copy file name to clipboardExpand all lines: skills/metamask-agent-workflows/SKILL.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ description: Use when the user needs to perform multi-step operations with the M
4
4
license: MIT
5
5
metadata:
6
6
author: metamask
7
-
version: "2.0.0"
7
+
version: "2.1.0"
8
+
cliVersion: "1.0.0"
8
9
---
9
10
10
11
# MetaMask Agent Workflows
@@ -30,7 +31,29 @@ Always use `--toon` for command output unless the user explicitly requests a dif
30
31
31
32
## Preflight
32
33
33
-
Always run preflight before any CLI operation.
34
+
Run these checks before the first CLI operation in a session, in order.
35
+
36
+
### 1. Version compatibility
37
+
38
+
This skill is written for `@metamask/agentic-cli`**v1.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
39
+
40
+
```bash
41
+
mm --version
42
+
```
43
+
44
+
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):
45
+
46
+
```bash
47
+
npm view @metamask/agentic-cli version
48
+
```
49
+
50
+
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:
51
+
52
+
> 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`.
53
+
54
+
Run this check once per session. Do not block operations on it.
Copy file name to clipboardExpand all lines: skills/metamask-agent-workflows/workflows/onboarding.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,34 @@ Reference command syntax in `references/auth.md` and `references/wallet.md`.
7
7
## Flow
8
8
9
9
1. Check CLI installation.
10
-
2. Login.
11
-
3. Initialize wallet mode.
12
-
4. Verify auth status.
13
-
5. Show wallet address.
10
+
2. Configure environment (if not using production).
11
+
3. Login.
12
+
4. Initialize wallet mode.
13
+
5. Verify auth status.
14
+
6. Show wallet address.
14
15
15
16
## Check CLI Installation
16
17
17
18
```bash
18
19
mm --version
19
20
```
20
21
21
-
If this fails, the CLI is not installed. Guide the user to install it before proceeding.
22
+
If this fails, the CLI is not installed. Guide the user to install it with `npm install -g @metamask/agentic-cli@latest` before proceeding.
23
+
24
+
Then run the version compatibility check from the skill `Preflight` section: compare the installed `major.minor` against the pinned `cliVersion` and the latest published release, and warn the user if they are out of sync.
25
+
26
+
## Configure Environment
27
+
28
+
Production (`prod`) is the default. Set the target environment **before** login if the user needs dev or uat:
29
+
30
+
```bash
31
+
mm config get env
32
+
mm config set env dev
33
+
```
34
+
35
+
For a one-off override without persisting, use `MM_ENV=dev mm login` (or `uat`).
36
+
37
+
To switch environments after a prior login, run `mm logout` or `mm reset` first, then `mm config set env`.
22
38
23
39
## Login Flow
24
40
@@ -49,7 +65,11 @@ First check if the project is already initialized:
49
65
mm init show
50
66
```
51
67
52
-
If already initialized, skip this step. Otherwise, ask the user which wallet mode they want:
68
+
If already initialized, skip this step.
69
+
70
+
For server-wallet mode, if the account already has a remote wallet, `mm init` syncs it and reuses the existing trading mode — no trading-mode prompt.
71
+
72
+
Otherwise, ask the user which wallet mode they want:
53
73
-`server-wallet` (recommended) — keys are hosted by MetaMask infrastructure. No need to manage private keys or mnemonics.
54
74
-`byok` — bring your own mnemonic. The user manages their own keys locally.
0 commit comments