wxt

Build browser extensions with WXT - a next-gen framework with file-based entrypoints, Vite builds, auto-imports, typed storage with migrations, content script UIs, and multi-browser MV2/MV3 support.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "wxt" with this command: npx skills add timeraa/skills/timeraa-skills-wxt

WXT - Browser Extension Framework

When to Use

Apply this skill when:

  • Project has wxt.config.ts in root
  • Code uses defineBackground, defineContentScript, defineUnlistedScript
  • package.json has wxt as a dependency
  • Entrypoints directory contains extension entry files
  • Code imports from #imports or wxt/*

Quick Reference

TopicReference
Configuration, manifest, env vars, TypeScriptreferences/config.md
Entrypoints (background, HTML pages, unlisted)references/entrypoints.md
Content scripts (UI, main world, SPA)references/content-scripts.md
Storage API, defineItem, migrations, watchersreferences/storage.md
Messaging (cross-context communication)references/messaging.md
Testing with WxtVitest and fakeBrowserreferences/testing.md
WXT modules (using and creating)references/modules.md
Multi-browser builds and runtime detectionreferences/multi-browser.md
Vue, React, Svelte, Solid setupreferences/frontend-frameworks.md
Common patterns and anti-patternsreferences/patterns.md

Most Common Pattern

// entrypoints/background.ts
export default defineBackground({
  main() {
    // ALL runtime code must be inside main() - cannot be async
    browser.runtime.onInstalled.addListener(() => {
      console.log('Extension installed');
    });
  },
});

Critical: main() cannot be async. Code outside main() runs at build time in Node.js.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

webext-core

No summary provided by upstream source.

Repository SourceNeeds Review
General

wxt

No summary provided by upstream source.

Repository SourceNeeds Review
General

Find Skills for ClawHub

Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants...

Registry SourceRecently Updated
1270
Profile unavailable