Electron Vue Init Skill logo

Electron Vue Init Skill

Community
jiushiwon
electron-vue-init-skill

Electron + Vue3 + TypeScript 桌面端应用一键初始化技能。基于 electron-vite(事实标准)构建,面向零基础小白,提供环境探测、自动安装、完整三进程分离骨架生成、一键启动/打包脚本。生成的应用页面中心显示"你好,我是考拉搞AI"的空白桌面端。触发词:"Electron 脚手架"、"Electron 一键生成"、"初始化 Electron 项目"、"Electron 快速开始"、"electron init"、"搭建 Electron 服务"、"Electron 桌面端"、"Electron 零基础"、"Electron 小白"、"帮我搭一个 Electron"、"新建 Electron"、"create electron project"、"electron vue"、"electron vue3 桌面端"。

Overview

Publisherjiushiwon
Repositorywg-skills
Skill nameelectron-vue-init-skill
Stars
123
Forks
38
Bundled files
5
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jiushiwon on GitHub. Read the source before you install it.

Installation

Install the Electron Vue Init Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/vue/electron-vue-init-skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiushiwon/wg-skills.git /tmp/wg-skills
mkdir -p .claude/skills
cp -r /tmp/wg-skills/vibeCoding/frontend/vue/electron-vue-init-skill .claude/skills/electron-vue-init-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Electron Vue Init Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Electron Vue Init Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Electron Vue Init Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Electron Vue3 Init Skill

基于 electron-vite(2025 年事实标准)+ Vue3 + TypeScript,面向完全不懂编程的小白,一键生成标准化、开箱即用的桌面端应用骨架。

技术选型(2025 最佳实践)

维度选型理由
构建工具electron-vite替代旧方案(vite-plugin-electron / electron-forge + webpack),社区主流
前端框架Vue 3 + TypeScript与 vue-generate-skill 保持一致
打包工具electron-builder成熟稳定,支持多平台
IPC 通信contextBridge + invoke/handle安全最佳实践,禁止 nodeIntegration
状态管理Pinia(Setup Store)与 vue-generate-skill 一致
请求层fetch(复用 frontend-request-skill)不重复造轮子

与 vue-generate-skill 的区别

维度vue-generate-skill本 skill
目标用户前端开发者零基础小白
运行环境浏览器桌面端(Electron)
构建工具Viteelectron-vite(三进程独立构建)
环境安装用户自己装自动检测 + 自动安装
打包无electron-builder 一键打包
窗口管理无原生窗口控制(最小化/最大化/关闭)
系统托盘无系统托盘支持
IPC 通信无主进程/渲染进程安全通信
默认页面无页面中心显示"你好,我是考拉搞AI"
交互次数多个技术问题最多 2 个问题

不重复造轮子:

  • 请求层复用 frontend-request-skill(桌面端同样用 fetch)
  • Vue3 部分与 vue-generate-skill 保持一致的项目结构和规范
  • 主题系统复用 vue-theme-skill 的 Token 体系

依赖

  • vue-generate-skill:Vue3 项目结构、组件规范
  • vue-theme-skill:设计 Token 体系(CSS 变量)
  • frontend-request-skill:请求层规范(用于桌面端调用后端 API)

核心能力清单(9 项)

#能力说明
1环境探测自动检测 Node.js 版本(>=18)、npm、操作系统
2自动安装初始化 npm、安装依赖
3一键启动npm run dev:electron-vite 同时启动主进程 + 渲染进程
4开发模式Vue3 热重载 + Electron 主进程自动重启
5生产打包npm run build:electron-vite 构建 + electron-builder 打包
6窗口管理原生窗口控制、最小化、最大化、关闭
7系统托盘最小化到托盘、托盘菜单(可选)
8IPC 通信contextBridge 安全双向通信
9默认页面页面中心显示"你好,我是考拉搞AI"

项目目录结构(electron-vite 标准)

{{project-name}}/
├── electron.vite.config.ts       # electron-vite 统一配置
├── electron-builder.json5        # 打包配置
├── package.json                  # 依赖 + scripts
├── tsconfig.json                 # 根 TS 配置
├── tsconfig.node.json            # 主进程/预加载 TS 配置
├── tsconfig.web.json             # 渲染进程 TS 配置
├── src/
│   ├── main/                     # Electron 主进程
│   │   └── index.ts              # 主进程入口
│   ├── preload/                  # 预加载脚本
│   │   ├── index.ts              # contextBridge 暴露 API
│   │   └── electron.d.ts         # 类型声明
│   └── renderer/                 # Vue3 渲染进程
│       ├── index.html            # HTML 入口
│       ├── src/
│       │   ├── main.ts           # Vue 入口
│       │   ├── App.vue           # 根组件
│       │   ├── router/           # 路由
│       │   │   └── index.ts
│       │   ├── stores/           # Pinia 状态管理
│       │   │   ├── index.ts
│       │   │   └── modules/
│       │   ├── views/            # 页面
│       │   │   └── HomeView.vue  # 默认页面("你好,我是考拉搞AI")
│       │   ├── components/       # 组件
│       │   ├── api/              # 请求层(复用 frontend-request-skill)
│       │   ├── styles/           # 样式(复用 vue-theme-skill Token)
│       │   │   └── tokens.css
│       │   ├── utils/            # 工具函数
│       │   └── types/            # 类型定义
│       └── env.d.ts              # Vite 类型声明
└── resources/                    # 应用资源(图标等)
    └── icon.png

生成流程

第一步:询问用户(只问 2 个问题)

1. 项目名叫什么?(默认 my-electron-app)
2. 需要系统托盘吗?(默认不需要)

