feat: migrate to domains/ layout, add multi-source install tooling#8
feat: migrate to domains/ layout, add multi-source install tooling#8abretonc7s wants to merge 1 commit into
Conversation
Migrates the existing OpenClaw-style layout (provider/skill-name/SKILL.md) to the new domains/ taxonomy used by Consensys/skills. Existing skills (gator-cli, smart-accounts-kit, oh-my-opencode) move under domains/web3-tools/skills/, preserving git history via git mv. Adds 32 MetaMask product skills (perps, testing, pr-workflow, performance, coding, swaps, ui, general) from the prior Consensys/skills repo. Tooling: - tools/install — multi-source aware (--source repeatable, later wins) - tools/sync — handles METAMASK_SKILLS_DIR + CONSENSYS_SKILLS_DIR - tools/deploy — passes --source through - tools/bootstrap — cloud-agent curl-pipe-bash entry, no auth required Engineers point METAMASK_SKILLS_DIR at a clone of this repo and run `yarn skills` (or get auto-sync via postinstall in consumer repos). Cloud agents (Cursor cloud, Codex cloud, Claude.ai web) use the bootstrap one-liner — no SSH, no env var. Private overlays for internal-only material live in Consensys/skills (layered via CONSENSYS_SKILLS_DIR; private overrides public on name collision). Removes _example/sample-skill (predates the new format).
|
|
||
| # User-scope (global) target dirs, used when a skill declares `scope: user`. | ||
| # Only written if the parent (~/.claude, ~/.codex) already exists. | ||
| USER_CLAUDE_DIR="$HOME/.claude/skills" |
There was a problem hiding this comment.
I am not sure if I see this... I think whatever we install, it should be in the context of the target repos, i.e. nothing outside the repo structure
| # overlays beat the public base. | ||
| # | ||
| # Usage: | ||
| # tools/install --repo metamask-extension --target ~/dev/metamask/metamask-extension |
There was a problem hiding this comment.
can we take the --repo parameter automatically from the --target param? this way we also avoid installing wrong skills in a wrong destination. In other words, you just need to care to bootstrap the repo you are working
| # - Skills land in .claude/skills/, .agents/skills/, .cursor/rules/ | ||
| # - Output names are prefixed mms-<skill-name> | ||
| # - Source frontmatter stays unprefixed | ||
| # - --domain and --maturity filters; default --maturity stable |
There was a problem hiding this comment.
I think we need to always install testing skills, and maybe others. The agents will decide whether to use them or not.
There was a problem hiding this comment.
actually, I would install all by default and allow each contributor to disable on demand in their locals. This way we also improve the visibility about new skills once the contributor do a sync. Otherwise new domains might never get installed.
Summary
Per ADR #57. Reformats
MetaMask/skillsfrom the original OpenClaw-style layout into thedomains/taxonomy and adds an installer CLI that emits multi-operator output (Claude Code, Cursor, Codex). Makes this repo the canonical public source of skills for both dApp / Web3 developers and MetaMask product engineers (extension, mobile). Private/internal material continues to live inConsensys/skillsand can be layered as an overlay.Changes
Content migration
metamask/gator-cli/→domains/web3-tools/skills/gator-cli/(git mv, history preserved)metamask/smart-accounts-kit/→domains/web3-tools/skills/smart-accounts-kit/oh-my-opencode/oh-my-opencode/→domains/web3-tools/skills/oh-my-opencode/SKILL.md→skill.md(installer expects lowercase)_example/sample-skill/removed (predates the new format)Plus 32 MetaMask product skills copied from the prior internal repo:
web3-toolscodinggeneralperformanceperpspr-workflowswapstestinguiTotal: 35 tracked skills (3 existing web3-tools + 32 product skills).
New tooling
tools/install— core writer. Walks--source <dir>(repeatable, ordered). Emits to.claude/skills/,.cursor/rules/,.agents/skills/withmms-prefix. Later sources override earlier ones on name collision.tools/sync—yarn skillsdriver. ReadsMETAMASK_SKILLS_DIR(public, no auth) andCONSENSYS_SKILLS_DIR(private overlay). Walks both when both set.tools/deploy— maintainer driver. Forwards--sourceand other flags to install.tools/bootstrap— zero-auth cloud-agent entry.curl -fsSL .../tools/bootstrap | bash -s -- --repo metamask-extension. Clones into$HOME/.cache/metamask-skills.Repo basics
LICENSE— MIT (kept from existing).SECURITY.md— adds explicit out-of-scope note for installer scripts.README.md— rewritten for dual audience (dApp builders + MM product engineers)..gitignore—.targets.localexcluded..gitattributes— LF on shell scripts so WSL/Git Bash on Windows checkouts work.Companion PRs
MetaMask/metamask-extension#42488— consumer integration on extension (node wrappers, postinstall hook).MetaMask/metamask-mobile#30180— consumer integration on mobile (node wrappers, postinstall hook).Consensys/skills— private overlay only. All public skills migrated here; private repo retained for future internal material.MetaMask/decisions#162— ADR amendment.Test plan
git clone https://github.com/MetaMask/skills /tmp/s && /tmp/s/tools/install --repo metamask-extension --target ~/dev/metamask/metamask-extension --dry-runlists all skills, no errors.tools/sync --repo metamask-extension --target /tmp/xprints public-first setup instructions and exits non-zero.METAMASK_SKILLS_DIR=/path SKILLS_DOMAINS=perps yarn skillsin a consumer repo writes 2 perps skills.curl -fsSL https://raw.githubusercontent.com/MetaMask/skills/main/tools/bootstrap | bash -s -- --repo metamask-extensionpopulates.claude/,.agents/,.cursor/under cwd.Out of scope