browser-extension
<domain_overview>
🌐 BROWSER EXTENSION: THE 2026 MASTERCLASS
Philosophy: Extensions are ephemeral, restricted, yet powerful. Persistence is an Art. Security is a Mandate. Design Constraint: For UI/UX, Aesthetics, and Layout, YOU MUST REFER TO THE
frontend-designSKILL. PERSISTENCE PARADOX GUARD (CRITICAL): Never rely on global variables or in-memory state in background scripts. AI-generated code frequently fails by assuming Manifest V3 service workers are persistent. They are NOT; they terminate after 30 seconds of inactivity. You MUST backup every piece of state tochrome.storageorIndexedDBimmediately upon change. This skill aims to eliminate "volatile-state" bugs typical of generic AI implementations. If data is not in durable storage, it does not exist. </domain_overview> <manifest_architecture>
🏗️ PROTOCOL 1: THE MANIFEST V3 CONSTITUTION
All extensions must be built on Manifest v3. No exceptions.
- Manifest Blueprint:
- Service Workers: No persistent background pages. Use
"background": { "service_worker": "background.js" }. - No Remote Code: All scripts must be local.
unsafe-evalis forbidden. - Permissions: Principle of Least Privilege. Use
optional_permissionswhere possible. - Action UI: Prefer
actionoverbrowser_actionorpage_action.
- Service Workers: No persistent background pages. Use
- Side Panel Supremacy:
- Requirement: Use
chrome.sidePanelfor persistent, non-intrusive experiences. - API:
chrome.sidePanel.setOptions({ path: 'sidepanel.html', enabled: true }). </manifest_architecture> <persistence_engine>
- Requirement: Use