From magic-powers
Build browser extensions that work across Chrome, Firefox, Safari, and Edge — API differences, polyfills, and browser-specific manifest requirements.
npx claudepluginhub kienbui1995/magic-powers --plugin magic-powersThis skill uses the workspace's default tool permissions.
- Building an extension that needs to work in Chrome + Firefox (most common)
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| Manifest V3 | ✅ Required | ✅ Supported | ✅ Required | ✅ Required |
| Service Workers | ✅ | ✅ (110+) | ✅ | ✅ |
| Side Panel | ✅ (114+) | ❌ (sidebar) | ❌ | ✅ |
| declarativeNetRequest | ✅ | ✅ | ✅ | ✅ |
chrome.* namespace | ✅ | ✅ (alias) | ✅ (alias) | ✅ |
browser.* namespace | ❌ native | ✅ native | ✅ native | ❌ native |
Use @mozilla/webextension-polyfill for Promise-based APIs across browsers:
import browser from 'webextension-polyfill';
// Works in Chrome, Firefox, Safari, Edge
const tabs = await browser.tabs.query({ active: true });
browser.* namespace natively (Promise-based)browser_specific_settings in manifest:"browser_specific_settings": {
"gecko": {
"id": "extension@yourdomain.com",
"strict_min_version": "109.0"
}
}
# Convert Chrome extension to Safari format
xcrun safari-web-extension-converter /path/to/extension --project-location ./safari-ext
// Runtime browser detection
const isFirefox = navigator.userAgent.includes('Firefox');
const isChrome = !!window.chrome && !!window.chrome.runtime;
// Feature detection (preferred)
const hasSidePanel = !!chrome.sidePanel;
chrome.* — Chrome/Edge native; aliased in Firefox/Safaribrowser.* — Firefox/Safari native; NOT available in Chrome without polyfillbrowser_specific_settingswebextension-polyfill or WXT for cross-browser Promise APIs?browser_specific_settings.gecko.id set in manifest?browser.* calls without polyfill in Chrome, missing Gecko ID for Firefoxbrowser.tabs.query() fails in Chrome without polyfill — use chrome.* or add polyfillbrowser_specific_settings.gecko.id