electron-builder-config
Generate and validate electron-builder configuration for multi-platform desktop builds with code signing, auto-update, and platform-specific packaging
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 11
- Forks
- 5
01 前言 Front Matter
- name
- electron-builder-config
- tags
- [ "electron", "desktop", "build", "packaging", "cross-platform" ]
- graph
- { "roles": [ "role:desktop-developer", "role:fullstack-engineer" ], "domains": [ "domain:software-engineering" ], "workflows": [ "workflow:feature-development", "workflow:release-management" ], "skillAreas": [ "skill-area:desktop-ui-frameworks", "skill-area:cross-platform-desktop" ], "specializations": [ "specialization:desktop-development" ] }
- description
- Generate and validate electron-builder configuration for multi-platform desktop builds with code signing, auto-update, and platform-specific packaging
- allowed-tools
- Read, Write, Edit, Bash, Glob, Grep
02 资源文件 1
- 参考文档README.md5.3 KB
03 SKILL.md 正文
electron-builder-config
Generate and validate electron-builder configuration for multi-platform desktop builds. This skill handles the complete configuration for building Electron applications across Windows, macOS, and Linux with proper code signing, auto-update channels, and platform-specific installers.
Capabilities
- Generate complete
electron-builder.ymlorelectron-builder.json5configuration - Configure platform-specific build targets (NSIS, DMG, AppImage, DEB, RPM, Snap, Flatpak)
- Set up code signing for Windows (Authenticode) and macOS (Developer ID)
- Configure auto-update settings with electron-updater
- Optimize build artifacts with compression and deduplication
- Validate existing configurations for common issues
- Generate CI/CD build scripts for GitHub Actions, Azure DevOps, CircleCI
Input Schema
{
"type": "object",
"properties": {
"projectPath": {
"type": "string",
"description": "Path to the Electron project root"
},
"appInfo": {
"type": "object",
"properties": {
"appId": { "type": "string", "description": "Application bundle ID (com.company.app)" },
"productName": { "type": "string" },
"copyright": { "type": "string" }
},
"required": ["appId", "productName"]
},
"platforms": {
"type": "array",
"items": { "enum": ["windows", "macos", "linux"] },
"description": "Target platforms to build for"
},
"targets": {
"type": "object",
"properties": {
"windows": { "type": "array", "items": { "enum": ["nsis", "nsis-web", "portable", "appx", "msi", "squirrel"] } },
"macos": { "type": "array", "items": { "enum": ["dmg", "pkg", "mas", "mas-dev", "zip"] } },
"linux": { "type": "array", "items": { "enum": ["AppImage", "deb", "rpm", "snap", "flatpak", "tar.gz"] } }
}
},
"codeSigning": {
"type": "object",
"properties": {
"windows": {
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"certificateSubjectName": { "type": "string" },
"timestampServer": { "type": "string" }
}
},
"macos": {
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"identity": { "type": "string" },
"hardenedRuntime": { "type": "boolean", "default": true },
"notarize": { "type": "boolean" }
}
}
}
},
"autoUpdate": {
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"provider": { "enum": ["github", "s3", "generic", "spaces", "keygen"] },
"channel": { "enum": ["latest", "beta", "alpha"] }
}
},
"generateCIScripts": {
"type": "boolean",
"description": "Generate CI/CD build scripts"
}
},
"required": ["projectPath", "appInfo", "platforms"]
}
Output Schema
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"configPath": { "type": "string", "description": "Path to generated config file" },
"config": { "type": "object", "description": "Generated electron-builder configuration" },
"ciScripts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"description": { "type": "string" }
}
}
},
"warnings": { "type": "array", "items": { "type": "string" } },
"recommendations": { "type": "array", "items": { "type": "string" } }
},
"required": ["success"]
}
Usage Instructions
- Analyze project structure: Examine package.json, existing build configs, and project layout
- Determine build requirements: Based on target platforms and distribution needs
- Generate configuration: Create electron-builder.yml with all necessary settings
- Validate configuration: Check for common issues and missing dependencies
- Generate CI scripts: If requested, create GitHub Actions or other CI workflows
Configuration Templates
Basic Multi-Platform Build
appId: com.example.myapp
productName: MyApp
directories:
buildResources: build
output: dist
files:
- "**/*"
- "!**/*.{md,txt}"
- "!**/node_modules/*/{CHANGELOG.md,README.md,readme.md}"
win:
target:
- target: nsis
arch: [x64, ia32]
icon: build/icon.ico
mac:
target:
- target: dmg
arch: [x64, arm64]
icon: build/icon.icns
hardenedRuntime: true
gatekeeperAssess: false
linux:
target:
- target: AppImage
arch: [x64]
- target: deb
arch: [x64]
icon: build/icons
category: Utility
With Code Signing and Notarization
win:
sign: ./scripts/sign.js
signingHashAlgorithms: [sha256]
signDlls: true
mac:
identity: "Developer ID Application: Company Name (TEAMID)"
hardenedRuntime: true
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
afterSign: scripts/notarize.js
With Auto-Update
publish:
provider: github
owner: your-org
repo: your-repo
releaseType: release
nsis:
oneClick: false
perMachine: true
allowToChangeInstallationDirectory: true
differentialPackage: true
Best Practices
- Always use
hardenedRuntime: truefor macOS to pass notarization - Enable
signingHashAlgorithms: [sha256]for modern Windows compatibility - Use
differentialPackage: truefor efficient auto-updates - Configure
filespatterns to exclude unnecessary files and reduce bundle size - Set up separate channels (latest, beta, alpha) for staged rollouts
- Store signing credentials in CI secrets, never in config files
Community References
- electron-builder Documentation
- Electron Code Signing Guide
- electron-scaffold skill
- Electron Distribution & Auto-Update
Related Skills
electron-main-preload-generator- Generate secure main process and preload scriptselectron-auto-updater-setup- Configure electron-updater with advanced featureswindows-authenticode-signer- Windows code signing with signtoolmacos-codesign-workflow- macOS code signing and notarization
Related Agents
electron-architect- Expert in Electron architecture and best practicesdesktop-ci-architect- CI/CD pipeline design for desktop builds
04 同仓库更多 Skills
xhs-pharma-social-listening
Run evidence-disciplined Xiaohongshu social listening for foreign pharma employee pain points. Use when the user asks to collect and analyze notes/comments about pharma companies, aliases, roles, compliance, medical affairs, or AI topics, then produce a cited and scored sampled-insight report. Includes independent-evidence counting, MediaCrawler batch collection, and CAPTCHA/461 fallback to Agent Reach/OpenCLI.
healthcare-phi-compliance
Protected Health Information (PHI) and Personally Identifiable Information (PII) compliance patterns for healthcare applications. Covers data classification, access control, audit trails, encryption, and common leak vectors. Use when code touches PHI or PII in a healthcare system, or when auditing access control, audit trails, or leak vectors.
healthcare-eval-harness
Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures. Use when a healthcare deployment must be gated on patient-safety tests for CDSS accuracy, PHI exposure, and workflow integrity.
healthcare-emr-patterns
EMR/EHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry. Use when building EMR or EHR features such as encounter workflows, prescription generation, or clinical data entry UI.
healthcare-cdss-patterns
Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows. Use when building clinical decision support — drug interaction checks, dose validation, clinical scoring, or alert severity.
dxy-task-clarify
用户的请求含糊、缺背景、缺资料说明、缺读者或用途时使用。先用少量带选项的追问把任务问清楚,写成任务卡,用户确认后再执行。尤其适用于医生、科研人员和药企各岗位的工作,例如「帮我分析一下这些数据」「帮我准备明天的拜访」「写个总结」「做个 PPT」「回一下这封邮件」「整理一下会议纪要」「整理一下这些文献」「帮我准备下周的讲课」「写个病例汇报」「帮我写个提示词」。用户说「先问我」「帮我理清需求」「我不知道怎么描述」「我不会问 AI」时也使用。用途、资料、读者都已说清的请求,纯翻译,以及写代码、改代码,不使用。