Repository navigation
feat: install base agent skills by default - #35263
Conversation
Agent skills now arrive from a plain `yarn install` instead of requiring `yarn skills` and a domain selection. The base set (10 skills) installs for everyone; everything else stays opt-in via `yarn skills --select`. - `postinstall` can no longer fail `yarn install`. When @metamask/skills is unresolvable — a production-only install, or a partial node_modules — the script exited 127 and Yarn failed the workspace build, contradicting the README's promise that skipping skills does not affect the app build. - `yarn setup` reports which skills are available. Yarn swallows postinstall output into a build log, so without this the base set arrives silently and nobody learns that team skills are opt-in. It only reads what is on disk, never runs a sync, and is skipped in CI and node-only mode. - `.skills.local.example` documents the base-only default and the `SKILLS_AUTO_UPDATE=0` / `SKILLS_SKIP_POSTINSTALL=1` opt-outs. Requires the `base` flag from MetaMask/skills. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Confirmed — this is a real bug, not a false positive. Verified locally: The auto-update default lives in MetaMask/skills#135, which is unmerged and unpublished. Under
Marking this PR as draft. It is sequenced behind a skills release and cannot merge standalone:
The Good catch by Bugbot; I'd have shipped documentation for a state that didn't exist. |
NicolasMassart
left a comment
There was a problem hiding this comment.
One additional non-blocking concern beyond the existing Cursor thread.
|
The three changed files are fine as written — but the pairing with MetaMask/skills#135 has a supply-chain gap worth closing before the default flips on. Traced every hop:
The npm package path has lockfile pinning, release gating, and Socket/CodeQL review; the cache path has none of that, and once this default flips it reaches every engineer and every drive-by contributor of a public repo on every +1 to @NicolasMassart on "postinstall": "yarn skills:postinstall || echo 'skills postinstall failed (non-fatal)'"Smaller items while it's in draft:
The escape hatches check out well: CI is skipped, |
Review pass over the base-skill install. The reporting task could not actually deliver its message, and two failure paths were wrong in opposite directions. - The empty-state guidance never rendered. rendererOptions sets `showSkipMessage: false`, and listr2 draws `task.message.skip && showSkipMessage ? task.message.skip : task.title`, so the string passed to task.skip() was discarded and the user saw only "Report agent skills [SKIPPED]". On a fresh clone that is the most likely path, so the one case the task exists to serve produced no output at all. Retitling is the only way the `yarn skills` hint reaches the screen. - readdirSync failures were all reported as "none installed". EACCES after a stray `sudo yarn`, or ENOTDIR if a file shadows the directory, mean the state is unknown rather than empty; pointing the reader at `yarn skills` sends them at a command that fails the same way without naming the cause. Only ENOENT now falls through to the empty state. - That non-ENOENT case is retitled, not thrown. Both task lists run with exitOnError and `tasks.run()` is unguarded, so throwing would abort Husky, the Expo build links and the whole iOS / Terms-of-Use stage over a skill count — breaking the README's own promise that skipping skills does not affect the app build. Confirmed against listr2 8.0.2 that a per-task `exitOnError: false` does not help: the task fails, the parent fails, and run() still rejects. - The printed message contradicted itself. It said everything beyond the base set is opt-in, then offered `yarn skills` as a refresh — which falls back to every domain. It now says so plainly and offers `yarn skills --select` for a narrower pick. The Codex claim is dropped too: project-scope skills land in .claude/skills, .cursor/rules and .agents/skills, while Codex only ever receives `scope: user` skills, which install to $HOME and are not counted. - The count is filtered to `mms-` so hand-authored skills in the same directory do not inflate it. - postinstall failures are no longer silent. `|| true` swallowed them whole; with the sync now default-on it can legitimately fail (unknown domain, or an ETIMEDOUT from the delegate cap), and Yarn would still report green. The message goes to stderr with a retry hint, and the hook stays non-fatal. - README and .skills.local.example describe the base-set default rather than the old "yarn install refreshes the cache" behaviour. Still requires the `base` flag from MetaMask/skills: that work is unreleased, and this repo pins ^0.2.0, which cannot resolve the 0.3.0 that will carry it. Bump the dependency and lockfile before merging. Verified: eslint, prettier --check and node --check all clean; `SKILLS_SKIP_POSTINSTALL=1 yarn postinstall` exits 0, confirming the new `>&2` redirection parses in Yarn 4.14.1's portable shell. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks — the supply-chain trace was the most valuable thing on either PR, and all four items are now closed. Two land in MetaMask/skills#135 (c30fa37), two here (224c2de).
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
if [[ -x "$SCRIPT_DIR/install" ]]; then
INSTALL_BIN="$SCRIPT_DIR/install"The cache still supplies Worth flagging a consequence, since it cuts the other way: with the pinned installer now always winning, pinned code can be older than cached content. Concretely, a consumer on 0.2.0 whose cache has already merged the PR body framing. Fair, and still outstanding — "Public content, gitignored output, one clone" describes the data flow and skips the execution step entirely. I'll correct it when this comes out of draft with the dependency bump, rather than describing a risk profile that's about to change again.
While in that file, two further bugs in the same task:
On your escape-hatch check — still accurate, with one addition. |
NicolasMassart
left a comment
There was a problem hiding this comment.
will be good to merge once skills bumped to @metamask/skills 0.3.0
## What Turns on a **base skill set** that installs for every engineer on a fresh clone, with no flags and nothing to read first. Mobile gets 10 skills; everything else stays opt-in. The `mandatory` frontmatter flag is renamed to `base` and actually used. It was already implemented end to end — `tools/install`, `tools/sync`, the schema, the CLI, even a `★` marker in the interactive picker — but **no skill had ever set it**, and the default domain filter was permissive enough that the bypass had nothing to bypass. ## Why Three things had to be true together for "base skills by default" to work. Only the flag existed. | Problem | Fix | |---|---| | Empty `SKILLS_DOMAINS` meant *all* domains, so `base` never applied | `none`/`all` sentinels | | `SKILLS_AUTO_UPDATE` was off by default, so `postinstall` refreshed the cache and installed nothing | Defaults on. The cache refresh moved *behind* the gate, so opted-out engineers no longer pay a network fetch per install | | Six base descriptions were too thin to ever trigger | Rewritten. `coding-guidelines` was literally `"General coding guidelines"` — 25 characters | That last one is the subtle one: a skill's description is its **entire trigger surface**. A 25-character description never fires on the work it governs, while appearing to be covered. ## Automatic vs explicit `yarn skills` reads as "give me the skills", so having it install 10 instead of 36 would be a surprising regression for a command someone typed on purpose. The two paths differ: | Path | Domains | Installed | |---|---|---| | `yarn skills`, no config | all | **36** — unchanged from today | | `yarn install` → `postinstall`, no config | none | **10** | | `yarn install` **with `SKILLS_DOMAINS=perps`** | perps | **12** = 10 base + 2 perps | | `yarn skills --domain none` | none | 10 | `postinstall` exports `SKILLS_DEFAULT_SCOPE=base` and `tools/sync` branches its **fallback** on that. Everything above the fallback in the resolution order is untouched — a `--domain` flag, `SKILLS_DOMAINS`, the picker, and a saved selection all still win. That last property is the point of doing it this way. Passing `--domain none` from `postinstall` would have outranked a saved selection, so an engineer who opted into `perps` would have silently lost it on their next `yarn install`. ## The base set (10) `mobile-testing` · `coding-guidelines` · `controller-integration` · `ui-development` · `component-scaffold` · `performance` · `pr-guidelines` · `create-pr` · `pr-description` · `pr-codeowners` `pr-description` and `pr-codeowners` are included because `create-pr` delegates its main output to them with "if available" phrasing — without them it silently runs in a reduced mode. Always-on cost: **~1,130 tokens** per session. The set is deliberately small: when the agent's skill listing overflows its budget, descriptions get truncated starting with the least-invoked skills, so a bloated base set makes *every* skill harder to trigger. ## Safety Enabling auto-update puts git operations on every engineer's install path, so this also: - suppresses git credential prompts (`GIT_TERMINAL_PROMPT=0`, empty `GIT_ASKPASS`) in both `run()` and the delegated environment — `tools/sync` pulls the **private** Consensys overlay, which could otherwise block on stdin during `yarn install` with no output - bounds every spawn: 300s for network git, 10s for local `bash --version` probes ## Guardrails added - `base: true` + `maturity: experimental` is now a **lint error** — contradictory intent; installing unfinished guidance for everyone is the bad outcome - warns when a base skill's description is under 120 characters ## Verified | Check | Result | |---|---| | Automatic path (`SKILLS_DEFAULT_SCOPE=base`) | exactly 10, in `.claude/skills` and `.agents/skills` | | Explicit `yarn skills` | 36 | | Automatic + `SKILLS_DOMAINS=perps` | 12 — saved selection respected | | `SKILLS_AUTO_UPDATE=0` / `CI=1` | silent, exit 0 | | Full `postinstall` → `sync` → `install` | exit 0 | | Overlay merge intact | `coding-guidelines` 71-byte source stub → 3,990 bytes installed | | `node --test` | 65/65 | | `lint-skill-entry.mjs` | 52 skills, 0 errors | ## Migration note Existing engineers are **not** dropped to 10. Their current installs stay, because pruning is off by default and their next `yarn install` only adds the base set. `yarn skills --prune-stale` once gives a clean state. This does reach **external contributors**: the skills package is a devDependency of public repos, so a drive-by contributor's `yarn install` now clones this repo into `.skills-cache/` and writes 10 gitignored skill files. Public content, gitignored output, one clone — flagging it rather than letting it be discovered later. ## Related - Extension's base set: stacked PR on this branch - Consumer side: MetaMask/metamask-mobile#35263 (draft — needs a published release of this) Known gaps documented separately: no standardized PR-review skill, platform APIs at 2 of ~11, and five deprecated testing skills that still compete with `mobile-testing`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Turns on a **base skill set** that installs for every engineer on a fresh clone, with no flags and nothing to read first. Mobile gets 10 skills; everything else stays opt-in. The `mandatory` frontmatter flag is renamed to `base` and actually used. It was already implemented end to end — `tools/install`, `tools/sync`, the schema, the CLI, even a `★` marker in the interactive picker — but **no skill had ever set it**, and the default domain filter was permissive enough that the bypass had nothing to bypass. Three things had to be true together for "base skills by default" to work. Only the flag existed. | Problem | Fix | |---|---| | Empty `SKILLS_DOMAINS` meant *all* domains, so `base` never applied | `none`/`all` sentinels | | `SKILLS_AUTO_UPDATE` was off by default, so `postinstall` refreshed the cache and installed nothing | Defaults on. The cache refresh moved *behind* the gate, so opted-out engineers no longer pay a network fetch per install | | Six base descriptions were too thin to ever trigger | Rewritten. `coding-guidelines` was literally `"General coding guidelines"` — 25 characters | That last one is the subtle one: a skill's description is its **entire trigger surface**. A 25-character description never fires on the work it governs, while appearing to be covered. `yarn skills` reads as "give me the skills", so having it install 10 instead of 36 would be a surprising regression for a command someone typed on purpose. The two paths differ: | Path | Domains | Installed | |---|---|---| | `yarn skills`, no config | all | **36** — unchanged from today | | `yarn install` → `postinstall`, no config | none | **10** | | `yarn install` **with `SKILLS_DOMAINS=perps`** | perps | **12** = 10 base + 2 perps | | `yarn skills --domain none` | none | 10 | `postinstall` exports `SKILLS_DEFAULT_SCOPE=base` and `tools/sync` branches its **fallback** on that. Everything above the fallback in the resolution order is untouched — a `--domain` flag, `SKILLS_DOMAINS`, the picker, and a saved selection all still win. That last property is the point of doing it this way. Passing `--domain none` from `postinstall` would have outranked a saved selection, so an engineer who opted into `perps` would have silently lost it on their next `yarn install`. `mobile-testing` · `coding-guidelines` · `controller-integration` · `ui-development` · `component-scaffold` · `performance` · `pr-guidelines` · `create-pr` · `pr-description` · `pr-codeowners` `pr-description` and `pr-codeowners` are included because `create-pr` delegates its main output to them with "if available" phrasing — without them it silently runs in a reduced mode. Always-on cost: **~1,130 tokens** per session. The set is deliberately small: when the agent's skill listing overflows its budget, descriptions get truncated starting with the least-invoked skills, so a bloated base set makes *every* skill harder to trigger. Enabling auto-update puts git operations on every engineer's install path, so this also: - suppresses git credential prompts (`GIT_TERMINAL_PROMPT=0`, empty `GIT_ASKPASS`) in both `run()` and the delegated environment — `tools/sync` pulls the **private** Consensys overlay, which could otherwise block on stdin during `yarn install` with no output - bounds every spawn: 300s for network git, 10s for local `bash --version` probes - `base: true` + `maturity: experimental` is now a **lint error** — contradictory intent; installing unfinished guidance for everyone is the bad outcome - warns when a base skill's description is under 120 characters | Check | Result | |---|---| | Automatic path (`SKILLS_DEFAULT_SCOPE=base`) | exactly 10, in `.claude/skills` and `.agents/skills` | | Explicit `yarn skills` | 36 | | Automatic + `SKILLS_DOMAINS=perps` | 12 — saved selection respected | | `SKILLS_AUTO_UPDATE=0` / `CI=1` | silent, exit 0 | | Full `postinstall` → `sync` → `install` | exit 0 | | Overlay merge intact | `coding-guidelines` 71-byte source stub → 3,990 bytes installed | | `node --test` | 65/65 | | `lint-skill-entry.mjs` | 52 skills, 0 errors | Existing engineers are **not** dropped to 10. Their current installs stay, because pruning is off by default and their next `yarn install` only adds the base set. `yarn skills --prune-stale` once gives a clean state. This does reach **external contributors**: the skills package is a devDependency of public repos, so a drive-by contributor's `yarn install` now clones this repo into `.skills-cache/` and writes 10 gitignored skill files. Public content, gitignored output, one clone — flagging it rather than letting it be discovered later. - Extension's base set: stacked PR on this branch - Consumer side: MetaMask/metamask-mobile#35263 (draft — needs a published release of this) Known gaps documented separately: no standardized PR-review skill, platform APIs at 2 of ~11, and five deprecated testing skills that still compete with `mobile-testing`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The base-skills behaviour this PR depends on shipped in 0.3.0. The previous range `^0.2.0` resolves to `>=0.2.0 <0.3.0`, so it could never pick the new version up on its own — the manifest had to change. Verified against the published package rather than a local checkout: `yarn skills:postinstall` runs clean, 16 skills carry `base: true`, and the domain and maturity filters skip the rest as expected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Five points from review, all on the reporting and documentation around the change rather than the change itself. `.skills.local.example` documented `SKILLS_SKIP_POSTINSTALL=1` as a setting for that file, but the CLI reads it from `process.env` only — `shouldSkipPostinstall(process.env)`, where `SKILLS_AUTO_UPDATE` right beside it goes through `getConfigValue(env, localConfig, ...)`. An engineer opting out of the new default-on behaviour would have written the line, seen no effect, and kept getting a sync on every install. Documented as an export, with `SKILLS_AUTO_UPDATE=0` named as the one this file can express. `setup.mjs` claimed more than it knew. The count is a directory listing, not a report of what the sync did: `metamask-skills postinstall` returns 0 on internal failure, so a sync that errored leaves the previous install in place and it was being announced as "installed". It also counts directories from an earlier all-domains `yarn skills` — postinstall does not pass --prune-stale, so those persist unmanaged. Now says "Found N", with the caveats in a comment, and the third bullet points at `--prune-stale` instead of telling engineers to run `yarn skills` as a routine refresh. That bullet was self-defeating: it silently expanded a base-only install to every domain, which the line above it describes as the opposite of what happens automatically. `error.code` is now `error?.code`. A non-object rejection would have thrown a TypeError from inside the catch — the exact abort of Husky, Expo links and the iOS/Terms stage that the comment above it rules out. AGENTS.md and .gitignore still described `yarn skills` as the only way skills arrive, and .gitignore pointed at a `SKILLS_DOMAINS=` key this PR comments out. README's prose said skills sync "on demand" two lines above a code block saying `yarn install` installs them. AGENTS.md is loaded into every agent's context via CLAUDE.md, so it was the most consequential of the three. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The `|| echo` guard was measurably worse than no guard. Tested with yarn 4.14.1 in a scratch workspace, failing postinstall either way: bare YN0009 + build.log path, re-runs the build on every later install || echo YN0007 only, message printed nowhere, never retried again Yarn surfaces build output only for builds it considers failed, so the guard both discarded its own message and marked the build successful — meaning Yarn stopped retrying too. The commit that added it claimed "postinstall failures are no longer silent"; they were more silent. It cannot be dropped (unguarded, `yarn install` exits 1, which the README rules out), so it is now `|| true` and the README says plainly that nothing is printed either way. The `--prune-stale` bullet expanded what it claimed to trim. tools/sync:415 falls back to DOMAINS=all unless postinstall exports SKILLS_DEFAULT_SCOPE, so `yarn skills --prune-stale` installs all 39 and prunes nothing — the exact self-defeating property removed from the `yarn skills` refresh bullet in the previous commit, reintroduced one line below it. Now `--domain none --prune-stale`. The empty-state title had the same flaw and now names `yarn install` for the base set. The count reads .claude/skills and said "for Claude Code and Cursor". Those directories are written independently and drift: on this checkout .claude/skills held 10 while .cursor/rules and .agents/skills held 39, so the message undercounted Cursor by 29. It now says "in .claude/skills" and speaks only for what it read. Docs: .gitignore:215 still described `yarn skills` as how skills arrive — the previous commit claimed that fix but only touched the .skills.local block above it. README and .skills.local.example both overstated the refresh: Yarn re-runs postinstall only when the dependency tree changes or the last build failed, so `git pull && yarn install` usually refreshes nothing. Also documented that the empty-SKILLS_DOMAINS-means-all rule is .skills.local-only; an exported empty value is not an override at all. Not addressed: the report task still has no unit test. Testing it needs setup.mjs to become importable (it runs `await tasks.run()` at module scope) and Jest's script glob is `.test.ts` against CommonJS, so it is a refactor of a critical setup path rather than an added file. Raising it rather than doing it quietly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8048038. Configure here.
Testing the previous commit's `--domain none --prune-stale` against an engineer
who has opted into a domain showed it does the wrong thing for them. There is no
single correct command here, because sync's fallback depends on what the reader
already has:
saved SKILLS_DOMAINS=perps plain --prune-stale 12 -> 12 (saved wins)
+ --domain none 12 -> 10 (opt-in dropped)
nothing saved plain --prune-stale 10 -> 37 (fallback is all)
+ --domain none 10 -> 10
So the previous line was right for the default reader and silently stripped the
domain of anyone who had configured one. Recommend the plain form and mention
`--domain none` as the base-set-only variant, rather than hardcoding either.
Also verified while there that a domain opt-in survives the base-only default on
all three paths — saved, env var and flag each resolve to base + perps (12).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #35263 +/- ##
==========================================
+ Coverage 85.35% 85.93% +0.58%
==========================================
Files 6610 6825 +215
Lines 179756 191142 +11386
Branches 44611 47558 +2947
==========================================
+ Hits 153430 164260 +10830
- Misses 16050 16227 +177
- Partials 10276 10655 +379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0.3.0 cannot deliver base skills to anyone with CONSENSYS_SKILLS_DIR set — it picks the overlay's copy of tools/install because npm strips the executable bit its guard tested for. 0.3.1 fixes that, so the floor moves rather than staying at a release that does not work for part of the team. Verified against the published package with the exec bits exactly as npm delivered them (tools/install at 0644) and the overlay configured: yarn skills:postinstall 10 base skills, all three targets yarn skills 39, every domain back to base 10 `yarn install` on its own reports 0 here, which is not a regression: Yarn had already rebuilt the workspace during `yarn up`, and it re-runs postinstall only when the dependency tree changes or the last build failed. `--check-cache` does not force it either. That is the behaviour this branch documents in README and .skills.local.example. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes touch app source code, test infrastructure, E2E test files, page objects, selectors, flows, or any user-facing functionality. No E2E tests need to run. Performance Test Selection: |
|




