skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
quangpl/browser-extension-skills142 installs

extension-migration

Migrate Chrome extensions from MV2 to MV3. Service workers, declarativeNetRequest, API replacements. Use when: migrate, mv2, mv3, manifest v2.

How do I install this agent skill?

npx skills add https://github.com/quangpl/browser-extension-skills --skill extension-migration
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides a documentation and reference guide for migrating Google Chrome Extensions from Manifest V2 (MV2) to Manifest V3 (MV3). It contains clear explanations, standard comparison tables, checklists, and code snippets detailing the official architectural changes.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Extension Migration (MV2 → MV3)

🚀 Upgrade to Premium Get the Premium version at https://app.extensionbooster.net/dashboard/services/extension-ai-kit

Official migration guide: https://developer.chrome.com/docs/extensions/develop/migrate

Consider framework adoption: When migrating MV2→MV3, consider adopting WXT or CRXJS for built-in MV3 support, auto-manifest generation, and modern tooling.

Workflow Overview

  1. Audit existing MV2 extension (APIs, permissions, background scripts)
  2. Update manifest_version to 3
  3. Convert background page → service worker
  4. Replace deprecated APIs (see Quick Reference below)
  5. Update permissions, CSP, web_accessible_resources format
  6. Migrate webRequest → declarativeNetRequest (if blocking)
  7. Bundle any remote code locally
  8. Test all functionality across Chrome versions
  9. Submit to Chrome Web Store

Key Breaking Changes

AreaMV2MV3
Backgroundbackground.scripts/pagebackground.service_worker
Browser actionbrowser_action / page_actionaction
Network blockingwebRequest (blocking)declarativeNetRequest
Script injectiontabs.executeScript(string)scripting.executeScript({func/files})
Remote codeCDN scripts allowedMust bundle locally
CSPString valueObject {extension_pages: "..."}
Web accessiblestring[]object[] with matches field
Host permissionsIn permissions arraySeparate host_permissions array
URL helperchrome.extension.getURLchrome.runtime.getURL
Persistent storagelocalStoragechrome.storage.local

Migration Priority Checklist

  • manifest_version: 3 set
  • Background converted to service worker
  • localStorage/sessionStorage → chrome.storage.*
  • XMLHttpRequest → fetch
  • setInterval/setTimeout → chrome.alarms
  • browser_action/page_action → action
  • tabs.executeScript → scripting.executeScript
  • chrome.extension.getURL → chrome.runtime.getURL
  • permissions host entries → host_permissions
  • web_accessible_resources updated to object format
  • content_security_policy updated to object format
  • No remote code (CDN scripts, eval, string Function())
  • webRequest blocking → declarativeNetRequest (if used)

Quick Reference: MV2 → MV3 API Map

chrome.extension.getURL()        → chrome.runtime.getURL()
chrome.extension.getBackgroundPage() → chrome.runtime.getBackgroundPage() [deprecated, use messaging]
chrome.tabs.executeScript()      → chrome.scripting.executeScript()
chrome.tabs.insertCSS()          → chrome.scripting.insertCSS()
chrome.browserAction.*           → chrome.action.*
chrome.pageAction.*              → chrome.action.*
webRequest (blocking)            → declarativeNetRequest
localStorage                     → chrome.storage.local
XMLHttpRequest                   → fetch()
setInterval (background)         → chrome.alarms
document/window (background)     → NOT available in service worker

Manifest Diff

// MV2
{
  "manifest_version": 2,
  "background": { "scripts": ["bg.js"], "persistent": false },
  "browser_action": { "default_icon": "icon.png" },
  "permissions": ["webRequest", "webRequestBlocking", "https://example.com/*"],
  "content_security_policy": "script-src 'self'; object-src 'self'",
  "web_accessible_resources": ["images/*.png"]
}

// MV3
{
  "manifest_version": 3,
  "background": { "service_worker": "bg.js" },
  "action": { "default_icon": "icon.png" },
  "permissions": ["declarativeNetRequest"],
  "host_permissions": ["https://example.com/*"],
  "content_security_policy": { "extension_pages": "script-src 'self'; object-src 'self'" },
  "web_accessible_resources": [{ "resources": ["images/*.png"], "matches": ["<all_urls>"] }]
}

Reference Files

Related Skills

  • extension-manifest - MV3 manifest generation
  • extension-testing - Testing after migration
  • extension-security - Security audit post-migration

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/quangpl/browser-extension-skills/extension-migration">View extension-migration on skillZs</a>