Token导航 LogoToken导航

Agent Skill · 待分类

electron-wrapper(Electron wrapper 命令行)

electron-wrapper 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

electron-wrapper 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证信息还不明确,暂无第三方扫描结果,按安装量在待分类类的 11,209 个 Skill 里排第 2,668。

总安装 1,449周安装 61GitHub Stars 333下载 508核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:electron-wrapper(Electron wrapper 命令行)
来源仓库:https://github.com/brianlovin/claude-config
仓库路径:skills/electron-wrapper
安装命令:
npx skills add https://github.com/brianlovin/claude-config --skill electron-wrapper
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/brianlovin/claude-config --skill electron-wrapper

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

electron-wrapper 提供 Electron 应用的封装和管理工具。由于缺少详细文档,建议查看 GitHub 仓库了解具体功能。安装前应评估是否需要修改应用入口或注入额外功能。注意可能影响原有应用结构,需谨慎测试兼容性。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/electron-wrapper

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/brianlovin/claude-config --skill electron-wrap…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

electron-wrapper 怎么安装?

在终端执行 npx skills add https://github.com/brianlovin/claude-config --skill electron-wrapper。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

electron-wrapper 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

electron-wrapper 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

electron-wrapper 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

electron-wrapper 用的人多吗?

公开数据是累计安装 1,449 次,近一周安装 61 次,下载 508 次,GitHub 333 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

electron-wrapper 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
electron-wrapper

Electron wrapper 命令行 · 本页

1,449333权限未标注未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
electron-wrapper
description
>

Electron Wrapper for Bun Web Apps

This skill guides wrapping an existing Bun web server into a native desktop app using Electron. It's based on a proven implementation that solved every major integration challenge.

Architecture

"Electron as chrome, Bun as server" — Two runtimes working together:

  • Electron/Node.js handles window management, native menus, auto-updates, and IPC
  • Bun runs the actual web server with all your application logic

The Electron main process spawns a bundled Bun binary that runs your server, then loads http://localhost:{port} in a BrowserWindow. Your web app doesn't know or care that it's inside Electron — it's just a web page with an optional window.electronAPI bridge for native features.

