Skip to content

feat: migrate to domains/ layout, add multi-source install tooling#8

Open
abretonc7s wants to merge 1 commit into
mainfrom
feat/new-layout-and-tooling
Open

feat: migrate to domains/ layout, add multi-source install tooling#8
abretonc7s wants to merge 1 commit into
mainfrom
feat/new-layout-and-tooling

Conversation

@abretonc7s
Copy link
Copy Markdown

@abretonc7s abretonc7s commented May 14, 2026

Summary

Per ADR #57. Reformats MetaMask/skills from the original OpenClaw-style layout into the domains/ 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 in Consensys/skills and 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.mdskill.md (installer expects lowercase)
  • _example/sample-skill/ removed (predates the new format)

Plus 32 MetaMask product skills copied from the prior internal repo:

Domain Audience Examples
web3-tools dApp builders gator-cli, smart-accounts-kit, oh-my-opencode
coding MM product eng coding-guidelines, controller-guidelines, deeplink-handler
general All agents codex, gemini CLI usage guides
performance MM product eng rendering, hooks/effects, react-compiler, state
perps MM product eng fix-perps-bug, review-perps-pr
pr-workflow MM product eng create-pr, pr-title, description, changelog, codeowners, etc.
swaps MM product eng add-non-evm-network
testing MM product eng E2E, unit, visual, component-view, performance, A/B, i18n
ui MM product eng ui-development

Total: 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/ with mms- prefix. Later sources override earlier ones on name collision.
  • tools/syncyarn skills driver. Reads METAMASK_SKILLS_DIR (public, no auth) and CONSENSYS_SKILLS_DIR (private overlay). Walks both when both set.
  • tools/deploy — maintainer driver. Forwards --source and 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.local excluded.
  • .gitattributes — LF on shell scripts so WSL/Git Bash on Windows checkouts work.

Companion PRs

Test plan

  • git clone https://github.com/MetaMask/skills /tmp/s && /tmp/s/tools/install --repo metamask-extension --target ~/dev/metamask/metamask-extension --dry-run lists all skills, no errors.
  • From a clean checkout with no env vars: tools/sync --repo metamask-extension --target /tmp/x prints public-first setup instructions and exits non-zero.
  • METAMASK_SKILLS_DIR=/path SKILLS_DOMAINS=perps yarn skills in a consumer repo writes 2 perps skills.
  • With both env vars set and a colliding skill name in private, private version wins on install (verified locally).
  • Cloud-agent bootstrap from a clean container: curl -fsSL https://raw.githubusercontent.com/MetaMask/skills/main/tools/bootstrap | bash -s -- --repo metamask-extension populates .claude/, .agents/, .cursor/ under cwd.
  • CODEOWNERS attribution stays correct (no CODEOWNERS file added in this PR; will be a follow-up if MetaMask wants team-based reviewer assignment).

Out of scope

  • TS rewrite of the install CLI (tracked in ADR open decisions).
  • Personal-skills tooling.
  • Auto-publish to npm.

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).
Comment thread tools/install

# 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"
Copy link
Copy Markdown

@jvbriones jvbriones May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread tools/install
# overlays beat the public base.
#
# Usage:
# tools/install --repo metamask-extension --target ~/dev/metamask/metamask-extension
Copy link
Copy Markdown

@jvbriones jvbriones May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread tools/install
# - 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to always install testing skills, and maybe others. The agents will decide whether to use them or not.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants