Skip to content
Back to skills

Metamask Official Extension Lifecycle Decoupling

ASecurity

Verify platform lifecycle events before assuming they cause application-level side effects

  • 78 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 22, 2026
developmentdebugging

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add jiayaoqijia/cryptoskill --skill metamask-official-extension-lifecycle-decoupling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Metamask Official Extension Lifecycle Decoupling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Metamask Official Extension Lifecycle Decoupling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jiayaoqijia-metamask-official-extension-lifecycle-decoupling/badge)](https://www.skillsdirectory.com/skills/jiayaoqijia-metamask-official-extension-lifecycle-decoupling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
maturity: experimental
name: extension-lifecycle-decoupling
description: Verify platform lifecycle events before assuming they cause application-level side effects
---

# 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:

1. Is there an explicit handler (`onSuspend`, `beforeunload`) that triggers the claimed effect?
2. Is there a keepalive mechanism preventing the lifecycle event?
3. Does relevant state persist across restarts (`chrome.storage.local`, `chrome.storage.session`, IndexedDB)?
4. Are timers alarm-based (persist across SW restart) or `setTimeout`-based (don't)?
5. Is the guard/flag reset by the lifecycle event or by a separate application event?

Files in this skill

  • LICENSE1 KB
  • SKILL.md1.5 KB
  • SOURCE.md382 B
  • TRUST.auto.yaml2.1 KB
  • repos/metamask-extension.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.