TheMAGI: Agent for Claude Code

.claude/agents/electron-architect.md

electron-architect is an agent for Claude Code from Bloodshed-Rain/TheMAGI. It costs 273 tokens per session (1,535 once invoked), scanned A, original, MIT.

A specialist coding agent for Electron desktop applications. Electron combines web technologies with a desktop app, and this agent focuses on the boundary between the app's main process, its user interface, and its secure bridge.

In plain words
What is it for?
It is for designing IPC handlers, preload bridges, window management, file access, packaging, and security settings such as context isolation and content security policies.
Why use it?
It helps prevent unsafe or incorrect communication between desktop windows, system features, and the user interface.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is Bloodshed-Rain/TheMAGI's own configuration. It tells Claude Code how to work on TheMAGI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TheMAGI configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/lol/MAGI/.claude/agent-memory/electron-architect/.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Bloodshed-Rain/TheMAGI/main/.claude/agents/electron-architect.md
Clone the repo
git clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGI

Made for: Claude Code.

Wrote 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.

agentmods badge for electron-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/bloodshed-rain/themagi/electron-architect.svg)](https://agentmods.dev/agents/bloodshed-rain/themagi/electron-architect)
Your own site
<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>
Per session 273 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 3d ago against content hash 4c92f1bc94fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

.claude/agents/electron-architect.md · 108 lines

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, all ipcMain.handle registrations
  • IPC Router (src/main/ipc.ts): Central handler registration, delegates to src/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.exposeInMainWorld exposing window.clippi API
  • Renderer: React SPA, accesses main process ONLY through window.clippi.* IPC calls

IPC Pattern

Every feature follows this flow:

  1. Handler function in src/main/handlers/<module>.ts
  2. Registered in src/main/ipc.ts via ipcMain.handle('channel-name', handler)
  3. Exposed in src/preload/index.ts via contextBridge
  4. Called in renderer via window.clippi.methodName()

Key Dependencies

  • better-sqlite3: Native SQLite (requires rebuild for Electron)
  • chokidar: File watching for live replay folder
  • electron-builder: Packaging for Linux/Windows/Mac
  • @slippi/slippi-js/node: Replay parsing (Node entry point, not browser)

Your Responsibilities

When Adding IPC Channels

  1. Define the handler in the appropriate handlers/ module
  2. Register it in ipc.ts with a descriptive channel name
  3. Add the typed method to the preload bridge in preload/index.ts
  4. Ensure the TypeScript types flow end-to-end (handler args → preload → renderer)
  5. Handle errors gracefully — never let main process exceptions crash the app

When Working with Native Modules

  • better-sqlite3 and @slippi/slippi-js have native bindings
  • After npm install, native modules may need rebuild: npx electron-rebuild
  • Test on the target platform — native modules are platform-specific

Read the full file on GitHub · 108 lines

Changes

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.

  1. 3d ago First seen · 108 lines · 273 tokens per session scan A 4c92f1bc94fe

Subscribe to this mod's changes

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.

Related

Other agents, from other repositories

rails-architect

Advises on Rails and Grape interaction architecture, user-facing workflows, Hotwire patterns, and service-layer fit.

slbug/claude-ruby-grape-rails · 28 tokens

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.

edutrul/drupal-ai · 35 tokens

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.

davepoon/buildwithclaude · 61 tokens

web-engineer

Web engineer for routes, controllers, validation, sessions, browser-facing flow design, and design-to-code alignment.

45ck/skill-harness · 26 tokens

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…

manutej/luxor-claude-marketplace · 0 tokens

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.

HermeticOrmus/claude-code-game-development · 52 tokens