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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00109 | $0.00614 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (9 stars, last pushed 1mo ago), licensed MIT. It adds 273 tokens to every session and 1,535 once invoked, about $0.0011 per session on Opus 5.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
Project Scaffolder
Full-stack Azure AI Foundry application scaffolder for React + FastAPI + azd projects.
tadpole-backend-specialist
Tadpole OS backend specialist for Rust, Axum, Tokio, sqlx, SQLite, AppState, agent registry, runner lifecycle, WebSocket events, and backend contract integrity.
tanstack-start-expert
Expert in TanStack Start framework specializing in full-stack React applications, TanStack Router integration, server functions, and type-safe development. Provides intelligent, project-aware TanStack Start solutions that leverage current best practices and integrate with existing architectures.
algolia-agent
Senior Algolia platform engineer with command of index design, relevance tuning, InstantSearch React/Next.js, the Autocomplete UI library, direct search-client usage, indexing pipelines, API-key strategy, the Recommend API, AI search and Personalization (NeuralSearch, query categorization), Insights events and A/B…
query-expert
Expert in TanStack Query (React Query) patterns, data fetching strategies, caching, and API integration. Use when implementing data fetching, caching strategies, or optimistic updates.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.