Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pproenca avatar

Wxt Browser Extensions

  • 883 installs
  • 186 repo stars
  • Updated July 24, 2026
  • pproenca/dot-skills

wxt-browser-extensions is a rule-set skill that gives coding agents WXT browser extension best practices with impact-tagged TypeScript examples for developers building high-performance modern extensions.

About

wxt-browser-extensions is a dot-skills rule collection for the WXT browser extension framework. Each rule card includes an impact level (CRITICAL through LOW), quantified impact descriptions such as 2-10× improvements, tags, incorrect anti-pattern TypeScript snippets, and corrected implementations with guidance on when not to apply the pattern. Developers reach for wxt-browser-extensions when agents generate or review WXT extension code for Chrome, Firefox, or other targets and need performance-safe patterns around messaging, storage, content scripts, and build configuration. The skill prevents common extension pitfalls that cause data loss or runtime regressions during iterative agent-assisted development.

  • 49 rules across 8 categories prioritized by impact
  • Critical focus on service worker lifecycle and content script injection
  • Updated for WXT v0.20+ with #imports and current API patterns
  • Incorrect vs correct code examples for every rule
  • Designed specifically for AI agents and LLMs to consume

Wxt Browser Extensions by the numbers

  • 883 all-time installs (skills.sh)
  • +28 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #1,194 of 16,565 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pproenca/dot-skills --skill wxt-browser-extensions

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs883
repo stars186
Security audit2 / 3 scanners passed
Last updatedJuly 24, 2026
Repositorypproenca/dot-skills

How do you write high-performance WXT browser extensions?

Give their coding agent a comprehensive rule set for writing high-performance, modern WXT browser extensions.

Who is it for?

Frontend developers building WXT-based Chrome or Firefox extensions with agent-generated TypeScript who want guardrailed patterns.

Skip if: Developers building plain webpack extensions without WXT or teams that only need manifest V2 legacy snippets.

When should I use this skill?

The user asks to scaffold, review, or optimize a WXT browser extension in TypeScript.

What you get

Impact-ranked WXT rule cards, corrected TypeScript snippets, and anti-pattern fixes

  • rule-guided TypeScript patches
  • anti-pattern fixes
  • extension architecture guidance

By the numbers

  • Rules use 6 impact tiers from CRITICAL through LOW
  • Each rule card includes incorrect and correct TypeScript code blocks

Files

SKILL.mdMarkdownGitHub ↗

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)

  • `svc-register-listeners-synchronously` - Register listeners synchronously to prevent missed events
  • `svc-avoid-global-state` - Use storage instead of in-memory state
  • `svc-keep-alive-patterns` - Keep service worker alive for long operations
  • `svc-handle-install-update` - Handle install and update lifecycle events
  • `svc-offscreen-documents` - Use offscreen documents for DOM operations
  • `svc-declarative-net-request` - Use declarative rules for network blocking

2. Content Script Injection (CRITICAL)

  • `inject-use-main-function` - Place runtime code inside main() function
  • `inject-choose-correct-world` - Select ISOLATED or MAIN world appropriately
  • `inject-run-at-timing` - Configure appropriate runAt timing
  • `inject-use-ctx-invalidated` - Handle context invalidation on update
  • `inject-dynamic-registration` - Use runtime registration for conditional injection
  • `inject-all-frames` - Configure allFrames for iframe handling
  • `inject-spa-navigation` - Handle SPA navigation with wxt:locationchange

3. Messaging Architecture (HIGH)

  • `msg-type-safe-messaging` - Use @webext-core/messaging for type-safe protocols
  • `msg-return-true-for-async` - Return true for async message handlers (raw API)
  • `msg-use-tabs-sendmessage` - Use tabs.sendMessage for content scripts
  • `msg-use-ports-for-streams` - Use ports for streaming communication
  • `msg-handle-no-receiver` - Handle missing message receivers
  • `msg-avoid-circular-messages` - Prevent circular message loops

4. Storage Patterns (HIGH)

  • `store-use-define-item` - Use storage.defineItem for type-safe access
  • `store-choose-storage-area` - Select appropriate storage area
  • `store-batch-operations` - Group related data into single defineItem
  • `store-watch-for-changes` - Use watch() for reactive updates
  • `store-handle-quota-errors` - Handle storage quota errors
  • `store-versioned-migrations` - Use versioning for schema migrations

5. Bundle Optimization (MEDIUM-HIGH)

  • `bundle-split-entrypoints` - Split code by entrypoint
  • `bundle-analyze-size` - Analyze and monitor bundle size
  • `bundle-tree-shake-icons` - Use direct imports for icon libraries
  • `bundle-externalize-wasm` - Load WASM dynamically
  • `bundle-minify-content-scripts` - Minimize content script size

6. Manifest Configuration (MEDIUM)

  • `manifest-minimal-permissions` - Request minimal permissions
  • `manifest-use-optional-permissions` - Use optional permissions progressively
  • `manifest-web-accessible-resources` - Scope web accessible resources
  • `manifest-content-security-policy` - Configure CSP correctly
  • `manifest-cross-browser-compatibility` - Support multiple browsers

7. UI Performance (MEDIUM)

  • `ui-use-shadow-dom` - Use Shadow DOM for injected UI
  • `ui-defer-rendering` - Defer popup rendering until needed
  • `ui-cleanup-on-unmount` - Clean up UI on unmount
  • `ui-sidepanel-persistence` - Preserve sidepanel state
  • `ui-position-fixed-iframe` - Use iframe for complex UI
  • `ui-avoid-layout-thrashing` - Batch DOM reads and writes

8. TypeScript Patterns (LOW-MEDIUM)

  • `ts-use-imports-module` - Use #imports virtual module and auto-imports
  • `ts-use-browser-not-chrome` - Use browser namespace over chrome
  • `ts-type-entrypoint-options` - Type entrypoint options explicitly
  • `ts-augment-browser-types` - Augment types for missing APIs
  • `ts-strict-null-checks` - Enable strict null checks
  • `ts-import-meta-env` - Use import.meta for build info
  • `ts-avoid-any` - Avoid any type in handlers
  • `ts-path-aliases` - Use path aliases for imports

How to Use

Read individual reference files for detailed explanations and code examples:

  • Section definitions - Category structure and impact levels
  • Rule template - Template for adding new rules

Reference Files

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

Related skills

How it compares

Pick wxt-browser-extensions for WXT-specific agent guardrails instead of generic Chrome extension tutorials.

FAQ

What framework does wxt-browser-extensions target?

wxt-browser-extensions targets the WXT browser extension framework, providing TypeScript rule cards with incorrect and correct patterns for building modern Chrome and Firefox extensions.

How are rules prioritized in wxt-browser-extensions?

wxt-browser-extensions labels each rule with an impact tier from CRITICAL to LOW and includes quantified impact descriptions, such as multiplicative performance improvements or data-loss prevention guidance.

Is Wxt Browser Extensions safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingintegrationsfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.