一键导入
这个仓库中的 skills
E2E testing guidelines
Add a new EVM network to the @metamask/bridge-controller package in the MetaMask/core monorepo. Use when a task asks to register an EVM chain for Swaps or Bridge, extend ALLOWED_BRIDGE_CHAIN_IDS or DEFAULT_CHAIN_RANKING, add bridge chain constants and display names, define the chain's default swaps token, or expose a new bridge ChainId enum member.
Add a new EVM network to the unified Swaps and Bridge flow in MetaMask/metamask-mobile. Use when a task asks to consume a newly supported bridge-controller chain, add a Mobile bridge network label, configure its default destination token or stablecoin slippage, update bridgeConfigV2 rollout requirements, or validate that a new EVM network appears in Mobile's source and destination network pickers.
Wire a new or existing controller — whether imported from a `@metamask/*-controller` npm package or defined locally in the repo — into the MetaMask Mobile Engine or the MetaMask Extension background. Use this skill when: adding a controller to Engine or to the extension's messenger-client init, creating a controller init function or messenger, delegating actions/events between controllers, adding a controller to EngineState/Engine.context or to MESSENGER_FACTORIES and the MessengerClient union, or debugging a controller whose state never reaches Redux/the UI or resets on restart.
Detect, prevent, and fix flaky Jest unit tests in MetaMask Mobile before they reach CI. Use this skill when: reviewing a PR diff or changed test files for flakiness risk, fixing an intermittently failing Jest test, reproducing a flaky test locally, or auditing GitHub Actions history to rank historically flaky unit tests by failure rate.
Interactively break a perps product requirement into split, dispatch-ready technical tickets across MetaMask Core, its release, Mobile, and Extension. Use when a product manager (or a codebase-aware Claude acting for one) has a perps bug or feature and needs engineering-grade tickets, correctly routed now that @metamask/perps-controller is the Core source of truth. Triages where the change actually lives, emits only the applicable layer tickets with dependency links, and enforces token-efficient, signal-over-noise tickets agents can act on directly.
Pre-flight self-review gate for perps PRs. A perps dev runs it on their OWN PR to drive a looping double-agentic cross-review — two different model CLIs (Claude, Codex, Cursor) review independently because each catches different issues — until all APPROVE the same commit with zero findings. Reviewers are deliberately strict: every perps anti-pattern and every nit is a blocker. Loops fix → re-review until the PR meets perps standard, then says it is ready for an external human reviewer. Use for "review my perps PR", "cross review my perps branch", "is my perps PR ready", or self-review before requesting review. Self-gate: does not push, merge, or open the PR.
Interactively validate perps changes across local MetaMask Core, Mobile, and Extension checkouts. Use when a Core @metamask/perps-controller change must be checked in Mobile/Extension, or when a Mobile/Extension perps change needs parity validation in the other client. Defaults to current checkout as owner, yalc for Core package transport, read-only validation targets, and the smallest meaningful proof; asks the user only when required folders or proof level cannot be resolved.
Interactively author one clean, complete perps ticket — bug, EPIC, or initiative — that states intent and expected outcome without implementation. Use when a PM (or a Claude acting for one) has a raw perps observation, feature idea, or strategic goal and wants a single well-formed ticket ready for engineering to break down. This is the first (product) pass; the engineering split + layer routing is a separate pass (perps-breakdown-tickets). Captures what/expected/repro, makes the ticket surfaceable so it doesn't get lost, and stops before implementation or repo routing.
Identify code owners from CODEOWNERS
Scaffolds (initializes) a new React Native component for MetaMask Mobile. Use when the user asks to create, add, generate, scaffold, initialize, or set up a new component, UI component, or feature component.
UI component development guidelines
Drives the MetaMask Chrome extension via the mm CLI for visual testing in headedless Chrome. Use when asked to visually verify UI changes, capture screenshots or debug extension UI state. Trigger phrases include "verify visually", "take a screenshot", "test the flow", and "check the UI".
Use for any performance question about the MetaMask Mobile React Native app, at any stage. Trigger when: a screen, list, or interaction feels slow, laggy, or janky (account/network switching, scrolling, typing, FPS drops); planning a feature with real-time/websocket data, frequent updates, or large lists and wanting to avoid perf pitfalls before building; reviewing or auditing PRs/code for excessive re-renders, broken selector memoization, Context providers, hook deps, or bundle bloat; making the app faster for power users with many accounts/assets; measuring time-to-interactive, render counts, or FPS and surfacing them in Sentry; or adding render-regression tests so CI catches slowdowns. Covers re-renders, reselect memoization, FlashList, Reanimated, TTI, bundle size, and trace() instrumentation. Not for correctness bugs, styling/spacing, Solidity gas, or the browser extension.
Build x402 payment flows using MetaMask Smart Accounts Kit, machine to machine payments over HTTP with ERC-7710 delegations and ERC-7715 Advanced Permissions
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
General coding guidelines
BaseController development patterns
Deeplink handler creation guidelines
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.
React hooks and effects optimization
React Compiler optimization patterns
Rendering performance optimization
Redux and state management optimization
Create GitHub pull request
Generate CHANGELOG entry
Generate PR description
Pull request creation and review guidelines
Find related GitHub issues
Generate manual testing steps
Check branch for missing tests and guidelines
Add PR to review queue project board
Generate conventional commit PR title
Add non-EVM network support for Swaps/Bridge
A/B testing implementation
Component view testing
Known E2E flakiness patterns and anti-patterns
E2E test writing with Detox
E2E performance testing