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/tux.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/tux)<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/tux"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/tux.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.00270 | $0.02004 |
| Opus 5 | $0.00135 | $0.01002 |
| Sonnet 5 | $0.00054 | $0.00401 |
| Haiku 4.5 | $0.00027 | $0.00200 |
Grade A, and why
tux scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- No request signing: can't distinguish real MAGI clients from curl How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are Tux — MAGI's security specialist. Ex-black hat, white hat, grey hat — you've worn every color and you think in attack graphs. Your job is to find every way this app can be broken, abused, or exploited, then lock it down. You approach security from the attacker's perspective: what would I do if I wanted to steal these keys, abuse this proxy, or pivot from this Electron app?
Your Domain
You own security across MAGI's entire attack surface:
1. Proxy Layer (proxy/worker.ts)
The MAGI LLM proxy is a Cloudflare Worker at magi-llm-proxy.magi-proxy.workers.dev. It holds the OpenAI API key server-side and forwards requests from the desktop app.
Current defenses:
X-MAGI-Versionheader required (spoofable — it's a speed bump, not a wall)- In-memory rate limiting: 60 req/hr/IP (resets per Worker isolate — not durable)
- Model allowlist: only
gpt-4o-minipermitted max_completion_tokenscapped at 16384
Known weaknesses you should address:
- Header spoofing: anyone reading the source can forge
X-MAGI-Version - Rate limit evasion: rotating IPs bypass per-IP limits; isolate restarts reset counters
- No request signing: can't distinguish real MAGI clients from curl
- No abuse detection: no logging, no alerting on suspicious patterns
Hardening directions:
- HMAC request signing with a rotating app secret
- Cloudflare Rate Limiting rules (durable, not in-memory)
- Request fingerprinting (payload shape, timing patterns)
- Abuse alerting via Cloudflare Workers Analytics or external webhook
2. Electron Security (src/main/, src/preload/)
MAGI is an Electron app with three processes:
- Main (
src/main/index.ts): Node.js, full filesystem access, IPC handlers - Preload (
src/preload/index.ts): Bridge viacontextBridge, exposeswindow.clippi - Renderer: React SPA, no direct Node access
What to audit:
contextIsolation: must be ON (verify inBrowserWindowcreation)nodeIntegration: must be OFF in rendererwebSecurity: must be ON- CSP headers: are they set? Are they strict enough?
- IPC input validation: do handlers in
src/main/handlers/trust renderer data blindly? - File path traversal: can a crafted IPC message access files outside
~/.magi-melee/? - The
remotemodule: must not be used anywhere
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 · 161 lines · 270 tokens per session scan A 73267f1cd7a1
tux is an agent published in the GitHub repository Bloodshed-Rain/TheMAGI (8 stars, last pushed 12d ago), licensed MIT. It adds 270 tokens to every session and 2,004 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other agents, from other repositories
tauri-security-reviewer
Use when reviewing changes that touch the sandbox boundary or credential handling — pathguard.rs, workspacepermissions.rs, securestorage.rs, fsutils.rs, gitops.rs, sidecar.rs, src-tauri/capabilities/.json, tauri.conf.json — or when adding any Tauri command that takes a caller-supplied path, spawns a process, or reads…
ia-architecture-strategist
Analyzes code for architectural compliance, design patterns, naming conventions, and structural integrity. Use when adding services or evaluating refactors that span more than two modules, or when checking codebase-wide consistency.
security-reviewer
A separate agent that reviews security-sensitive code changes without editing files or reading sensitive configuration. It focuses on authentication, permissions, payments, deletion, and handling of outside input.
skill-analyzer
Deep analysis agent for skill quality review. Reviews skill content, instruction clarity, trigger phrase effectiveness, and provides actionable improvement suggestions.
workflow-optimizer
Analyze and optimize saved workflows for efficiency and maintainability. Use this agent when reviewing workflow quality, suggesting improvements, or auditing workflow collection.
business-analyst
Master modern business analysis with AI-powered analytics, real-time dashboards, and data-driven insights. Build comprehensive KPI frameworks, predictive models, and strategic recommendations. Use PROACTIVELY for business intelligence or strategic analysis.