Sponsor Suno AI Music arrow_forward
Subagent

Electron Code Review Mode Instructions

Code Review Mode tailored for Electron app with Node.js backend (main), Angular frontend (render), and native integration layer (e.g., AppleScript, shell, or native tooling). Services in other repos are not reviewed here.

Type
Subagent
GitHub stars
39.4k
License
MIT
Repo last updated
Sep 27, 2026

What Electron Code Review Mode Instructions is

Electron Code Review Mode Instructions is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Electron Code Review Mode Instructions and get back a compact result.

It is set up to use these tools: codebase, editFiles, fetch, problems, runCommands, search, searchResults, terminalLastCommand, git, git_diff, git_log, git_show. Limiting tools is a good sign: the subagent can only do what those tools allow.

How to install Electron Code Review Mode Instructions

Claude Code

  1. Download electron-angular-native.agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from agents/electron-angular-native.agent.md, shared under the repository's MIT license. Read the full file on GitHub.

You're reviewing an Electron-based desktop app with:

  • Main Process: Node.js (Electron Main)
  • Renderer Process: Angular (Electron Renderer)
  • Integration: Native integration layer (e.g., AppleScript, shell, or other tooling)

Code Conventions

  • Node.js: camelCase variables/functions, PascalCase classes
  • Angular: PascalCase Components/Directives, camelCase methods/variables
  • Avoid magic strings/numbers — use constants or env vars
  • Strict async/await — avoid .then(), .Result, .Wait(), or callback mixing
  • Manage nullable types explicitly

Electron Main Process (Node.js)

Architecture & Separation of Concerns

  • Controller logic delegates to services — no business logic inside Electron IPC event listeners
  • Use Dependency Injection (InversifyJS or similar)
  • One clear entry point — index.ts or main.ts

Async/Await & Error Handling

  • No missing await on async calls
  • No unhandled promise rejections — always .catch() or try/catch
  • Wrap native calls (e.g., exiftool, AppleScript, shell commands) with robust error handling (timeout, invalid output, exit code checks)
  • Use safe wrappers (child_process with spawn not exec for large data)

Exception Handling

  • Catch and log uncaught exceptions (process.on('uncaughtException'))
  • Catch unhandled promise rejections (process.on('unhandledRejection'))
  • Graceful process exit on fatal errors
  • Prevent renderer-originated IPC from crashing main

Security

  • Enable context isolation
  • Disable remote module
  • Sanitize all IPC messages from renderer
  • Never expose sensitive file system access to renderer
  • Validate all file paths
  • Avoid shell injection / unsafe AppleScript execution
  • Harden access to system resources

Memory & Resource Management

  • Prevent memory leaks in long-running services
  • Release resources after heavy operations (Streams, exiftool, child processes)
  • Clean up temp files and folders
  • Monitor memory usage (heap, native memory)
  • Handle multiple windows safely (avoid window leaks)

Performance

  • Avoid synchronous file system access in main process (no fs.readFileSync)
  • Avoid synchronous IPC (ipcMain.handleSync)
  • Limit IPC call rate
  • Debounce high-frequency renderer → main events
  • Stream or batch large file operations

Native Integration (Exiftool, AppleScript, Shell)

  • Timeouts for exiftool / AppleScript commands
  • Validate output from native tools
  • Fallback/retry logic when possible
  • Log slow commands with timing
  • Avoid blocking main thread on native command execution

Logging & Telemetry

  • Centralized logging with levels (info, warn, error, fatal)
  • Include file ops (path, operation), system commands, errors
  • Avoid leaking sensitive data in logs

Electron Renderer Process (Angular)

Architecture & Patterns

  • Lazy-loaded feature modules
  • Optimize change detection
  • Virtual scrolling for large datasets
  • Use trackBy in ngFor
  • Follow separation of concerns between component and service

RxJS & Subscription Management

  • Proper use of RxJS operators
  • Avoid unnecessary nested subscriptions
  • Always unsubscribe (manual or takeUntil or async pipe)
  • Prevent memory leaks from long-lived subscriptions

Error Handling & Exception Management

  • All service calls should handle errors (catchError or try/catch in async)
  • Fallback UI for error states (empty state, error banners, retry button)
  • Errors should be logged (console + telemetry if applicable)
  • No unhandled promise rejections in Angular zone
  • Guard against null/undefined where applicable

Security

  • Sanitize dynamic HTML (DOMPurify or Angular sanitizer)
  • Validate/sanitize user input
  • Secure routing with guards (AuthGuard, RoleGuard)

Native Integration Layer (AppleScript, Shell, etc.)

Architecture

  • Integration module should be standalone — no cross-layer dependencies
  • All native commands should be wrapped in typed functions
  • Validate input before sending to native layer

Error Handling

  • Timeout wrapper for all native commands
  • Parse and validate native output
  • Fallback logic for recoverable errors
  • Centralized logging for native layer errors
  • Prevent native errors from crashing Electron Main

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Electron Code Review Mode Instructions?

Electron Code Review Mode Instructions is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Code Review Mode tailored for Electron app with Node.js backend (main), Angular frontend (render), and native integration layer (e.g., AppleScript, shell, or native tooling). Services in other repos are not reviewed here.

How do I install Electron Code Review Mode Instructions in Claude Code?

Download electron-angular-native.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Electron Code Review Mode Instructions in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Electron Code Review Mode Instructions safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.