Skip to main content
electron-auto-updater-setup Configure electron-updater with code signing verification, delta updates, staged rollouts, and multiple update channels for Electron applications
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/a5c-ai/babysitter --skill electron-auto-updater-setup명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
name electron-auto-updater-setup description Configure electron-updater with code signing verification, delta updates, staged rollouts, and multiple update channels for Electron applications allowed-tools Read, Write, Edit, Bash, Glob, Grep tags ["electron","desktop","auto-update","deployment","releases"] graph {"domains":["domain:software-engineering"],"specializations":["specialization:desktop-development"],"skillAreas":["skill-area:desktop-ui-frameworks","skill-area:deployment-infrastructure-management"],"roles":["role:desktop-developer","role:fullstack-engineer"],"workflows":["workflow:feature-development","workflow:release-management"]}
electron-auto-updater-setup
Configure electron-updater for Electron applications with advanced features including code signing verification, delta updates, staged rollouts, and multiple release channels. This skill creates a complete auto-update infrastructure.
Capabilities
Configure electron-updater with multiple providers (GitHub, S3, Generic, Spaces)
Set up staged rollouts with percentage-based distribution
Configure delta (differential) updates for efficient bandwidth usage
Implement multiple release channels (stable, beta, alpha)
Set up code signing verification for update packages
Create update notification UI components
Configure silent updates vs. interactive updates
Implement rollback mechanisms
Input Schema {
"type" : "object" ,
"properties" : {
"projectPath" : {
"type" : "string" ,
"description" : "Path to the Electron project root"
} ,
"provider" : {
"type" : "object" ,
"properties" : {
"type" : { "enum" : [ "github" , "s3" , "generic" , "spaces" , "keygen" ] } ,
"config" : {
"type" : "object" ,
"description" : "Provider-specific configuration"
}
} ,
"required" : [ "type" ]
} ,
"channels" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"name" : { "type" : "string" } ,
"default" : { "type" : "boolean" } ,
"allowDowngrade" : { "type" : "boolean" }
}
} ,
"default" : [ { "name" : "latest" , "default" : true } ]
} ,
"features" : {
"type" : "object" ,
"properties" : {
"deltaUpdates" : { "type" : "boolean" , "default" : true } ,
"stagedRollout" : { "type" : "boolean" , "default" : false } ,
"silentUpdate" : { "type" : "boolean" , "default" : false } ,
"autoInstallOnQuit" : { "type" : "boolean" , "default" : true } ,
"forceDevUpdateConfig" : { "type" : "boolean" , "default" : false }
}
} ,
"stagedRollout" : {
"type" : "object" ,
"properties" : {
"enabled" : { "type" : "boolean" } ,
"initialPercentage" : { "type" : "number" , "default" : 10 } ,
"incrementStep" : { "type" : "number" , "default" : 20 } ,
"incrementInterval" : { "type" : "string" , "default" : "24h" }
}
} ,
"ui" : {
"type" : "object" ,
"properties" : {
"generateComponents" : { "type" : "boolean" , "default" : true } ,
"framework" : { "enum" : [ "react" , "vue" , "svelte" , "vanilla" ] } ,
"notifications" : { "type" : "boolean" , "default" : true }
}
}
} ,
"required" : [ "projectPath" , "provider" ]
}
Output Schema {
"type" : "object" ,
"properties" : {
"success" : { "type" : "boolean" } ,
"files" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"path" : { "type" : "string" } ,
"type" : { "enum" : [ "config" , "main" , "ui" , "ipc" , "utils" ] }
}
}
} ,
"electronBuilderConfig" : {
"type" : "object" ,
"description" : "electron-builder publish configuration to merge"
} ,
"envVariables" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"name" : { "type" : "string" } ,
"description" : { "type" : "string" } ,
"required" : { "type" : "boolean" }
}
}
} ,
"testCommands" : {
"type" : "array" ,
"items" : { "type" : "string" }
}
} ,
"required" : [ "success" , "files" ]
}
Generated File Structure src/
main/
updater/
auto-updater.ts # Main updater logic
update-channels.ts # Channel management
staged-rollout.ts # Staged rollout logic
delta-updates.ts # Delta update handling
preload/
updater-api.ts # Exposed updater API
renderer/
components/
UpdateNotification/ # UI components
UpdateNotification.tsx
UpdateProgress.tsx
ReleaseNotes.tsx
shared/
update-types.ts # TypeScript types
Code Templates
Main Auto-Updater Module import { autoUpdater, UpdateInfo } from 'electron-updater' ;
import { app, BrowserWindow , ipcMain } from 'electron' ;
import log from 'electron-log' ;
autoUpdater.logger = log;
autoUpdater.logger .transports .file .level = 'info' ;
autoUpdater.autoDownload = false ;
autoUpdater.autoInstallOnAppQuit = true ;
export class AppUpdater {
private mainWindow : BrowserWindow | null = null ;
constructor (mainWindow : BrowserWindow ) {
this .mainWindow = mainWindow;
this .setupEventHandlers ();
this .setupIpcHandlers ();
}
private setupEventHandlers ( ) {
autoUpdater.on ('checking-for-update' , () => {
this .sendToRenderer ('update-status' , { status : 'checking' });
});
autoUpdater.on ('update-available' , (info : UpdateInfo ) => {
this .sendToRenderer ('update-status' , {
status : 'available' ,
version : info.version ,
releaseNotes : info.releaseNotes ,
releaseDate : info.releaseDate ,
});
});
autoUpdater.on ('update-not-available' , () => {
this .sendToRenderer ('update-status' , { status : 'not-available' });
});
autoUpdater.on ('download-progress' , (progress ) => {
this .sendToRenderer ('update-progress' , {
percent : progress.percent ,
bytesPerSecond : progress.bytesPerSecond ,
transferred : progress.transferred ,
total : progress.total ,
});
});
autoUpdater.on ('update-downloaded' , (info : UpdateInfo ) => {
this .sendToRenderer ('update-status' , {
status : 'downloaded' ,
version : info.version ,
});
});
autoUpdater.on ('error' , (error ) => {
this .sendToRenderer ('update-status' , {
status : 'error' ,
error : error.message ,
});
});
}
private setupIpcHandlers ( ) {
ipcMain.handle ('updater:check' , async () => {
return autoUpdater.checkForUpdates ();
});
ipcMain.handle ('updater:download' , async () => {
return autoUpdater.downloadUpdate ();
});
ipcMain.handle ('updater:install' , () => {
autoUpdater.quitAndInstall (false , true );
});
ipcMain.handle ('updater:set-channel' , async (_, channel : string ) => {
autoUpdater.channel = channel;
return autoUpdater.checkForUpdates ();
});
}
private sendToRenderer (channel : string , data : unknown ) {
this .mainWindow ?.webContents .send (channel, data);
}
async checkForUpdates ( ) {
return autoUpdater.checkForUpdates ();
}
}
Staged Rollout Implementation import { machineIdSync } from 'node-machine-id' ;
import crypto from 'crypto' ;
export class StagedRollout {
private machineId : string ;
private rolloutPercentage : number ;
constructor ( ) {
this .machineId = machineIdSync ();
this .rolloutPercentage = 100 ;
}
shouldReceiveUpdate (version : string , rolloutPercentage : number ): boolean {
const hash = crypto
.createHash ('sha256' )
.update (`${this .machineId} :${version} ` )
.digest ('hex' );
const hashNumber = parseInt (hash.substring (0 , 8 ), 16 );
const bucket = (hashNumber / 0xffffffff ) * 100 ;
return bucket < rolloutPercentage;
}
async fetchRolloutConfig (updateServerUrl : string , version : string ) {
try {
const response = await fetch (
`${updateServerUrl} /rollout/${version} `
);
const config = await response.json ();
return config.percentage || 100 ;
} catch {
return 100 ;
}
}
}
Multi-Channel Support import { autoUpdater } from 'electron-updater' ;
import Store from 'electron-store' ;
const store = new Store ();
export const UPDATE_CHANNELS = ['stable' , 'beta' , 'alpha' ] as const ;
export type UpdateChannel = typeof UPDATE_CHANNELS [number ];
export function getUpdateChannel ( ): UpdateChannel {
return store.get ('updateChannel' , 'stable' ) as UpdateChannel ;
}
export function setUpdateChannel (channel : UpdateChannel ) {
if (!UPDATE_CHANNELS .includes (channel)) {
throw new Error (`Invalid channel: ${channel} ` );
}
store.set ('updateChannel' , channel);
autoUpdater.channel = channel;
autoUpdater.checkForUpdates ();
}
export function initializeUpdateChannel ( ) {
const channel = getUpdateChannel ();
autoUpdater.channel = channel;
autoUpdater.allowDowngrade = channel !== 'stable' ;
}
Update UI Component (React) import React , { useEffect, useState } from 'react' ;
interface UpdateStatus {
status : 'checking' | 'available' | 'not-available' | 'downloading' | 'downloaded' | 'error' ;
version ?: string ;
releaseNotes ?: string ;
error ?: string ;
}
interface UpdateProgress {
percent : number ;
bytesPerSecond : number ;
transferred : number ;
total : number ;
}
export function UpdateNotification ( ) {
const [status, setStatus] = useState<UpdateStatus | null >(null );
const [progress, setProgress] = useState<UpdateProgress | null >(null );
useEffect (() => {
const unsubStatus = window .electronAPI .on ('update-status' , setStatus);
const unsubProgress = window .electronAPI .on ('update-progress' , setProgress);
return () => {
unsubStatus ();
unsubProgress ();
};
}, []);
const handleDownload = ( ) => {
window .electronAPI .invoke ('updater:download' );
};
const handleInstall = ( ) => {
window .electronAPI .invoke ('updater:install' );
};
if (!status || status.status === 'not-available' ) return null ;
return (
<div className ="update-notification" >
{status.status === 'available' && (
<div className ="update-available" >
<p > Version {status.version} is available!</p >
<button onClick ={handleDownload} > Download</button >
</div >
)}
{status.status === 'downloading' && progress && (
<div className ="update-progress" >
<p > Downloading update...</p >
<progress value ={progress.percent} max ={100} />
<span > {Math.round(progress.percent)}%</span >
</div >
)}
{status.status === 'downloaded' && (
<div className ="update-ready" >
<p > Update ready to install!</p >
<button onClick ={handleInstall} > Restart & Install</button >
</div >
)}
{status.status === 'error' && (
Update error: {status.error}
)}
);
}
Provider Configurations
GitHub Releases
publish:
provider: github
owner: your-org
repo: your-repo
releaseType: release
private: false
Amazon S3 publish:
provider: s3
bucket: your-bucket
region: us-east-1
acl: public-read
path: /releases/${os}/${arch}
Generic Server publish:
provider: generic
url: https://updates.example.com/releases
channel: latest
DigitalOcean Spaces publish:
provider: spaces
name: your-space
region: nyc3
Environment Variables Variable Description Required GH_TOKENGitHub personal access token For GitHub provider AWS_ACCESS_KEY_IDAWS access key For S3 provider AWS_SECRET_ACCESS_KEYAWS secret key For S3 provider DO_SPACES_KEYDigitalOcean Spaces key For Spaces provider DO_SPACES_SECRETDigitalOcean Spaces secret For Spaces provider
Testing Auto-Updates
DEBUG=electron-updater npm run dev
ELECTRON_FORCE_DEV_UPDATE_CONFIG=true npm run dev
npm run build -- --publish never
Best Practices
Always sign updates - Verify code signatures before installing
Use delta updates - Reduce bandwidth for large applications
Implement staged rollouts - Catch issues before full deployment
Provide release notes - Users appreciate knowing what changed
Test rollback scenarios - Ensure users can recover from bad updates
Monitor update analytics - Track adoption rates and failures
Community References
Related Skills
electron-builder-config - Build configuration
electron-main-preload-generator - Main/preload scripts
sentry-desktop-setup - Crash reporting for update issues
Related Agents
electron-architect - Electron best practices
release-manager - Release coordination
<div className ="update-error" >
<p >
</p >
</div >
</div >