Commit 569e061
chore(skills): use shared skills package (MetaMask#8965)
## Summary
- Add `yarn skills` integration for Core, mirroring Mobile/Extension
behavior.
- Delegate skills sync/setup to the shared `@metamask/skills` CLI
instead of keeping Core-local sync scripts.
- Ignore generated skill outputs and document Core skill usage.
## Related
- ADR 57: MetaMask/decisions#162
- Shared package PR: MetaMask/skills#24
## Validation
Validated against the published `@metamask/skills` npm package
(`^0.1.0`):
- `node --check bin/metamask-skills.mjs`
- `npm pack --pack-destination /tmp`
- packed CLI `sync --target /Users/deeeed/dev/metamask/core-4 --dry-run`
- packed CLI `postinstall --target /Users/deeeed/dev/metamask/core-4
--dry-run` with `SKILLS_AUTO_UPDATE=1`
- packed CLI target override with `METAMASK_SKILLS_TARGET_REPO=core`
The lockfile has been refreshed against the published package, so
dependency install / immutable install checks now pass.
## **How to use**
Run manual sync:
```bash
yarn skills
```
To opt into best-effort regeneration during setup/install, add this to
`.skills.local` or your shell:
```bash
SKILLS_AUTO_UPDATE=1
```
Optional filters work through the shared installer:
```bash
SKILLS_DOMAINS=testing,coding
SKILLS_INCLUDE=agentic/recipe-harness
```
Use `METAMASK_SKILLS_TARGET_REPO` locally for forks or unusual remotes
that should use the canonical `core` overlays.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Developer-only tooling and install hooks; no runtime library or
controller code changes.
>
> **Overview**
> Wires Core into the shared **`@metamask/skills`** CLI so agent skills
sync matches Mobile/Extension instead of repo-local scripts.
>
> **`package.json`** adds **`yarn skills`** (`metamask-skills sync`),
**`skills:postinstall`**, and a root **`postinstall`** hook (optional
refresh when **`SKILLS_AUTO_UPDATE=1`**). **`@metamask/skills@^0.1.0`**
is a devDependency with an updated **`yarn.lock`**. LavaMoat
**`allowScripts`** now allows **`$root$`** so install can run the skills
postinstall.
>
> **`.gitignore`** excludes **`.skills.local`**, **`.skills-cache/`**,
and generated outputs under **`.claude/skills/`**,
**`.agents/skills/`**, and **`.cursor/rules/`**.
**`.skills.local.example`** documents domain filters and env overrides;
**README** adds an **Agent skills** section with usage commands.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
08001cc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6112b2b commit 569e061
5 files changed
Lines changed: 85 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
19 | 39 | | |
20 | 40 | | |
21 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | | - | |
| 115 | + | |
112 | 116 | | |
| 117 | + | |
113 | 118 | | |
| 119 | + | |
114 | 120 | | |
115 | | - | |
116 | | - | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6283 | 6283 | | |
6284 | 6284 | | |
6285 | 6285 | | |
| 6286 | + | |
6286 | 6287 | | |
6287 | 6288 | | |
6288 | 6289 | | |
| |||
8324 | 8325 | | |
8325 | 8326 | | |
8326 | 8327 | | |
| 8328 | + | |
| 8329 | + | |
| 8330 | + | |
| 8331 | + | |
| 8332 | + | |
| 8333 | + | |
| 8334 | + | |
| 8335 | + | |
| 8336 | + | |
8327 | 8337 | | |
8328 | 8338 | | |
8329 | 8339 | | |
| |||
0 commit comments