extension-lifecycle-decoupling
Verify platform lifecycle events before assuming they cause application-level side effects
- License 许可
- MIT
- 所属仓库
- MetaMask/skills
- 最近更新
- 2026-11-14
- Stars
- ★ 25
- Forks
- 11
01 前言 Front Matter
- name
- extension-lifecycle-decoupling
- maturity
- experimental
- description
- Verify platform lifecycle events before assuming they cause application-level side effects
02 资源文件 1
- 参考文档repos/metamask-extension.md3.4 KB
03 SKILL.md 正文
Extension Lifecycle Decoupling
When To Use
- Estimating event frequency based on service worker eviction
- Debugging behavior that "should" trigger on lock/unlock but doesn't
- Investigating keepalive, timer, or state persistence behavior
Do Not Use When
- Working on UI-only code with no background process interaction
- The behavior reproduces reliably in development without service worker eviction
Core Distinction
| Layer | Examples | Characteristics |
|---|---|---|
| Platform lifecycle | SW eviction, page unload | Infrastructure-level |
| Application lifecycle | Lock, unlock, init | User-level |
These layers are often decoupled. The mapping between them is an implementation detail — verify it, don't assume it.
Verification Checklist
Before claiming a platform lifecycle event causes application behavior:
- Is there an explicit handler (
onSuspend,beforeunload) that triggers the claimed effect? - Is there a keepalive mechanism preventing the lifecycle event?
- Does relevant state persist across restarts (
chrome.storage.local,chrome.storage.session, IndexedDB)? - Are timers alarm-based (persist across SW restart) or
setTimeout-based (don't)? - Is the guard/flag reset by the lifecycle event or by a separate application event?
04 同仓库更多 Skills
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.
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.
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/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
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
smart-accounts-kit
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
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.