mcpField
W
wxt-browser-extensions

wxt-browser-extensions

github.com/pproencaDevelopment2181.1k installsUpdated 11w ago
Repository

About wxt-browser-extensions

A browser extension optimization guide for WXT developers, with prioritized practices for WXT v0.20+ development.

Key features

  1. 01Covers eight development categories
  2. 02Prioritizes rules by impact
  3. 03Guides service workers and content scripts
  4. 04Covers messaging, storage, and manifest setup
  5. 05Includes TypeScript practices

Use cases

  1. 01Develop WXT browser extensions
  2. 02Configure service workers and content scripts
  3. 03Design messaging between extension contexts
  4. 04Review permissions, storage, and bundle size

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill wxt-browser-extensions

After installing, type/wxt-browser-extensionsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
README.md
assets/templates/
_template.md
references/
_sections.md
bundle-analyze-size.md
bundle-externalize-wasm.md
bundle-minify-content-scripts.md
bundle-split-entrypoints.md
bundle-tree-shake-icons.md
inject-all-frames.md
inject-choose-correct-world.md
inject-dynamic-registration.md
inject-run-at-timing.md
inject-spa-navigation.md
inject-use-ctx-invalidated.md
inject-use-main-function.md
manifest-content-security-policy.md
manifest-cross-browser-compatibility.md
manifest-minimal-permissions.md
manifest-use-optional-permissions.md
manifest-web-accessible-resources.md
msg-avoid-circular-messages.md
msg-handle-no-receiver.md
msg-return-true-for-async.md
msg-type-safe-messaging.md
msg-use-ports-for-streams.md
msg-use-tabs-sendmessage.md
store-batch-operations.md
store-choose-storage-area.md
store-handle-quota-errors.md

Details

From the project README

Community WXT Browser Extensions Best Practices

Comprehensive performance optimization guide for WXT browser extension development. Contains 49 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation. Updated for WXT v0.20+.

When to Apply

Reference these guidelines when:

  • Writing new WXT browser extension code
  • Implementing service worker background scripts
  • Injecting content scripts into web pages
  • Setting up messaging between extension contexts
  • Configuring manifest permissions and resources

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Service Worker LifecycleCRITICALsvc-
2Content Script InjectionCRITICALinject-
3Messaging ArchitectureHIGHmsg-
4Storage PatternsHIGHstore-
5Bundle OptimizationMEDIUM-HIGHbundle-
6Manifest ConfigurationMEDIUMmanifest-
7UI PerformanceMEDIUMui-
8TypeScript PatternsLOW-MEDIUMts-

Quick Reference

1. Service Worker Lifecycle (CRITICAL)
2. Content Script Injection (CRITICAL)
3. Messaging Architecture (HIGH)
4. Storage Patterns (HIGH)
5. Bundle Optimization (MEDIUM-HIGH)
6. Manifest Configuration (MEDIUM)
7. UI Performance (MEDIUM)
8. TypeScript Patterns (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported