Authoring a MetaMask controller: BaseController or not, state metadata (`persist`, `anonymous`, `usedInUi`), `this.update`, the options-bag constructor, typed messenger actions. Use when writing or reviewing a controller, or changing what it persists or…
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…
Extension UI hooks and effects: when not to use `useEffect`, dependency arrays, why `JSON.stringify` deps are never the fix, cascading effects, `AbortController` cleanup. Use when an effect loops or fires every render, deps are stringified to force equality,…
React Compiler in the Extension UI: what it optimizes, where it bails out, and when manual memoization is still needed. Use when deciding whether `useMemo`, `useCallback` or `React.memo` are still required, reviewing reflexive memoization, or working out why…
Extension UI render performance: list keys, virtualization, `React.memo`, code splitting, Web Workers, debouncing. Use when a long list stutters, scrolling feels janky, a component re-renders more than it should, or a route loads slowly. Effects go to…
Extension Redux state and selectors: reducer purity, keeping non-serializable values out of the store, normalization, Immer, batching, identity output selectors. Use when components re-render on unrelated state changes, a selector returns a fresh identity…
Single MetaMask Extension testing entrypoint. Routes unit, UI and composed-background integration, and Selenium E2E create/maintain work (flakiness, POM anti-patterns) to the right references. Use when writing, fixing, reviewing, or placing Extension tests;…
General coding standards for MetaMask client repos: TypeScript-only new code, no `any`, naming, file layout, error handling, and the required- reading and enforcement checklist. Use when writing or refactoring application code, when deciding how to structure…