web-extension
Skill4 starsChanged 21 days agoMITView on GitHub
Design, build, port, debug, test, or prepare browser extensions for Chromium, Firefox, and Safari using the WebExtensions model. Use when work involves manifest.json, Manifest V3, extension service workers or background scripts, content scripts, extension messaging, browser permissions, toolbar actions, options pages, sidebars, cross-browser extension compatibility, store-ready packages, Chrome Web Store, Firefox Add-ons, or Safari Web Extensions. Also use when migrating an existing extension between browsers.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- authoringSkill
- chrome-devtoolsSkill
- gamificationSkill
- imagegenSkill
- improve-architectureSkill
- instructionsSkill
- monorepoSkill
- reverse-engineerSkill
- runbookSkill
- security-reviewSkill
- setup-harnessSkill
- skillsSkill
- unslopSkill
- video-reportSkill
- youtube-transcriptSkill
- code-reviewSkill
- debugSkill
- interviewSkill
- prototypeSkill
- researchSkill
- workSkill
- adsenseSkill
- astryxSkill
- cloudflare-cliSkill
- dokploy-best-practicesSkill
- extract-themeSkill
- nextjsSkill
- payload-cmsSkill
- shadersSkill
- swrSkill
- tanstack-querySkill
- tanstack-routerSkill
- tanstack-startSkill
- tanstack-storeSkill
- tauriSkill
- vite-plusSkill
- web-assets-optimizationSkill
- zodSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Use discovery and compatibility.
- Distinctive: line 29
Create a compatibility matrix.
- Distinctive: line 37
Prefer narrow, optional, and user-initiated access.
- Distinctive: line 45
Test source behavior and the packaged artifact in every declared browser.
- Distinctive: line 48
Run a separate release gate for each target store.
- Distinctive: line 54
Existing project: follow its namespace, manifest-generation, bundling, and test conventions unless they conflict with a target-browser …
- Distinctive: line 58
New multi-browser extension: use one shared core plus explicit adapters and target manifests.
- Distinctive: line 60
Chromium: use the target's documented Manifest V3 service-worker syntax and lifecycle.
- Distinctive: line 62
Firefox: verify each API and manifest key.
- Distinctive: line 67
If neither preserves the requested behavior, report the limitation instead of silently widening permissions or weakening security.
- Very specific: line 72
Do not solve injection failures by defaulting to <all_urls>.
- Distinctive: line 73
Do not download executable code at runtime, use dynamic evaluation, or weaken the extension Content Security Policy as a default fix.
- Distinctive: line 75
Do not assume a popup can access the current page DOM.
- Distinctive: line 76
Do not treat a namespace polyfill as proof that an API exists on every target.
- Distinctive: line 77
Do not encode volatile store fees, review times, asset dimensions, or compatibility tables.
- Distinctive: line 79
Do not impose a framework.
- Distinctive: line 87
Every permission and data flow has a necessary, user-visible purpose.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Extension
Build extension behavior around explicit browser targets, execution contexts, permissions, and lifecycle constraints. Treat WebExtensions as a shared model with vendor-specific seams, not as one perfectly uniform platform.
This skill covers WebExtensions and migrations to that model. Ordinary websites, browser automation, userscripts, bookmarklets, legacy Chrome Apps, and legacy Safari App Extensions remain outside its scope.
Workflow
- Discover the target before choosing architecture or syntax. Inspect the repo, then establish browsers and minimum versions, features, UI surfaces, host/data access, distribution channels, native companion needs, and existing tooling. Use discovery and compatibility.
- Create a compatibility matrix. For every required capability, classify it as common, syntax-different, API-different, or unavailable. Verify uncertain or version-sensitive support in current vendor documentation before coding.
- Map execution contexts and message boundaries before implementation. Assign work to content scripts, background/event code, extension pages, page code, or a native companion. Define small validated request/response messages. Use architecture and implementation.
- Map every permission, host pattern, and data flow to a user-visible purpose. Prefer narrow, optional, and user-initiated access. Use permissions, privacy, and security.
- Implement shared domain logic behind narrow browser adapters. Preserve the existing stack. Keep browser namespace, manifests, background declarations, and browser-only UI out of shared feature logic.
- Make background work restart-safe: register listeners at startup, persist durable state, make event handlers idempotent, and never depend on globals surviving suspension.
- Test source behavior and the packaged artifact in every declared browser. Include denial, revocation, restart, upgrade, restricted-page, and failure paths. Use testing and debugging.
- Run a separate release gate for each target store. Re-open the current official policy and submission checklist before packaging, signing, or publishing. Use packaging and release.
Explicit branches
- Existing project: follow its namespace, manifest-generation, bundling, and test conventions unless they conflict with a target-browser requirement.
- New single-browser extension: optimize for that browser, but isolate platform calls where doing so costs little. Do not claim cross-browser support.
- New multi-browser extension: use one shared core plus explicit adapters and target manifests. Do not scatter browser checks through feature logic.
- Chromium: use the target's documented Manifest V3 service-worker syntax and lifecycle. Test forced worker termination.
- Firefox: verify each API and manifest key; choose the documented background declaration and account for Mozilla signing.
- Safari: plan the containing Apple-platform app, Xcode workflow, website-access states, platform testing, signing, and distribution from the start.
- Unsupported capability: feature-detect or provide a target-specific fallback. If neither preserves the requested behavior, report the limitation instead of silently widening permissions or weakening security.
Guardrails
- Do not solve injection failures by defaulting to
<all_urls>. - Do not download executable code at runtime, use dynamic evaluation, or weaken the extension Content Security Policy as a default fix.
- Do not assume a popup can access the current page DOM; cross contexts explicitly.
- Do not treat a namespace polyfill as proof that an API exists on every target.
- Do not encode volatile store fees, review times, asset dimensions, or compatibility tables. Consult current official documentation when those facts affect the task.
- Do not impose a framework. If recommending one, research its current primary documentation and explain why it fits the discovered constraints.
Done when
- The requested feature works in every declared browser and minimum version.
- Each capability has an explicit compatibility outcome and vendor seam.
- Context ownership and all cross-context messages are documented and validated.
- Every permission and data flow has a necessary, user-visible purpose; denial and revocation behave safely.
- Background behavior survives suspension, restart, duplication, and partial work.
- Automated checks pass where present, and the manual matrix covers install, upgrade, primary workflows, failures, and every extension UI surface.
- The exact release artifact loads and passes smoke tests on every target.
- Per-store permissions, privacy disclosures, package contents, signing, and current submission requirements have been checked before release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

