Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

browser-extension-developer

БесплатноБез исполняемых скриптовНе проверен

Browser Extension Developer (/ext) — Chrome/Edge Manifest V3 and Firefox WebExtensions: the service-worker lifecycle and what may not live in it, choosing…

olehsvyrydovот olehsvyrydov★ 18 звёзд на GitHub

Об этом скилле

Browser Extension Developer (/ext)

Command: /ext · Category: Development · Aliases: /chrome

Gate Check (workflow)

Consult the workflow-engine skill first.

  • A manifest permission change is an ARCH_APPROVED + SECURITY_OK trigger. Every entry in permissions and host_permissions widens the install prompt and the store review, and a permission is far easier to add than to take back once users have granted it.
  • Anything that reads page content or sends it off-device is a SECURITY_OK trigger — a content script sees the user's authenticated session, including pages the extension's author never anticipated.
  • On review: confirm the extension still works after the service worker is evicted, that no message path depends on the popup staying open, and that no injected string is built from page data.

When to use (and when not)

  • Use for: manifest authoring, service-worker architecture, content scripts and injection, the permissions model, tabs/windows/tab groups/side panel, storage tiers, native messaging, declarativeNetRequest, long-running in-browser work, extension build pipelines and store review.
  • Hand off instead when: the work is ordinary web UI inside the extension's own pages and the extension platform is not the difficulty → /fe; driving a browser from outside to test a site → /e2e; the extension talks to a service you also own → /be for that side; threat modelling a capability the extension is about to acquire → /secops.

The MV3 mental model (read this before writing anything)

Four facts explain most MV3 bugs. Internalise them and the rest of the platform is ordinary JavaScript.

  1. The service worker is not a background page. It is evicted after ~30 seconds idle and has a hard lifetime even while busy. It has no DOM, no window, and no memory between wakes. Any variable you set in it is gone the next time it runs. Never put a long-running job there.
  2. Only a top-level listener registration survives eviction. chrome.tabs.onRemoved.addListener at module scope wakes the worker when a tab closes. The same call made inside a message handler dies with the worker and silently never fires again. Everything the worker must remember between wakes belongs in chrome.storage.session.
  3. The popup is a page, and it closes. Clicking anywhere outside it tears down its JavaScript and every port it opened. Work started in a popup dies with it; a message it sends while calling window.close() in the same breath is dropped if the worker was cold. Anything that takes longer than an instant belongs on a surface that outlives the click.
  4. A content script runs in an isolated world. It shares the DOM with the page and shares nothing else — not window properties, not the page's own libraries. It also runs with the user's authenticated session, which is exactly why it is the security-sensitive part.

Choosing the surface

Surface Lives as long as Use it for Do not use it for
Popup The click. Closes on blur. Picking options, arming an in-page interaction, starting work elsewhere. Anything that takes seconds.
Options page Its own tab. Settings, credentials, permission requests that need a real page. Per-task UI.
Extension page (own tab) Until the user closes it. Owning a long run — it is the job, and it has full DOM + APIs. Anything the user should not have to keep open.
Side panel The window. Survives tab switches. An assistant-style companion to whatever tab is active. State that must survive a window closing; it is per-window.
In-page overlay (injected) The page. Picking an element, highlighting, a toast in context. Anything needing extension APIs directly.
Tab group Its member tabs. Making a multi-tab job one visible object, with a live title. Load-bearing state — the user can dissolve it at any moment.
Offscreen document Explicitly closed. DOM APIs the worker lacks (parsing, clipboard, audio). A general escape hatch from worker eviction.

The rule that follows: the surface that OWNS a job must outlive the job. In practice that means an extension page for anything long, and a popup that does nothing but start it.

The ten things that bite

  1. A bundled content script cannot return a value. Bundlers wrap output in (() => {…})(), whose completion value is undefined, so executeScript({files}) hands back undefined no matter what the source returns. Publish to a well-known global and poll for it — which also removes any deadline on the script. See references/injection-and-extraction.md.
  2. activeTab covers one tab and is revoked on navigation. It is granted when the user invokes the extension, for that tab, until it navigates or closes. It does not cover a background tab you opened, a
Полный SKILL.md на GitHub

Установить browser-extension-developer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/build-and-test.mdreferences/injection-and-extraction.mdreferences/long-running-work.mdreferences/mv3-architecture.mdreferences/permissions-and-security.mdreferences/surfaces-and-ui.mdreferences/tabs-and-groups.md

FAQ

Что делает скилл browser-extension-developer?

Browser Extension Developer (/ext) — Chrome/Edge Manifest V3 and Firefox WebExtensions: the service-worker lifecycle and what may not live in it, choosing between popup / options / side panel / extension page / in-page overlay / tab group, chrome.scripting injection and getting a value back out of it, tabs & tab groups, the permissions model (activeTab vs optional host permissions) and its revocation rules, long-running work that survives the popup closing, content-script security and CSP, and building/testing an extension without a browser in the loop. Use when building, reviewing, debugging or store-shipping any browser extension, or when a task involves a manifest.json with manifest_version. NOT for ordinary web-app UI (that's /fe) and NOT for browser automation with Playwright/Puppeteer (that's /e2e).

Как установить скилл browser-extension-developer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл browser-extension-developer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить browser-extension-developer с