
Electron Best Practices
This is a comprehensive reference for building production Electron apps with React, covering the security fundamentals that keep XSS from escalating to remote code execution. It walks through context isolation, sandbox mode, and type-safe IPC patterns using the invoke/handle model, plus practical guidance on electron-vite for dev tooling and Electron Forge for packaging with code signing. The anti-patterns table alone is worth having on hand, calling out common mistakes like exposing ipcRenderer directly or skipping CSP headers. If you're generating Electron code or setting up a desktop app project, this gives you the modern security-first architecture and avoids the legacy patterns that still float around in outdated tutorials.
- skills.sh installs
- 863
- GitHub stars
- 182
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jwynia/agent-skills --skill electron-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Electron + React Best Practices
Guide AI agents in building secure, production-ready Electron applications with React. This skill provides security patterns, type-safe IPC communication, project setup guidance, packaging and code signing workflows, and tools for analysis, scaffolding, and type generation.
When to Use This Skill
Use this skill when:
- Generating Electron main, preload, or renderer process code
- Configuring electron-vite or Electron Forge
- Setting up IPC communication between processes
- Implementing security patterns (contextBridge, sandbox, CSP)
- Packaging, signing, and notarizing desktop applications
- Testing Electron apps with Playwright
- Designing multi-window architectures
Do NOT use this skill when:
- Building Tauri apps (different paradigm, use Tauri-specific guidance)
- Building pure web apps with no desktop requirements
- Targeting Electron versions below 20 (security defaults differ)
- Using non-React renderer frameworks (use framework-specific skills)
Core Principles
1. Security First Architecture
Sponsors
Details
- Repository
- github.com/jwynia/agent-skills
- Categories
- Frontend Development, Testing & QA, Security, Documentation, AI & Agent Building
- First seen
- May 16, 2026
More from jwynia/agent-skills
All 118- Web Search780
- Fact Check771
- Worldbuilding753
- Docx Generator736
- Joke Engineering727
- Summarization719
- Story Analysis699
- Dialogue692
- Novel Revision691
- Story Idea Generator679
- Story Sense659
- System Design656
- Systemic Worldbuilding640
- Skill Builder630
- Character Arc629
- Story Collaborator620
- Typescript Best Practices616
- Task Decomposition599
- Interactive Fiction587
- Musical Dna564
- Prose Style564
- Brainstorming547
- Pptx Generator543
- Good Thinking528