Skip to content

Commit 05f9c24

Browse files
Merge branch 'main' into feat/x402-buyer-skill
2 parents 17810f3 + 12cf8f4 commit 05f9c24

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

skills/metamask-agent-wallet/SKILL.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,22 @@ If the installed `major.minor` differs from the pinned `cliVersion`, or the inst
174174
175175
Run this check once per session. Do not block operations on it.
176176

177-
### 2. Authentication
177+
### 2. Readiness gate (authentication + initialization)
178+
179+
`mm doctor` is the single readiness check. Run it before the first CLI operation in a session:
178180

179181
```bash
180-
mm auth status
182+
mm doctor
181183
```
182184

183-
If the user is not authenticated, follow `workflows/onboarding.md` for first time setup, or `workflows/login.md` for login.
185+
It reports an `authenticated` boolean, an `initialized` boolean, and a list of `hints`. **Do not run any other command until `mm doctor` reports both `authenticated: true` and `initialized: true`.** Authentication and initialization are independent gates: a session can be authenticated while the project has no wallet mode selected, in which case any command that needs a wallet aborts before running with `NOT_INITIALIZED` — "Project not initialized." (hint: Run `mm init` to set up wallet and trading modes.).
186+
187+
A project counts as initialized only when a wallet mode is set — and, for `server-wallet`, a trading mode is set as well (`byok` needs only the wallet mode). Do not use `mm init show` as the check: it requires an initialized project and throws `NOT_INITIALIZED` on an uninitialized one rather than reporting state.
188+
189+
Remediate, then **re-run `mm doctor` and confirm a clean result before doing anything else**:
190+
191+
- `authenticated: false` → follow `workflows/login.md` (or `workflows/onboarding.md` for first-time setup) to run `mm login`.
192+
- `authenticated: true` and `initialized: false` → follow `workflows/onboarding.md` to run `mm init` and select a wallet mode (and a trading mode for server-wallet).
184193

185194
## Safety Rules
186195

skills/metamask-agent-wallet/workflows/onboarding.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Reference command syntax in `references/auth.md` and `references/wallet.md`.
99
1. Check CLI installation.
1010
2. Login.
1111
3. Initialize wallet mode.
12-
4. Verify auth status.
12+
4. Verify readiness.
1313
5. Show wallet address.
1414

1515
## Check CLI Installation
@@ -45,13 +45,13 @@ mm login --token "<TOKEN>"
4545

4646
## Initialize Project
4747

48-
First check if the project is already initialized:
48+
First check whether the project is already initialized with `mm doctor` (read its `initialized` boolean):
4949

5050
```bash
51-
mm init show
51+
mm doctor
5252
```
5353

54-
If already initialized, skip this step.
54+
If `initialized` is `true`, skip this step.
5555

5656
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.
5757

@@ -94,13 +94,13 @@ mm wallet password set
9494

9595
Once the mnemonic is encrypted, all subsequent operations that need the private key require the `MM_PASSWORD` environment variable to be set. Never instruct the user to pass `--password` inline.
9696

97-
## Verify Auth Status
97+
## Verify Readiness
9898

9999
```bash
100-
mm auth status
100+
mm doctor
101101
```
102102

103-
Confirm the session is authenticated, the wallet mode is correct, and the token is valid.
103+
Confirm `mm doctor` reports both `authenticated: true` and `initialized: true` with no blocking hints before proceeding. (`mm auth status` reports only authentication and does not reflect initialization, so it cannot confirm readiness on its own.)
104104

105105
## Show Wallet Address
106106

0 commit comments

Comments
 (0)