mcpField
A
arch-webext-vue

arch-webext-vue

github.com/hairyf开发2699 次安装2 周前更新
代码仓库

关于 arch-webext-vue

这组技能面向使用 Vitesse WebExt 创建和维护浏览器扩展的开发者,该脚手架基于 Vite、Vue 3 和 TypeScript。内容涵盖扩展结构、构建发布流程、存储、消息传递与测试。

主要功能

  1. 01项目结构与 manifest 指南
  2. 02多配置 Vite 构建
  3. 03弹出窗口、选项页和侧边栏视图
  4. 04存储与跨上下文消息传递
  5. 05测试与打包流程

适用场景

  1. 01使用 Vitesse WebExt 启动扩展项目
  2. 02构建弹出窗口和内容脚本视图
  3. 03在扩展上下文间共享数据
  4. 04测试和打包扩展

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/hairyf/skills --skill arch-webext-vue

安装后在 Claude Code 中输入/arch-webext-vue确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

GENERATION.md
assets/
ci.yml
references/
best-practices-setup-patterns.md
best-practices-type-safe-messaging.md
core-ci.md
core-manifest.md
core-overview.md
core-project-structure.md
features-background.md
features-components-icons.md
features-content-script.md
features-cross-context.md
features-dev-workflow.md
features-pack-release.md
features-storage.md
features-testing.md
features-types-and-env.md
features-views.md
features-vite-build.md

详细介绍

arch-webext-vue 技能涵盖 Vitesse WebExt:一个由 Vite 驱动的 WebExtension 起步模板,使用 Vue 3、TypeScript、UnoCSS 和 webext-bridge。它使用多入口 Vite 处理 popup/options/sidepanel,为 background 和 content script 使用独立配置,动态生成 manifest,并采用共享的 setup 和存储模式。在使用此技术栈创建或维护浏览器扩展时,可使用这些技能。

该技能基于 vitesse-webext(antfu-collective/vitesse-webext),生成于 2026-01-30。

核心参考

主题描述参考
概述特性、技术栈、适用场景core-overview
项目结构文件夹、入口点、脚本core-project-structure
Manifest动态 manifest、MV3、Firefox 与 Chromecore-manifest
CIGitHub Actions — lint、typecheck、build、test、可选 E2Ecore-ci

特性

主题描述参考
Vite 构建多配置、共享配置、background/content、开发 stubfeatures-vite-build
Background入口、webext-bridge、侧边栏、content script HMRfeatures-background
Content script入口、shadow DOM 中的 Vue、样式features-content-script
视图Popup、options、sidepanel——入口模式、setupAppfeatures-views
存储useWebExtensionStorage、共享逻辑features-storage
跨上下文上下文之间的 webext-bridge 消息传递features-cross-context
开发工作流pnpm dev 与 dev-firefox、加载扩展、stub HTMLfeatures-dev-workflow
打包与发布pack:zip、crx、xpi、clear、start:chromium/firefoxfeatures-pack-release
测试Vitest 单元测试、Playwright E2E、fixtures、extensionIdfeatures-testing
类型与环境DEV、NAME、global/shim/modules.d.ts、env.tsfeatures-types-and-env
组件与图标自动导入组件和图标、Iconifyfeatures-components-icons

最佳实践

主题描述参考
Setup 模式setupApp、common-setup、共享组件/样式best-practices-setup-patterns
类型安全的消息传递shim.d.ts 中用于 webext-bridge 的 ProtocolMapbest-practices-type-safe-messaging

评论

支持 Markdown