This architecture means:

  • Zero changes to your server code (it's still a standard Bun HTTP server)
  • The web app works identically in a browser or in Electron
  • Electron handles only what browsers can't: window chrome, system tray, auto-updates, file system access
  • Two separate node_modules — Electron uses npm, your web app uses Bun

Phase 1: Project Setup

Create the Electron subproject alongside your existing Bun web app.

What to create:

  • electron/ directory with its own package.json (npm, not Bun), two tsconfigs (ESM for main, CJS for preload), electron-builder.yml, and macOS entitlements
  • scripts/build-server.ts for bundling the server
  • scripts/download-bun.ts for downloading platform-specific Bun binaries
  • Parent project changes: new scripts, tsconfig excludes, .gitignore entries

Reference: project-setup.md

Phase 2: Main Process

Build the Electron main process — the entry point, server spawning, window management, auto-updater, and preload bridge.

Files to create:

FilePurpose
electron/src/main/index.tsApp lifecycle, dev/prod mode, single-instance lock, IPC handlers
electron/src/main/bun-server.tsSpawn bundled Bun, port selection, health polling, env var injection
electron/src/main/window.tsBrowserWindow config, bounds persistence, security settings, navigation guards
electron/src/main/updater.tselectron-updater setup, event forwarding to renderer
electron/src/preload/index.tscontextBridge API with invoke/on patterns and unsubscribe support

Key decisions:

  • Dev mode uses ELECTRON_DEV_URL env var to connect to the external dev server (no internal Bun spawn)
  • autoDownload: false — let users choose when to download updates
  • Preload exposes only specific methods, never raw ipcRenderer
  • Window persists bounds via electron-store

Reference: main-process.md

Phase 3: Web App Adaptation

Adapt the existing web app to detect and respond to the Electron environment while remaining fully functional as a standalone web app.

Changes to the web app:

ChangeDetails
Electron detection utilityisElectron(), getElectronPlatform(), isMacElectron(), applyElectronDocumentAttributes()
Type declarationswindow.electronAPI with all properties optional
CSS drag regions.app-window-drag/.app-window-no-drag classes, auto-exclude interactive elements
Traffic light spacing--electron-traffic-left CSS variable (72px on macOS, 0px elsewhere)
Storage pathEnv var for data directory, falling back to CWD
Static asset servingEnv var for static dir in production mode
Auto-update hookuseElectronUpdater() React hook with download/install controls
Update notificationPill component showing available → downloading → ready states
Feature gatingDisable demo mode, hosted features when in Electron

Reference: web-adaptation.md

Phase 4: Build & Distribution

Bundle everything, set up CI/CD, and handle code signing.

Build pipeline:

  1. Build web app (bun run build)
  2. Bundle server to single file (Bun.build() → resources/server/index.js)
  3. Download platform-specific Bun binaries → resources/bun/{platform}-{arch}/
  4. Compile Electron TypeScript (two passes: main ESM + preload CJS)
  5. electron-builder packages everything with extraResources

CI/CD:

  • GitHub Actions triggered by version tags (e.g., v*, clippy-v*)
  • Matrix builds: macOS arm64/x64 on macos-14, Windows x64 on windows-latest
  • --publish never in build step, separate publish job creates draft GitHub release
  • Apple certificate import and notarization in CI

Code signing:

  • macOS: Developer ID Application certificate, exported as base64 .p12
  • Notarization via Apple ID + app-specific password
  • 5 GitHub secrets required: APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_ID, APPLE_PASSWORD, APPLE_TEAM_ID

Icons:

  • macOS: sips + iconutil from source PNG → .icns
  • Windows: png-to-ico npm package → .ico

Reference: build-and-distribute.md

Cutting a Release

Never build release artifacts locally. CI has the signing certificates and notarization credentials. Local builds produce unsigned apps that macOS Gatekeeper will block.

Release workflow:

  1. Bump version in electron/package.json, commit, and merge to main
  2. Find the tag pattern the CI workflow expects:
   grep -A2 'tags:' .github/workflows/*.yml
  1. Tag the merged commit on main:
   git tag <pattern><version> origin/main
   git push origin <pattern><version>
  1. Monitor CI:
   gh run list --workflow=<workflow>.yml --limit=1
  1. Review and publish the draft release on GitHub

Common mistakes:

  • Running electron-builder --publish always locally — no notarization
  • Using gh release create with local artifacts — unsigned
  • Tagging before the version bump is merged — wrong version in build
  • Tagging a feature branch instead of origin/main

See pitfalls.md §13 for full details.

Critical Pitfalls

Quick-reference list — see pitfalls.md for full details with symptoms and code examples.

#PitfallOne-line fix
1ESM/CJS conflicts"type": "module" + default import pattern for CJS packages
2Preload must be CJSSeparate tsconfig with "module": "CommonJS"
3__dirname unavailablefileURLToPath(import.meta.url) polyfill
4Dev mode MIME errorsConnect to external dev server via ELECTRON_DEV_URL
5Bun version mismatchPin version in download script, match dev version
6nvm PATH issuesbash -lc for spawned processes
7Wrong storage pathEnv var + app.getPath("userData")
8White flash on openshow: false + ready-to-show + dark backgroundColor
11${platform} != process.platformPut Bun extraResources in mac:/win: sections with darwin-/win32- prefixes
12Bun workspace hoists depsBundle main with esbuild + createRequire banner, or use npm for electron dir
13Local builds aren't notarizedAlways release via CI tags, never electron-builder --publish locally

Dev Workflow

The electron:dev command runs the full development environment:

npm run dev
  ├── concurrently
  │   ├── dev:web    → cd .. && bun run dev          (Bun dev server with HMR)
  │   └── dev:electron
  │       ├── wait-on http://localhost:3005           (wait for dev server)
  │       ├── npm run build                           (compile TS)
  │       └── ELECTRON_DEV_URL=... electron .         (launch Electron)
  • The web dev server runs with HMR — changes reflect instantly
  • Electron connects to the dev server instead of spawning its own Bun
  • Preload and main process changes require restarting electron:dev
  • Web app changes hot-reload automatically

To test production-like behavior locally:

bun run electron:pack    # builds everything, packages without installer
# Output in electron/release/

Customization Checklist

When adapting this for a new project, update these project-specific values:

  • [ ] App name in electron-builder.yml (productName, appId)
  • [ ] Window title in window.ts
  • [ ] Dev server port in dev:electron script and dev script
  • [ ] Environment variable names (e.g., APP_DATA_DIR, APP_STATIC_DIR)
  • [ ] backgroundColor in window config to match your app's theme
  • [ ] category in electron-builder.yml mac section
  • [ ] Repository URL in electron/package.json
  • [ ] Bun version in download-bun.ts
  • [ ] Icon assets in electron/assets/

平台分布

Codex

33.38%
按下载量换算170

Claude

29.48%
按下载量换算150

Cursor

19.64%
按下载量换算100

Gemini CLI

9.74%
按下载量换算49

安全审计

暂无安全审计结果可展示。

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills