重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
electron-skills by llama-farm/llamafarm
npx skills add https://github.com/llama-farm/llamafarm --skill electron-skills适用于 LlamaFarm Desktop 应用程序的 Electron 28 + Electron Vite 模式。
此技能在 typescript-skills 的基础上,扩展了针对主进程/渲染器进程架构、IPC 通信、安全性和性能的 Electron 特有模式。
| 组件 | 技术 | 用途 |
|---|---|---|
| 框架 | Electron 28 | 桌面应用程序框架 |
| 构建 | electron-vite 2 | 基于 Vite 的主进程/预加载/渲染器构建 |
| 更新 | electron-updater | 通过 GitHub 发布进行自动更新 |
| 打包 | electron-builder | 跨平台打包 (macOS/Win/Linux) |
electron-app/
src/
main/ # 主进程 (Node.js 环境)
index.ts # 应用入口、生命周期、IPC 处理器
backend/ # CLI 安装器、模型下载器
window-manager.ts
menu-manager.ts
logger.ts
preload/ # 预加载脚本 (桥接环境)
index.ts # contextBridge API 暴露
renderer/ # 渲染器进程 (浏览器环境)
index.html # 主窗口
splash.html # 启动屏幕
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
contextBridge.exposeInMainWorldnodeIntegration: false此技能继承自 typescript-skills:
ipcMain.handle('cli:info', async () => {
const isInstalled = await this.cliInstaller.isInstalled()
return {
isInstalled,
path: isInstalled ? this.cliInstaller.getCLIPath() : null
}
})
const api = {
cli: {
getInfo: () => ipcRenderer.invoke('cli:info')
},
platform: process.platform,
version: process.versions.electron
}
contextBridge.exposeInMainWorld('llamafarm', api)
new BrowserWindow({
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),
nodeIntegration: false,
contextIsolation: true
}
})
| 类别 | 关键 | 高 | 中 | 低 |
|---|---|---|---|---|
| IPC | 2 | 3 | 2 | 1 |
| 安全性 | 4 | 3 | 2 | 1 |
| 性能 | 1 | 3 | 3 | 2 |
每周安装量
65
代码仓库
GitHub 星标数
830
首次出现
2026年1月22日
安全审计
安装于
codex54
opencode51
claude-code48
gemini-cli47
cursor46
github-copilot43
Electron 28 + Electron Vite patterns for the LlamaFarm Desktop application.
This skill extends typescript-skills with Electron-specific patterns for main/renderer process architecture, IPC communication, security, and performance.
| Component | Technology | Purpose |
|---|---|---|
| Framework | Electron 28 | Desktop application framework |
| Build | electron-vite 2 | Vite-based build for main/preload/renderer |
| Updates | electron-updater | Auto-update via GitHub releases |
| Packaging | electron-builder | Cross-platform packaging (macOS/Win/Linux) |
electron-app/
src/
main/ # Main process (Node.js context)
index.ts # App entry, lifecycle, IPC handlers
backend/ # CLI installer, model downloader
window-manager.ts
menu-manager.ts
logger.ts
preload/ # Preload scripts (bridge context)
index.ts # contextBridge API exposure
renderer/ # Renderer process (browser context)
index.html # Main window
splash.html # Splash screen
contextBridge.exposeInMainWorldnodeIntegration: false alwaysThis skill inherits from typescript-skills:
ipcMain.handle('cli:info', async () => {
const isInstalled = await this.cliInstaller.isInstalled()
return {
isInstalled,
path: isInstalled ? this.cliInstaller.getCLIPath() : null
}
})
const api = {
cli: {
getInfo: () => ipcRenderer.invoke('cli:info')
},
platform: process.platform,
version: process.versions.electron
}
contextBridge.exposeInMainWorld('llamafarm', api)
new BrowserWindow({
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),
nodeIntegration: false,
contextIsolation: true
}
})
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| IPC | 2 | 3 | 2 | 1 |
| Security | 4 | 3 | 2 | 1 |
| Performance | 1 | 3 | 3 | 2 |
Weekly Installs
65
Repository
GitHub Stars
830
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex54
opencode51
claude-code48
gemini-cli47
cursor46
github-copilot43
TanStack Form:高性能无头表单库,支持TypeScript、Zod、Valibot验证
564 周安装