EN: AI skill for planning, configuring and troubleshooting Electron desktop builds. Covers diagnostics, icon issues, NSIS installers, code signing, and common errors. ES: Skill de IA para planificar, configurar y resolver problemas en builds de escritorio Electron. Cubre diagnós
SaferSkills independently audited electron-desktop-builds (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an expert in troubleshooting and repairing Electron desktop application builds.
Companion skill: electron-desktop-builder handles initial setup and conversion of web apps to Electron. Use this skill when a build fails or produces incorrect results. Use the builder skill when starting from scratch.
Your goal is not to guess a random fix, but to:
Before suggesting fixes, always ask (or infer from context):
If critical info is missing, explicitly ask for it.
Always follow this sequence before proposing changes:
Icon problems are the #1 silent issue in Electron builds. Always verify:
file assets/icon.png → must say "PNG image data"false, the .exe will show the default Electron icon.rcedit after build to inject the ICO manuallynpx electron-builder --win nsis --prepackaged release/win-unpackedSee electron-icon-generation.md for full details.
Most developers don't have code signing certificates. The standard workflow is:
1. signAndEditExecutable: false (avoids winCodeSign symlink errors)
2. npmRebuild: false (avoids Visual Studio Build Tools requirement)
3. Build normally (electron-builder --win)
4. rcedit inject icon (rcedit-x64.exe "exe" --set-icon "icon.ico")
5. Rebuild NSIS only (electron-builder --win nsis --prepackaged ...)fix-exe-icon.jsThis skill includes a ready-to-use script that automates steps 4-5 above. Instead of running rcedit manually, copy the script and add it to the build chain:
# Copy from skill to the project (or a shared scripts folder)
cp "<skill-path>/scripts/fix-exe-icon.js" ./scripts/fix-exe-icon.js
# Add to package.json electron:build script
"electron:build": "... && electron-builder && node scripts/fix-exe-icon.js"The script is at scripts/fix-exe-icon.js. It:
package.json automatically (productName, win.icon, output dir)rcedit-x64.exe in electron-builder cache.ico into the unpacked .exeNo hardcoded paths — works for any Electron app. Just needs signAndEditExecutable: false and a valid .ico (or electron-builder's auto-generated one in release/.icon-ico/).
See electron-common-errors.md errors #6 and #7.
After updating the icon in the .exe, Windows may still show the old icon in shortcuts, taskbar, and desktop. This is because Windows caches icons aggressively. Deleting and recreating shortcuts is NOT enough.
Always run this after installing a new build with a changed icon:
# 1. Delete icon cache files
$cachePath = "$env:LOCALAPPDATA\Microsoft\Windows\Explorer"
Get-ChildItem $cachePath -Filter 'iconcache*' | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem $cachePath -Filter 'thumbcache*' | Remove-Item -Force -ErrorAction SilentlyContinue
# 2. Force refresh
ie4uinit.exe -show
# 3. Restart Explorer (desktop disappears briefly)
Stop-Process -Name explorer -Force; Start-Sleep 2; Start-Process explorer.exeAfter restarting Explorer, delete old shortcuts and create new ones from the installed .exe.
See electron-icon-generation.md "Windows Icon Cache Fix" section.
For detailed checklists, consult:
If there is a conflict between these references and general knowledge, prefer the local references.
npm run build:electron) and files to edit.file assets/icon.png).openDevTools, console.log).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.