WXT browser extension performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring WXT browser extension code to ensure optimal performance patterns. Triggers on tasks involving WXT, browser extensions, content scripts, service workers, messaging, and extension APIs.
A comprehensive performance optimization guide for WXT browser extension development, containing 49 rules across 8 categories. Updated for WXT v0.20+.
wxt-browser-extensions/
├── SKILL.md # Entry point with quick reference
├── README.md # This file
├── metadata.json # Version, org, references
├── references/
│ ├── _sections.md # Category definitions
│ ├── svc-*.md # Service Worker Lifecycle (6 rules)
│ ├── inject-*.md # Content Script Injection (7 rules)
│ ├── msg-*.md # Messaging Architecture (6 rules)
│ ├── store-*.md # Storage Patterns (6 rules)
│ ├── bundle-*.md # Bundle Optimization (5 rules)
│ ├── manifest-*.md # Manifest Configuration (5 rules)
│ ├── ui-*.md # UI Performance (6 rules)
│ └── ts-*.md # TypeScript Patterns (8 rules)
└── assets/
└── templates/
└── _template.md # Rule template for extensions
pnpm install
pnpm build
pnpm validate
references/ with the category prefixassets/templates/_template.md| Prefix | Category | Impact |
|--------|----------|--------|
| svc- | Service Worker Lifecycle | CRITICAL |
| inject- | Content Script Injection | CRITICAL |
| msg- | Messaging Architecture | HIGH |
| store- | Storage Patterns | HIGH |
| bundle- | Bundle Optimization | MEDIUM-HIGH |
| manifest- | Manifest Configuration | MEDIUM |
| ui- | UI Performance | MEDIUM |
| ts- | TypeScript Patterns | LOW-MEDIUM |
Each rule file must include:
---
title: Rule Title (imperative verb form)
impact: CRITICAL|HIGH|MEDIUM-HIGH|MEDIUM|LOW-MEDIUM|LOW
impactDescription: Quantified impact (e.g., "2-10× improvement")
tags: category-prefix, technique, related-concepts
---
## Rule Title
Brief explanation (1-3 sentences) of WHY this matters.
**Incorrect (description of problem):**
\`\`\`typescript
// Code showing anti-pattern
\`\`\`
**Correct (description of solution):**
\`\`\`typescript
// Code showing correct pattern
\`\`\`
Reference: [Source](https://example.com)
Files follow the pattern: {prefix}-{description}.md
prefix: Category identifier (3-8 chars)description: Kebab-case description of the ruleExamples:
svc-register-listeners-synchronously.mdinject-use-main-function.mdmsg-return-true-for-async.md| Level | Description | |-------|-------------| | CRITICAL | Major performance issues, data loss risks, or broken functionality | | HIGH | Significant performance impact or reliability issues | | MEDIUM-HIGH | Noticeable performance or maintenance benefits | | MEDIUM | Moderate improvements or best practices | | LOW-MEDIUM | Minor optimizations or code quality improvements | | LOW | Micro-optimizations or stylistic preferences |
| Command | Description |
|---------|-------------|
| pnpm validate | Validate skill structure and content |
| pnpm build | Generate AGENTS.md from rules |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer