skills/browser-extension/manifest-v3/SKILL.md
Design and configure Manifest V3 browser extensions — service workers, permissions, declarative rules, and migration from MV2.
npx skillsauth add kienbui1995/magic-powers manifest-v3Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Required fields:
{
"manifest_version": 3,
"name": "My Extension",
"version": "1.0.0",
"description": "...",
"permissions": [],
"host_permissions": [],
"background": {
"service_worker": "background.js",
"type": "module"
},
"action": {
"default_popup": "popup.html",
"default_icon": "icons/icon48.png"
},
"icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" },
"content_scripts": [],
"web_accessible_resources": []
}
permissions = extension APIs (storage, tabs, contextMenus, alarms, notifications)host_permissions = website access (*://*.example.com/* or <all_urls>)optional_permissions for features users might not need<all_urls>, webNavigation, history, bookmarksKey differences from MV2 background pages:
chrome.storage (not global variables) to persist datachrome.alarms API// ✅ Correct — top-level listener
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
// handle message
return true; // keep channel open for async response
});
// ❌ Wrong — listener inside async callback
chrome.tabs.query({}, (tabs) => {
chrome.runtime.onMessage.addListener(...); // never registered reliably
});
declarativeNetRequest for URL blocking/redirecting{
"declarative_net_request": {
"rule_resources": [{ "id": "ruleset_1", "enabled": true, "path": "rules.json" }]
}
}
eval()web_accessible_resources for resources injected into pagesmanifest_version: 3 (not 2)?chrome.storage not in-memory state?host_permissions scoped as narrowly as possible?<all_urls>), persistent state in service workerchrome.storage.session or chrome.storage.local, not global varsreturn true in onMessage listener is required to keep the message channel open for async responsesweb_accessible_resources must explicitly list files injected into pagescontent-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.