不做:不问技术细节、不问打包平台——全部自动选最佳实践。

第二步:环境探测

按 references/env-setup.md 流程执行:

  1. 检测 Node.js 是否安装 / 版本(需 >= 18 LTS)
  2. 检测 npm 是否可用
  3. 检测操作系统(Windows / macOS / Linux)
  4. 若未安装:给出明确的中文提示 + 下载链接

第三步:生成项目骨架

按 references/skeleton.md 的目录结构与代码模板,现场生成全部文件。

生成顺序:

  1. 创建目录结构
  2. 写入配置文件(package.json、electron.vite.config.ts、electron-builder.json5、tsconfig*.json)
  3. 写入主进程(src/main/index.ts)
  4. 写入预加载脚本(src/preload/index.ts、src/preload/electron.d.ts)
  5. 写入 Vue3 渲染进程(src/renderer/ 完整结构)
  6. 写入默认页面(src/renderer/src/views/HomeView.vue)
  7. 写入项目说明(README.md)

第四步:自动安装与启动

生成完成后:

  1. 运行 npm install
  2. 提示用户运行 npm run dev 启动开发模式

第五步:交付清单

向用户汇报完整交付物:

✅ 项目 {{project}} 生成完毕!

📁 生成的文件(约 20 个):
  - Electron 主进程:src/main/index.ts
  - 预加载脚本:src/preload/index.ts, src/preload/electron.d.ts
  - Vue3 应用:src/renderer/src/main.ts, App.vue, views/HomeView.vue
  - 构建配置:electron.vite.config.ts, electron-builder.json5
  - TS 配置:tsconfig.json, tsconfig.node.json, tsconfig.web.json
  - 启动脚本:package.json scripts

🚀 启动方式:
  开发模式:  npm run dev        (Vue3 热重载 + Electron 主进程自动重启)
  生产构建:  npm run build      (electron-vite 构建 + electron-builder 打包)
  预览构建:  npm run preview    (预览生产构建结果)

📦 打包平台:
  Windows:  .exe(nsis 安装包)
  macOS:    .dmg
  Linux:    .AppImage

🎯 默认页面:
  页面中心显示"你好,我是考拉搞AI"

🔒 安全架构:
  - contextBridge 隔离(禁止 nodeIntegration)
  - IPC invoke/handle 模式(禁止 send/on)
  - CSP 内容安全策略

引用索引

文件内容
references/skeleton.md完整目录结构 + 核心文件代码模板(electron-vite 标准)
references/env-setup.md环境探测流程、自动安装逻辑
references/ipc-guide.mdIPC 通信方案、contextBridge 安全模式
references/tray-guide.md系统托盘集成方案
references/packaging-guide.mdelectron-builder 打包配置

强制交付物

文档位置说明
项目指南README.md启动方式、打包命令
默认页面src/renderer/src/views/HomeView.vue页面中心显示"你好,我是考拉搞AI"
IPC 类型声明src/preload/electron.d.tsTypeScript 类型安全

红线(不可绕过)

  1. 必须使用 electron-vite:不使用 vite-plugin-electron 或手动配置,统一用 electron-vite。
  2. 三进程严格分离:src/main/、src/preload/、src/renderer/ 代码不互相引用。
  3. 不跳过环境探测:生成前必须先检查用户环境,无法安装则给出明确提示。
  4. 不替用户提交 git。
  5. 所有注释、文档用中文:目标用户是中文小白,不要英文注释。
  6. 默认页面必须显示"你好,我是考拉搞AI":页面水平垂直居中。
  7. 必须使用 electron-builder 打包:确保生成可执行文件。
  8. 安全第一:禁止 nodeIntegration: true,必须用 contextBridge。
  9. IPC 必须用 invoke/handle:禁止 send/on 模式(除非是主进程主动推送)。

触发关键词清单

Electron 脚手架、Electron 一键生成、初始化 Electron 项目、Electron 快速开始、
electron init、搭建 Electron 桌面端、Electron Vue3 骨架、Electron 开箱即用、
Electron 零基础、Electron 小白、帮我搭一个 Electron、新建 Electron、
create electron project、electron vue、electron vue3 桌面端

不做

  • 不生成与 vue-generate-skill 完全相同的骨架(本 skill 是 Electron 桌面端版本)
  • 不询问技术细节(electron 版本等——全部自动选最佳实践)
  • 不负责安装系统级依赖
  • 不锁定版本号
  • 不替用户提交 git
  • 不加未请求的功能(如自动更新——除非用户明确说要)
  • 不做跨平台原生模块编译(如 native node modules)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Electron Vue Init Skill AI skill do?

Electron + Vue3 + TypeScript 桌面端应用一键初始化技能。基于 electron-vite(事实标准)构建,面向零基础小白,提供环境探测、自动安装、完整三进程分离骨架生成、一键启动/打包脚本。生成的应用页面中心显示"你好,我是考拉搞AI"的空白桌面端。触发词:"Electron 脚手架"、"Electron 一键生成"、"初始化 Electron 项目"、"Electron 快速开始"、"electron init"、"搭建 Electron 服务"、"Electron 桌面端"、"Electron 零基础"、"Electron 小白"、"帮我搭一个 Electron"、"新建 Electron"、"create electron project"、"electron vue"、"electron vue3 桌面端"。

Why use Electron Vue Init Skill on TypingMind?

Because you install it once and use it with any model. Electron Vue Init Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Electron Vue Init Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/vue/electron-vue-init-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Electron Vue Init Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Electron Vue Init Skill?

As many as you like. As long as a model supports skills, you can use Electron Vue Init Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Electron Vue Init Skill AI skill free?

Yes. It is published on GitHub by jiushiwon under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