[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CGEN2N9CT852P1F68X255D":3,"skill-same:01M6CGEN2N9CT852P1F68X255D":65},{"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},"01M6CGEN2N9CT852P1F68X255D","extension-errors-debugging",null,"Diagnose browser extension errors — MV3 vs MV2, background\u002FUI context, error tagging","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\u002Fplatform\u002Fskills\u002Fextension-errors-debugging\u002Fskill.md",[],[18,19,20,21,22,23,24,25,26,27,28,29],"debugging","extension errors debugging","extension","errors","diagnose","browser","ui","context","error","browser extension","background","tagging","2026-11-10 10:12:30",false,"---\nmaturity: experimental\nname: extension-errors-debugging\ndescription: Diagnose browser extension errors — MV3 vs MV2, background\u002FUI context, error tagging\n---\n\n# Extension Errors Debugging\n\n## When To Use\n\n- Errors appear in one manifest version but not the other\n- Background connection or keepalive failures\n- Errors that are hard to reproduce in development (only manifest in prod)\n- Diagnosing Sentry errors before attributing root cause\n\n## Do Not Use When\n\n- Local development errors with full stack traces and reliable repro\n- Build\u002Fcompile errors (TypeScript, ESLint, bundler)\n- Test failures unrelated to extension runtime behavior\n\n## Workflow\n\n1. **Check distribution** — Filter by `dist` tag. Is the error 99%+ MV3, MV2, or split? Tag splits count errors, not users, so compare the split against how users divide across the same tag before reading a skew as a cause.\n2. **Classify root cause** — MV3-only → service worker lifecycle (specifically cold-start cascade; ongoing idle termination is mitigated — see `mv3-service-worker` knowledge). Split → application logic. MV2-only → Firefox behavior.\n3. **Identify context** — Is the error from background (`app\u002Fscripts\u002F`) or UI (`ui\u002F`)? Stack trace file paths reveal this.\n4. **Check error tags** — Verify `environment`, `installType`, and `dist` are what you expect (these are independent dimensions).\n5. **Reproduce** — Use `dist` tag filter to reproduce in the right manifest version.\n\n## Context Identification from Stack Traces\n\n| Path prefix in trace | Context |\n|---------------------|---------|\n| `app\u002Fscripts\u002Fcontrollers\u002F` | Background controller |\n| `app\u002Fscripts\u002Fmetamask-controller.js` | Background aggregator |\n| `ui\u002Fcomponents\u002F` or `ui\u002Fpages\u002F` | UI (React) |\n| `shared\u002F` | Either — shared module |\n\n## Background-Specific Error Types\n\n| Error | MV3 Root Cause | Mitigated? |\n|-------|---------------|------------|\n| Background connection unresponsive (cold-start cascade) | `service-worker.ts` → `background.js` listener race on worker cold start | No |\n| Background connection unresponsive (first-flush latency) | Cold start + background state aggregation before `startUiSync` | No |\n| Background connection unresponsive (idle termination) | Worker idle-killed mid-session | Yes — 2s `chrome.storage.session` keepalive |\n| Port disconnected (wake\u002Ftermination race) | Port closed during worker lifecycle transition; silent via try\u002Fcatch | No |\n| Keepalive timer missed (active session) | Would imply `chrome.storage.session.set` interval failed — rare; investigate as application bug, not platform behavior | N\u002FA |\n| In-memory state lost (cold start) | New worker instance re-reads persisted state | No |\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| Attribute 99% MV3 error to application code | Check if error requires running background; MV3 SW lifecycle is the likely root cause |\n| Default to \"SW was terminated mid-session\" for MV3 errors | Ongoing idle termination is mitigated by the 2s `chrome.storage.session` keepalive. The likely mechanism is cold-start cascade or first-flush latency — see `mv3-service-worker` knowledge |\n| \"Keepalive timer missed\" ⇒ SW slept | The 2s keepalive prevents idle sleep while active. A missed keepalive during active session is a code bug, not platform behavior |\n| Use `environment` to filter for dev builds | Use `installType: development` — a prod build can be sideloaded |\n| Conflate `dist` and `environment` | They are independent; filter both when needed |\n| Reproduce MV2-only error in Chrome | Use Firefox; `installType` doesn't replicate MV3\u002FMV2 lifecycle difference |\n","# Extension Errors Debugging\n\n## When To Use\n\n- Errors appear in one manifest version but not the other\n- Background connection or keepalive failures\n- Errors that are hard to reproduce in development (only manifest in prod)\n- Diagnosing Sentry errors before attributing root cause\n\n## Do Not Use When\n\n- Local development errors with full stack traces and reliable repro\n- Build\u002Fcompile errors (TypeScript, ESLint, bundler)\n- Test failures unrelated to extension runtime behavior\n\n## Workflow\n\n1. **Check distribution** — Filter by `dist` tag. Is the error 99%+ MV3, MV2, or split? Tag splits count errors, not users, so compare the split against how users divide across the same tag before reading a skew as a cause.\n2. **Classify root cause** — MV3-only → service worker lifecycle (specifically cold-start cascade; ongoing idle termination is mitigated — see `mv3-service-worker` knowledge). Split → application logic. MV2-only → Firefox behavior.\n3. **Identify context** — Is the error from background (`app\u002Fscripts\u002F`) or UI (`ui\u002F`)? Stack trace file paths reveal this.\n4. **Check error tags** — Verify `environment`, `installType`, and `dist` are what you expect (these are independent dimensions).\n5. **Reproduce** — Use `dist` tag filter to reproduce in the right manifest version.\n\n## Context Identification from Stack Traces\n\n| Path prefix in trace | Context |\n|---------------------|---------|\n| `app\u002Fscripts\u002Fcontrollers\u002F` | Background controller |\n| `app\u002Fscripts\u002Fmetamask-controller.js` | Background aggregator |\n| `ui\u002Fcomponents\u002F` or `ui\u002Fpages\u002F` | UI (React) |\n| `shared\u002F` | Either — shared module |\n\n## Background-Specific Error Types\n\n| Error | MV3 Root Cause | Mitigated? |\n|-------|---------------|------------|\n| Background connection unresponsive (cold-start cascade) | `service-worker.ts` → `background.js` listener race on worker cold start | No |\n| Background connection unresponsive (first-flush latency) | Cold start + background state aggregation before `startUiSync` | No |\n| Background connection unresponsive (idle termination) | Worker idle-killed mid-session | Yes — 2s `chrome.storage.session` keepalive |\n| Port disconnected (wake\u002Ftermination race) | Port closed during worker lifecycle transition; silent via try\u002Fcatch | No |\n| Keepalive timer missed (active session) | Would imply `chrome.storage.session.set` interval failed — rare; investigate as application bug, not platform behavior | N\u002FA |\n| In-memory state lost (cold start) | New worker instance re-reads persisted state | No |\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| Attribute 99% MV3 error to application code | Check if error requires running background; MV3 SW lifecycle is the likely root cause |\n| Default to \"SW was terminated mid-session\" for MV3 errors | Ongoing idle termination is mitigated by the 2s `chrome.storage.session` keepalive. The likely mechanism is cold-start cascade or first-flush latency — see `mv3-service-worker` knowledge |\n| \"Keepalive timer missed\" ⇒ SW slept | The 2s keepalive prevents idle sleep while active. A missed keepalive during active session is a code bug, not platform behavior |\n| Use `environment` to filter for dev builds | Use `installType: development` — a prod build can be sideloaded |\n| Conflate `dist` and `environment` | They are independent; filter both when needed |\n| Reproduce MV2-only error in Chrome | Use Firefox; `installType` doesn't replicate MV3\u002FMV2 lifecycle difference |\n",{"name":5,"maturity":35,"description":7},"experimental","main","a0ec29ada8d53edf5a3f24370bec058767157433","domains\u002Fplatform\u002Fskills\u002Fextension-errors-debugging",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 extension-errors-debugging",{"tool":51,"command":52},"bunx","bunx skills add MetaMask\u002Fskills --skill extension-errors-debugging",{"tool":54,"command":55},"pnpm","pnpm dlx skills add MetaMask\u002Fskills --skill extension-errors-debugging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fplatform\u002Fskills\u002Fextension-errors-debugging\u002Fskill.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"repos\u002Fmetamask-extension.md","REFERENCE","参考文档",1762,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fplatform\u002Fskills\u002Fextension-errors-debugging\u002Frepos\u002Fmetamask-extension.md",[66,92,112,119,157,182],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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",[],[73,74,75,76,77,78,79,80,81,23,82,83,84,85,86,87,88,89,90,91],"performance","recipe performance","recipe","app","cold","critical","analysis","tasks","react","layout","screen","network","metamask","flow","recipes","deterministic","harness","mm","sentry",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"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",[],[99,100,101,102,103,104,105,106,107,108,109,110,85,111],"payments","x402 payments","x402","permissions","smart accounts kit","http","build","with","payment","advanced","flows","machine","kit",{"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},"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",[],[103,111,102,105,106,108,85],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":130,"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",[125],{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[131,132,133,134,135,136,137,138,139,140,141,142,143,80,144,145,146,147,148,149,150,151,152,153,154,155,156],"opencode","oh my opencode","my","model","explore","hooks","delegation","librarian","agent orchestration","oracle","orchestration","configure","code","ultrawork","install","multi-agent","tmux","prometheus","planning","use","categories","operate","mode","metis","momus","when",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":30},"01M6CGHY9SVTXK2DK18H794EHE","gator-cli","Use when you need to operate the @metamask\u002Fgator-cli to initialize profiles, upgrade EOA to EIP-7702, grant, redeem, and revoke ERC-7710 delegations, or inspect balances and delegations. Covers commands, required flags, grant scopes, redeem action types, configuration locations, and common usage flows.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Fgator-cli\u002Fskill.md",[],[164,165,166,167,168,145,169,150,170,171,172,152,173,174,175,176,109,177,111,178,156,179,180,181],"cli","gator cli","initialize","https","node","flags","docs","configuration","common","usage","types","balances","inspect","profiles","upgrade","you","io","commands",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":193,"publishedAt":30},"01M6CGHVB2A8SMD9X84ZTH9RHV","ui-development","UI component development standards for MetaMask clients: the strict design-system-first component hierarchy, availability checks before building custom components, styling with design tokens, and required imports. Use when building, restyling, or reviewing any UI component, or when choosing between a design-system, component-library, or custom component.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fui\u002Fskills\u002Fui-development\u002Fskill.md",[188],{"categoryNo":189,"categoryName":190,"taxonomyType":191,"taxonomyTypeDesc":192},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[194,195,24,196,197,198,199,200,201,202,203,204,205,150,206,207,208,209,210,211,212,213,156,106,214,215],"development","ui development","standards","component","first","system","before building","ui component","design","design tokens","design-system","styling","library","components","availability","for","component development","tokens","custom","true","hierarchy","imports"]