Chrome Extension Service Worker Expert

•
3
•

Implements robust Manifest V3 service worker logic, focusing on lifecycle management, state persistence, and event-driven architecture.

The Chrome Extension Service Worker skill provides specialized guidance for developing Manifest V3 (MV3) background scripts. Because MV3 service workers are ephemeral and terminate after periods of inactivity, this skill ensures developers follow critical architectural patterns such as synchronous top-level listener registration and state rehydration via chrome.storage. It helps developers avoid common pitfalls like using unreliable setTimeout calls for long-running tasks or losing global variables, offering clear implementation strategies for chrome.alarms and offscreen documents when DOM access is required.

Características Principales

013 GitHub stars
02State rehydration via chrome.storage
03Offscreen document integration for DOM access
04Chrome Alarms for persistent background tasks
05Synchronous top-level listener registration
06MV3 ephemeral lifecycle optimization

Casos de Uso

01Implementing reliable scheduled tasks and network requests in the background
02Migrating Manifest V2 background pages to Manifest V3 service workers
03Ensuring extension state persistence across service worker restarts