skills/browser-extension/extension-ui/SKILL.md
Build extension UI — popup, options page, side panel, and devtools panel — with React/Vue or vanilla JS.
npx skillsauth add kienbui1995/magic-powers extension-uiInstall 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.
| Surface | File | Trigger | Size |
|---------|------|---------|------|
| Popup | popup.html | Toolbar icon click | 800×600px max |
| Options page | options.html | Right-click → Options | Full browser tab |
| Side panel | sidepanel.html | chrome.sidePanel API | Persistent panel |
| DevTools panel | devtools.html | DevTools → custom tab | DevTools pane |
| New tab override | newtab.html | New tab | Full page |
chrome.storage on open; save to storage on changechrome.runtime.sendMessage// popup.js
document.addEventListener('DOMContentLoaded', async () => {
const { count } = await chrome.storage.local.get('count');
document.getElementById('count').textContent = count ?? 0;
});
// manifest.json
"options_ui": {
"page": "options.html",
"open_in_tab": true
}
chrome.storage.sync for user preferences (syncs across devices)// manifest.json
"side_panel": { "default_path": "sidepanel.html" },
"permissions": ["sidePanel"]
// Open side panel on action click
chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true });
Use Plasmo or WXT for React/Vue extensions:
# Plasmo
npm create plasmo@latest
# WXT
npm create wxt@latest
Handles: manifest generation, HMR in dev, production build, MV3 compatibility.
Vanilla JS for simple extensions — no framework overhead, faster popup load.
chrome.storage on open (not relying on background state)?chrome.storage.sync for user preferences?<script> — move all JS to external fileswindow.close() in popup closes the popup, not the browser windowcontent-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.