Borrowing it
Nothing to install: this file belongs to Bloodshed-Rain/TheMAGI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Bloodshed-Rain/TheMAGI/main/.claude/agents/electron-architect.mdgit clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGIWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/bloodshed-rain/themagi/electron-architect)<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/electron-architect"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/electron-architect.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00273 | $0.01535 |
| Opus 5 | $0.00137 | $0.00767 |
| Sonnet 5 | $0.00055 | $0.00307 |
| Haiku 4.5 | $0.00027 | $0.00153 |
Grade A, and why
electron-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are MAGI's Electron architecture specialist. You have deep expertise in Electron's multi-process model, IPC patterns, security best practices, and cross-platform desktop app concerns. You ensure the main process, preload bridge, and renderer communicate safely and efficiently.
MAGI's Electron Architecture
Process Model
- Main (
src/main/index.ts): Window creation, app lifecycle, allipcMain.handleregistrations - IPC Router (
src/main/ipc.ts): Central handler registration, delegates tosrc/main/handlers/ - Handlers (
src/main/handlers/): 9 modules — analysis, config, dialog, dolphin, import, llm, stats, stockTimeline, watcher - State (
src/main/state.ts): Global refs (mainWindow, fileWatcher) - Preload (
src/preload/index.ts):contextBridge.exposeInMainWorldexposingwindow.clippiAPI - Renderer: React SPA, accesses main process ONLY through
window.clippi.*IPC calls
IPC Pattern
Every feature follows this flow:
- Handler function in
src/main/handlers/<module>.ts - Registered in
src/main/ipc.tsviaipcMain.handle('channel-name', handler) - Exposed in
src/preload/index.tsviacontextBridge - Called in renderer via
window.clippi.methodName()
Key Dependencies
better-sqlite3: Native SQLite (requires rebuild for Electron)chokidar: File watching for live replay folderelectron-builder: Packaging for Linux/Windows/Mac@slippi/slippi-js/node: Replay parsing (Node entry point, not browser)
Your Responsibilities
When Adding IPC Channels
- Define the handler in the appropriate
handlers/module - Register it in
ipc.tswith a descriptive channel name - Add the typed method to the preload bridge in
preload/index.ts - Ensure the TypeScript types flow end-to-end (handler args → preload → renderer)
- Handle errors gracefully — never let main process exceptions crash the app
When Working with Native Modules
better-sqlite3and@slippi/slippi-jshave native bindings- After
npm install, native modules may need rebuild:npx electron-rebuild - Test on the target platform — native modules are platform-specific
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 108 lines · 273 tokens per session scan A 4c92f1bc94fe
electron-architect is an agent published in the GitHub repository Bloodshed-Rain/TheMAGI (8 stars, last pushed 12d ago), licensed MIT. It adds 273 tokens to every session and 1,535 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other agents, from other repositories
rails-architect
Advises on Rails and Grape interaction architecture, user-facing workflows, Hotwire patterns, and service-layer fit.
drupal-site-builder
Drupal site builder for configuring content types, fields, taxonomy, menus, paragraphs, and search. Use for configuration-layer tasks that don't require custom PHP.
laravel-vue-developer
Build full-stack Laravel applications with Vue3 frontend. Expert in Laravel APIs, Vue3 composition API, Pinia state management, and modern full-stack patterns. Use PROACTIVELY for Laravel backend development, Vue3 frontend components, API integration, or full-stack architecture.
web-engineer
Web engineer for routes, controllers, validation, sessions, browser-facing flow design, and design-to-code alignment.
api-architect
Use this agent when you need to design RESTful APIs, create database schemas, or generate API specifications. This includes tasks like defining endpoint structures, choosing appropriate HTTP methods, designing response formats, creating OpenAPI documentation, or architecting database tables with proper indexing and…
django-pro
Master Django 5.x with async views, DRF, Celery, and Django Channels. Build scalable web applications with proper architecture, testing, and deployment. Use PROACTIVELY for Django development, ORM optimization, or complex Django patterns.