Note
Unblocked. MetaMask/skills#135 and MetaMask/skills#154 are merged and
@metamask/skills@0.3.1is published. Ready to review.Description
Agent skills currently require running
yarn skillsand picking domains by hand. This makes the base set arrive from a plainyarn installinstead, so a fresh clone lands 10 skills with no flags and nothing to read first. Everything else stays opt-in viayarn skills --select.package.json@metamask/skillsbumped to^0.3.1;postinstallcan no longer failyarn installyarn.lock@metamask/skills@npm:0.3.1scripts/setup.mjsyarn setupreports which skills are on disk.skills.local.exampleREADME.md,AGENTS.md,.gitignoreyarn skillsas the only way skills arriveWhy 0.3.1 and not 0.3.0. The base-skill default shipped in 0.3.0, but 0.3.0 cannot deliver it to anyone with
CONSENSYS_SKILLS_DIRset:tools/syncchose its installer with an-xtest, npm strips the executable bit when unpacking, so it fell through to the overlay's copy oftools/install— which predatesbase:and installed zero skills while exiting 0. Found by testing this branch against the published package; fixed in MetaMask/skills#154 and released as 0.3.1.Verified against the published 0.3.1 with the exec bits exactly as npm delivers them (
tools/installat0644) and the overlay configured:Same setup returned 0/0/0 on 0.3.0.
Why the postinstall guard is
|| true. Unguarded, an unresolvable@metamask/skills(production-only install, partialnode_modules) exits 127 andyarn installexits 1 — measured. That contradictsREADME.md, which promises "Skippingyarn skillsis fine — it only affects agent tooling, not the app build."It was
|| echo '...' >&2first. Measured with yarn 4.14.1 in a scratch workspace, failing postinstall either way:YN0009+build.logpath|| echo …YN0007only, message printed nowhereYarn surfaces build output only for builds it considers failed, so the guard discarded its own message and marked the build successful, which stopped Yarn retrying.
|| trueis the honest form; the README now says plainly that nothing is printed either way.Why the setup report. Yarn swallows all postinstall output into a build log, so the base set arrived silently and nobody learned that team skills are opt-in.
yarn setupruns in the foreground and is run often. The task only reads.claude/skills/; it never runs a sync, soyarn setupdoes not install twice. Skipped in CI and--nodemode, wherepostinstallalready skips installing.Output:
"Found", not "installed":
postinstallreturns 0 even when the sync fails, so this is a directory listing rather than a report of what this run did. It names only Claude Code because it only reads.claude/skills— the three targets drift, and captioning it "and Cursor" reported 10 on a checkout where Cursor was loading 39.The prune hint cannot be one command. With a domain saved, plain
--prune-stalekeeps it (12 → 12) and--domain nonesilently discards it (12 → 10); with nothing saved the fallback isall, so plain--prune-staleinstalls every domain first (10 → 37). Both measured.One oddity worth knowing. The trailing blank line comes from a
constant, not whitespace. Listr trims each capturedconsole.logchunk, so a trailing newline, space, tab, NBSP, or an extraconsole.log('')is all removed and the next task's output butts against this one. A zero-width space is not in JavaScript's whitespace set, so it survives the trim while rendering as nothing. Written as an escape with a comment rather than a literal, so no invisible byte sits in the file for a formatter to strip.Behaviour change. Engineers without
SKILLS_DOMAINSset go from ~36 skills to 10 on their next dependency change. Nothing is pruned automatically, so existing installs accumulate —yarn skills --prune-stalecleans up once, andSKILLS_DOMAINS=allrestores previous behaviour. Opt out entirely withSKILLS_AUTO_UPDATE=0orSKILLS_SKIP_POSTINSTALL=1.This also reaches external contributors:
@metamask/skillsis a devDependency of a public repo, so a drive-by contributor'syarn installwill clone the public skills repo into.skills-cache/and write 10 gitignored skill files. Public content, gitignored output, one clone — flagging it rather than letting it be discovered later.Changelog
CHANGELOG entry: null
Developer tooling only — no user-facing change.
Related issues
Refs: AIENG-38
Depended on: MetaMask/skills#135 and MetaMask/skills#154 (both merged, released as
@metamask/skills@0.3.1)Manual testing steps
Screenshots/Recordings
Before
N/A — no UI change. Before this PR,
yarn setupprinted nothing about agent skills.After
Terminal output shown in the Description above.
Pre-merge author checklist
Performance checks (if applicable)
N/A for all three — this changes a setup script and a package.json script, with no app-runtime code path.
Pre-merge reviewer checklist
Note
Low Risk
Developer-only install and setup scripting; no app runtime or production dependency paths change beyond a resilient postinstall hook.
Overview
Fresh clones get a default agent skill set without running
yarn skillsfirst. The PR bumps@metamask/skillsto^0.3.1sopostinstallsyncs only base skills duringyarn install/ setup;yarn skillsstill installs every domain. Docs (README, AGENTS.md,.skills.local.example,.gitignore) are updated to match that split and to documentSKILLS_DOMAINS, opt-outs (SKILLS_AUTO_UPDATE=0), and when Yarn actually re-runs postinstall.yarn installno longer fails if the skills hook breaks:postinstallis nowyarn skills:postinstall || true, aligning with the promise that agent tooling is optional for the app build.yarn setupsurfaces what’s on disk: a new Report agent skills Listr task (local only, not CI/--node) listsmms-*folders under.claude/skillsand points people atyarn installfor the base set oryarn skillsfor all domains, without triggering a second sync.Reviewed by Cursor Bugbot for commit 51dd8ea. Bugbot is set up for automated code reviews on this repo. Configure here.