Agent skill
electron-builder-config
Generate and validate electron-builder configuration for multi-platform desktop builds with code signing, auto-update, and platform-specific packaging
Install this agent skill to your Project
npx add-skill https://github.com/a5c-ai/babysitter/tree/main/library/specializations/desktop-development/skills/electron-builder-config
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-tools
Central utility skill for GSD operations. Provides config parsing, slug generation, timestamps, path operations, and orchestrates calls to other specialized skills. Acts as the unified entry point that the original gsd-tools.cjs provided via its lib/ modules (commands, config, core, init).
model-profile-resolution
Resolve model profile (quality/balanced/budget) at orchestration start and map agents to specific models. Enables cost/quality tradeoffs by selecting appropriate AI models for each agent role.
verification-suite
Plan structure validation, phase completeness checks, reference integrity verification, and artifact existence confirmation. Provides the structured verification layer ensuring GSD artifacts are well-formed and complete.
state-management
STATE.md reading, writing, and field-level updates. Provides cross-session state persistence via .planning/STATE.md with structured fields for current task, completed phases, blockers, decisions, and quick tasks.
git-integration
Git commit patterns, formats, and conventions for GSD methodology. Provides atomic commits per task, structured commit messages, planning file commits, branch management, and milestone tag operations.
frontmatter-parsing
YAML frontmatter parsing and manipulation for .planning/ documents. Provides read, write, update, query, and validation operations on frontmatter blocks in GSD markdown artifacts.
Didn't find tool you were looking for?