Skip to content

Commit fb75978

Browse files
yashovardhanclaude
andcommitted
Rewrite metamask-agent-wallet skill for weak-LLM execution (v6.0.0)
Full template rewrite of SKILL.md and all references/ and workflows/, verified against @metamask/agentic-cli 4.0.1 (--help flag schemas + live read-only runs + compiled-source inspection): - One canonical syntax per command (flag form wherever both exist); removed phantom positionals (predict quote/place/markets get, wallet requests watch) - Required/optional flag tables with value formats; captured real output blocks with Capture -> placeholder lines; explicit confirm-before-executing checklists; per-file error/recovery tables - SKILL.md: placeholder legend, global-flags table, preflight checklist with real mm doctor output, explicit routing rows (added mm tx, price/token subcommands) - Split predict.md into predict-account/data/trade; market-data.md into price/token; renamed chain.md->chains.md, polling.md->wallet-requests.md; new concepts.md and aave.md - New scripts/encode_approve.py for exact-amount ERC-20 approvals - Fixed: QR login works on prod (COMING_SOON guard is dead code); --to-address rejected same-chain (INVALID_SWAP_PARAMS); perps --venue optional; --wallet-timeout + walletTimeoutSeconds documented; perps --dry-run/--yes coverage; transfer --token semantics; Aave ERC-20 vs native value branch Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 20fdc45 commit fb75978

52 files changed

Lines changed: 4758 additions & 3173 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,59 @@ catch up if you are on an older skill version — apply the entries above yours
1010
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
and the skills follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212

13+
## [6.0.0] — targets CLI v4.0.1
14+
15+
### Changed (breaking)
16+
17+
- **Full rewrite of `SKILL.md` and every file in `references/` and `workflows/`** to fixed,
18+
weak-LLM-friendly templates: one canonical syntax per command (flag form wherever both
19+
positional and flag forms exist), required/optional flag tables with value-format columns,
20+
captured real output blocks with `Capture: field → <placeholder>` lines, explicit
21+
"Confirm before executing" field checklists, per-file error/recovery tables, and a
22+
placeholder legend + global-flags table centralized in `SKILL.md`. Every documented flag was
23+
verified against `mm <command> --help` JSON on CLI v4.0.1. Incremental catch-up from ≤5.x
24+
does not apply to this entry — re-read the whole skill.
25+
- Split `references/predict.md``predict-account.md`, `predict-data.md`, `predict-trade.md`;
26+
split `references/market-data.md``price.md`, `token.md`; renamed `references/chain.md`
27+
`chains.md` and `references/polling.md``wallet-requests.md`.
28+
29+
### Added
30+
31+
- `references/concepts.md` — shared concepts: wallet/trading modes, async job model
32+
(`pollingId`, `--wait`, `intent`), secrets via `MM_PASSWORD`/`MM_MNEMONIC`, `$SKILL_DIR`,
33+
CAIP-2/CAIP-19 construction, amount/decimals conversion, suspicious-payload checklist.
34+
- `references/aave.md` — canonical home for the Aave V3 GraphQL machinery (endpoint, market
35+
discovery, amount formats per operation, the three response types, approval security rule).
36+
- `scripts/encode_approve.py` — deterministic ERC-20 `approve(address,uint256)` calldata for
37+
exact-amount allowances (replaces the old hand-encoding instruction in the supply workflow).
38+
39+
### Fixed
40+
41+
- Removed phantom positional syntax: `predict quote`/`place`/`markets get` and
42+
`wallet requests watch` are flag-only (`--token-id`, `--market`, `--polling-id`).
43+
- `predict redeem`: exactly one of `<condition-id>` | `--all` (previously shown as both optional).
44+
- `predict markets search` takes a positional query (`mm predict markets search <query>`).
45+
- Documented `--wallet-timeout` on all wallet-job commands and the `walletTimeoutSeconds`
46+
config key; `MM_PASSWORD` env applies to every command that accepts `--password`.
47+
- perps: `--venue` is optional (defaults to `hyperliquid`); `--dry-run`/`--yes` documented on
48+
cancel/transfer/deposit/withdraw (the old "`--yes` has no effect" claim was false).
49+
- `transfer --token`: ERC-20 transfers use the contract address; symbols only for native.
50+
- QR login (`mm login qr`) works on all environments including production — the
51+
`COMING_SOON`-on-prod claim in the onboarding workflow was stale (verified against CLI source).
52+
- `--to-address` is rejected for same-chain swaps (`INVALID_SWAP_PARAMS`) — documented with the
53+
verbatim error; `--to-address`/`--refuel` are cross-chain only.
54+
- Aave supply: explicit ERC-20 (`"value":"0x0"`) vs native (hex from `amount_to_hex.py`)
55+
branch; per-operation amount formats consolidated in `references/aave.md`.
56+
- SKILL.md routing: added `mm tx` (lookup by hash); replaced the vague `mm price ...` /
57+
`mm token ...` rows with one row per subcommand.
58+
59+
### Notes
60+
61+
- The CLI's own `--help` *usage strings* are unreliable in places (e.g.
62+
`mm wallet trading-mode get --help` prints `mm mode get`, which does not exist, and
63+
advertises `--chain-namespace`/`--address` flags that are rejected). The docs trust the
64+
`flags` arrays and empirical runs instead; upstream bug to file against MetaMask/agentic.
65+
1366
## [5.0.1] — targets CLI v4.0.1
1467

1568
### Removed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ SKILLs for the MetaMask Agent CLI (`@metamask/agentic-cli` v4.0.1). These skills
66

77
| Skill | Description |
88
| --- | --- |
9-
| [`metamask-agent-wallet`](./skills/metamask-agent-wallet/SKILL.md) | Full CLI skill that routes the agent to topic-specific reference docs (`references/`) for all MetaMask Agent CLI commands — auth, wallets, transfers, signing, swaps, bridges, perps, prediction markets, Aave V3, market data, x402 payments, and calldata decoding — plus multistep workflow templates (`workflows/`) for onboarding, swaps, bridges, perps, prediction markets, and Aave. |
9+
| [`metamask-agent-wallet`](./skills/metamask-agent-wallet/SKILL.md) | Full CLI skill that routes the agent to topic-specific reference docs (`references/`) for all MetaMask Agent CLI commands — auth, wallets, transfers, signing, swaps, bridges, perps, prediction markets, Aave V3, market data, x402 payments, and calldata decoding — plus multistep workflow templates (`workflows/`) for onboarding, swaps, bridges, perps, prediction markets, and Aave. Every doc follows a fixed template (one canonical syntax per command, flag tables verified against `mm --help`, captured outputs, confirmation checklists) so that even small models can execute commands by string substitution. Runtime helper scripts: `amount_to_hex.py`, `encode_approve.py`, `x402_pay.py`. |
1010

1111
## Installation
1212

1313
Install with [Vercel's Skills CLI](https://skills.sh):
1414

1515
```bash
16-
npx skills add metaMask/agent-skills
16+
npx skills add metamask/agent-skills
1717
```
1818

1919
## Changelog

0 commit comments

Comments
 (0)