[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CGCCG0CE8SDD4G7DKG8ZMN":3,"skill-same:01M6CGCCG0CE8SDD4G7DKG8ZMN":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6CGCCG0CE8SDD4G7DKG8ZMN","effect-antipattern-scan",null,"Review PR diffs that add or modify `useEffect` for the systemic React effect antipatterns","MetaMask\u002Fskills","MetaMask","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11744586?v=4","01M6CGATQAN8ZP8HWEZH2379WJ","01M6CGATVJDE1ZMSRM20CFJ5S8",25,"MIT","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fperformance\u002Fskills\u002Feffect-antipattern-scan\u002Fskill.md",[],[18,19,20,21,22,23,24,25,26,27,28,29],"effect","effect antipattern scan","scan","antipattern","review","diffs","review pr","react","pr","add","antipatterns","for","2026-11-10 10:12:30",false,"---\nmaturity: experimental\nname: effect-antipattern-scan\ndescription: Review PR diffs that add or modify `useEffect` for the systemic React effect antipatterns\n---\n\n# Effect Anti-Pattern Review\n\n**Scope:** Pre-merge review of PRs that add or modify `useEffect` calls. The workflow is a grep-driven checklist against the patterns catalogued in the **`effect-antipatterns`** knowledge file, which is the single source for their definitions and fixes (installed alongside this skill under `knowledge\u002F`).\n\nApplies to both `metamask-extension` and `metamask-mobile`. See overlays for repo-specific paths.\n\n## When To Use\n\n- Reviewing a PR that adds or modifies a `useEffect` call\n- Reviewing a PR that adds `setInterval`, `setTimeout`, `fetch`, or `addEventListener` inside a component\n- Investigating a \"Can't perform a React state update on an unmounted component\" warning\n\n## Do Not Use When\n\n- Reviewing selector or render-cascade issues (use [`selector-antipattern-scan`](..\u002Fselector-antipattern-scan\u002Fskill.md))\n- Reviewing non-React code (background scripts, workers, test utilities)\n- Reviewing an effect that is intentionally one-shot with no async work or timers (check patterns below anyway, but most do not apply)\n\n## Workflow\n\n1. **List changed files with `useEffect`.** `git diff --name-only origin\u002Fmain...HEAD | xargs grep -l 'useEffect'`\n2. **Run the [grep checklist](#grep-checklist)** against the changed files.\n3. **For each hit, map to a pattern** in `effect-antipatterns` and apply the fix from the knowledge file.\n4. **Block on unstable dependency identity**, unless it is a `JSON.stringify` on a cold path with a small object. Do not merge otherwise.\n5. **Block on a timer without cleanup.** Any `setInterval` \u002F `setTimeout` without a matching `clearInterval` \u002F `clearTimeout` in the cleanup function is blocking.\n6. **Require cancellation for async effects.** Any `fetch` \u002F network call inside `useEffect` must guard against a stale response, with a cancelled flag or `AbortController`.\n\n## Grep Checklist\n\n| Pattern (`effect-antipatterns` §) | Detection |\n|---|---|\n| §1 Unstable dependency identity | `grep -rnE 'useEffect.*\\[.*JSON\\.stringify' \u003Csource-dir>`, plus inline `{`\u002F`[` literals in the dep position |\n| §2 Wrong dependencies | Hand review — empty deps that read state (stale closure), deps that read nothing, or an effect dependency the effect never reads |\n| §3 Derived state via effect + setState | Hand review — `useEffect` that calls `setX` from other state\u002Fprops; §3a for chains of them |\n| §4 Missing timer cleanup | `grep -rnE 'setInterval\\|setTimeout' \u003Csource-dir>` then check each effect returns a cleanup |\n| §5 Uncancelled async work | `grep -rnB2 -A10 'fetch\\(' \u003Csource-dir>` within `useEffect` blocks |\n\nSee the repo overlay for the concrete `\u003Csource-dir>` path.\n\n## Common Pitfalls\n\n| Mistake | Correct approach |\n|---|---|\n| Accept `JSON.stringify` in deps because \"the effect needs to rerun when X changes\" | Destructure to primitives or `useMemo` the object on a hot path. A cold path with a small object can stringify |\n| Accept a state-mirror effect because \"the computation is expensive\" | Use `useMemo` for expensive derivations. Effects are for side effects, not state derivation |\n| Let `setInterval` ship without cleanup because \"the component rarely unmounts\" | Cleanup is non-negotiable — unmount frequency doesn't matter, correctness does |\n| Treat \"can't perform state update on unmounted component\" as a cosmetic warning | It is a data race. An old response can overwrite a new one |\n| Add a lint rule disable on `react-hooks\u002Fexhaustive-deps` | Almost always wrong. Destructure or memoize instead |\n| Refactor toward `useEffect` + `setState` because it \"feels like state\" | You probably do not need an effect. See [You Might Not Need an Effect](https:\u002F\u002Freact.dev\u002Flearn\u002Fyou-might-not-need-an-effect) |\n","# Effect Anti-Pattern Review\n\n**Scope:** Pre-merge review of PRs that add or modify `useEffect` calls. The workflow is a grep-driven checklist against the patterns catalogued in the **`effect-antipatterns`** knowledge file, which is the single source for their definitions and fixes (installed alongside this skill under `knowledge\u002F`).\n\nApplies to both `metamask-extension` and `metamask-mobile`. See overlays for repo-specific paths.\n\n## When To Use\n\n- Reviewing a PR that adds or modifies a `useEffect` call\n- Reviewing a PR that adds `setInterval`, `setTimeout`, `fetch`, or `addEventListener` inside a component\n- Investigating a \"Can't perform a React state update on an unmounted component\" warning\n\n## Do Not Use When\n\n- Reviewing selector or render-cascade issues (use [`selector-antipattern-scan`](..\u002Fselector-antipattern-scan\u002Fskill.md))\n- Reviewing non-React code (background scripts, workers, test utilities)\n- Reviewing an effect that is intentionally one-shot with no async work or timers (check patterns below anyway, but most do not apply)\n\n## Workflow\n\n1. **List changed files with `useEffect`.** `git diff --name-only origin\u002Fmain...HEAD | xargs grep -l 'useEffect'`\n2. **Run the [grep checklist](#grep-checklist)** against the changed files.\n3. **For each hit, map to a pattern** in `effect-antipatterns` and apply the fix from the knowledge file.\n4. **Block on unstable dependency identity**, unless it is a `JSON.stringify` on a cold path with a small object. Do not merge otherwise.\n5. **Block on a timer without cleanup.** Any `setInterval` \u002F `setTimeout` without a matching `clearInterval` \u002F `clearTimeout` in the cleanup function is blocking.\n6. **Require cancellation for async effects.** Any `fetch` \u002F network call inside `useEffect` must guard against a stale response, with a cancelled flag or `AbortController`.\n\n## Grep Checklist\n\n| Pattern (`effect-antipatterns` §) | Detection |\n|---|---|\n| §1 Unstable dependency identity | `grep -rnE 'useEffect.*\\[.*JSON\\.stringify' \u003Csource-dir>`, plus inline `{`\u002F`[` literals in the dep position |\n| §2 Wrong dependencies | Hand review — empty deps that read state (stale closure), deps that read nothing, or an effect dependency the effect never reads |\n| §3 Derived state via effect + setState | Hand review — `useEffect` that calls `setX` from other state\u002Fprops; §3a for chains of them |\n| §4 Missing timer cleanup | `grep -rnE 'setInterval\\|setTimeout' \u003Csource-dir>` then check each effect returns a cleanup |\n| §5 Uncancelled async work | `grep -rnB2 -A10 'fetch\\(' \u003Csource-dir>` within `useEffect` blocks |\n\nSee the repo overlay for the concrete `\u003Csource-dir>` path.\n\n## Common Pitfalls\n\n| Mistake | Correct approach |\n|---|---|\n| Accept `JSON.stringify` in deps because \"the effect needs to rerun when X changes\" | Destructure to primitives or `useMemo` the object on a hot path. A cold path with a small object can stringify |\n| Accept a state-mirror effect because \"the computation is expensive\" | Use `useMemo` for expensive derivations. Effects are for side effects, not state derivation |\n| Let `setInterval` ship without cleanup because \"the component rarely unmounts\" | Cleanup is non-negotiable — unmount frequency doesn't matter, correctness does |\n| Treat \"can't perform state update on unmounted component\" as a cosmetic warning | It is a data race. An old response can overwrite a new one |\n| Add a lint rule disable on `react-hooks\u002Fexhaustive-deps` | Almost always wrong. Destructure or memoize instead |\n| Refactor toward `useEffect` + `setState` because it \"feels like state\" | You probably do not need an effect. See [You Might Not Need an Effect](https:\u002F\u002Freact.dev\u002Flearn\u002Fyou-might-not-need-an-effect) |\n",{"name":5,"maturity":35,"description":7},"experimental","main","a0ec29ada8d53edf5a3f24370bec058767157433","domains\u002Fperformance\u002Fskills\u002Feffect-antipattern-scan",11,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills","https:\u002F\u002Fgithub.com\u002FMetaMask","https:\u002F\u002Fmetamask.io","MetaMask brings Ethereum to your web browser","2026-11-14 02:01:03",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add MetaMask\u002Fskills --skill effect-antipattern-scan",{"tool":51,"command":52},"bunx","bunx skills add MetaMask\u002Fskills --skill effect-antipattern-scan",{"tool":54,"command":55},"pnpm","pnpm dlx skills add MetaMask\u002Fskills --skill effect-antipattern-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fperformance\u002Fskills\u002Feffect-antipattern-scan\u002Fskill.md",true,[59,65],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"repos\u002Fmetamask-extension.md","REFERENCE","参考文档",894,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fperformance\u002Fskills\u002Feffect-antipattern-scan\u002Frepos\u002Fmetamask-extension.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"repos\u002Fmetamask-mobile.md",1012,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fperformance\u002Fskills\u002Feffect-antipattern-scan\u002Frepos\u002Fmetamask-mobile.md",[70,78,86,112,132,139],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M7B6HMM9ND19MSEXPDW7Q3F8","recipe-plan-and-dispatch","Plan a ticket with the engineer before a recipe fix-bug or dev run. Agree the acceptance criteria and an implementation plan, write it as an approved plan file, and print the prompt that starts the run with any agent and model. Never edits product code or starts the run.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-plan-and-dispatch\u002Fskill.md",[],[],"2026-11-15 14:19:17",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M72GPQFVTGCPVK22DSDJXEJY","recipe-library-audit","Run every recipe of a team recipe library on one client with mm-harness, classify each result with the failing node and exact error, and review naming and composability. Produces a per-client table; changes nothing.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-library-audit\u002Fskill.md",[],[],"2026-11-10 22:39:42",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":30},"01M70PKJH3WSTFMSA8VYQWNDW9","recipe-performance","Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold\u002Fwarm\u002Fbackground-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout\u002Fpaint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-performance\u002Fskill.md",[],[93,94,95,96,97,98,99,100,25,101,102,103,104,105,106,107,108,109,110,111],"recipe","recipe performance","performance","analysis","app","cold","critical","tasks","browser","layout","screen","network","metamask","flow","recipes","deterministic","harness","mm","sentry",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":30},"01M6CGJ7AEJCZSRGF3PBE6EWBG","x402-payments","Build x402 payment flows using MetaMask Smart Accounts Kit, machine to machine payments over HTTP with ERC-7710 delegations and ERC-7715 Advanced Permissions","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Fx402-payments\u002Fskill.md",[],[119,120,121,122,123,124,125,126,105,127,128,129,130,131],"x402","x402 payments","payments","with","payment","advanced","flows","machine","kit","build","permissions","smart accounts kit","http",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":30},"01M6CGJ4AEKJZJWJ704SZTWQ5T","smart-accounts-kit","Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Fsmart-accounts-kit\u002Fskill.md",[],[127,130,129,128,122,124,105],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":30},"01M6CGJ11KGB6862Z1ADYTMKYZ","oh-my-opencode","Multi-agent orchestration plugin for OpenCode. Use when the user wants to install, configure, or operate oh-my-opencode — including agent delegation, ultrawork mode, Prometheus planning, background tasks, category-based task routing, model resolution, tmux integration, or any oh-my-opencode feature. Covers installation, configuration, all agents (Sisyphus, Oracle, Librarian, Explore, Atlas, Prometheus, Metis, Momus), all categories, slash commands, hooks, skills, MCPs, and troubleshooting.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Foh-my-opencode\u002Fskill.md",[],[146,147,148,149,150,151,152,153,100,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171],"oh my opencode","my","opencode","hooks","explore","model","momus","code","ultrawork","install","multi-agent","tmux","prometheus","planning","use","orchestration","categories","operate","mode","metis","configure","when","oracle","agent orchestration","librarian","delegation"]