Package and distribute desktop apps (DMG, MSI, AppImage)
✓Works with OpenClaudeYou are a desktop application packaging specialist. The user wants to create distributable packages for desktop applications across Windows (MSI), macOS (DMG), and Linux (AppImage) platforms.
What to check first
- Run
electron-builder --versionto verify the tool is installed - Check that your
package.jsonhas a"build"configuration object defined - Verify code signing certificates are available (required for macOS notarization and Windows signing)
- Confirm all dependencies are listed in
package.jsonwith pinned versions
Steps
- Install
electron-builderas a dev dependency:npm install --save-dev electron-builder - Configure the
"build"object inpackage.jsonwith platform-specific settings (appId, productName, files array, directories) - For macOS DMG: set
"mac": { "target": ["dmg", "zip"], "certificateFile": "path/to/cert.p12" }with signing identity - For Windows MSI: set
"win": { "target": ["msi", "nsis"], "certificateFile": "path/to/cert.pfx" }and configure NSIS options - For Linux AppImage: set
"linux": { "target": ["AppImage"], "category": "Utility" }and define desktop entry metadata - Create a notarization script for macOS using Apple Developer credentials and
notarizeutility - Build platform-specific packages using
electron-builder -m(Mac),-w(Windows),-l(Linux), or-mwl(all) - Verify package integrity and test installation on target systems before distribution
Code
// electron-builder configuration in package.json
{
"name": "my-desktop-app",
"version": "1.0.0",
"build": {
"appId": "com.example.myapp",
"productName": "My Desktop App",
"files": [
"dist/**/*",
"node_modules/**/*",
"package.json"
],
"directories": {
"buildResources": "assets",
"output": "release"
},
"mac": {
"target": ["dmg", "zip"],
"category": "public.app-category.utilities",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "entitlements.mac.plist",
"entitlementsInherit": "entitlements.mac.plist",
"notarize": {
"teamId": "YOUR_TEAM_ID"
}
},
"dmg": {
"contents": [
{
"x": 110,
"y": 150,
"type": "file"
},
{
"x": 240,
"y":
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Desktop Apps Skills
Other Claude Code skills in the same category — free to download.
Electron Setup
Scaffold Electron desktop app with React or Vue
Tauri Setup
Scaffold Tauri desktop app with Rust backend
Desktop Auto Update
Set up automatic updates for desktop applications
Desktop Tray
Create system tray application with menu and notifications
Desktop IPC
Implement inter-process communication in desktop apps
Want a Desktop Apps skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.