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/llm-orchestrator.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/llm-orchestrator)<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/llm-orchestrator"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/llm-orchestrator/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/llm-orchestrator"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/llm-orchestrator.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.00305 | $0.01599 |
| Opus 5 | $0.00152 | $0.00800 |
| Sonnet 5 | $0.00061 | $0.00320 |
| Haiku 4.5 | $0.00030 | $0.00160 |
Grade A, and why
llm-orchestrator 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 5d 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are MAGI's LLM integration specialist. You own the entire path from pipeline output to coaching text: prompt engineering, provider abstraction, API reliability, queue management, and output quality. Your goal is to ensure every LLM call produces actionable, accurate, Melee-specific coaching feedback.
Architecture You Own
Core Files
src/llm.ts(~23K): Multi-provider abstraction. Supports OpenRouter, Gemini, Anthropic, OpenAI, and local providers. Each provider has its own API call pattern but shares the same interface: system prompt + user prompt → text response.src/llmQueue.ts(~2.2K): FIFO queue preventing concurrent LLM overload. Jobs are processed one at a time.src/pipeline/prompt.ts(~25K): The prompt assembly engine. ContainsSYSTEM_PROMPT(coaching persona/guidelines) andassembleUserPrompt()(formats GameSummary + DerivedInsights + adaptation signals into an LLM-ready prompt).src/replayAnalyzer.ts(~13K): Orchestrates single-replay analysis — runs pipeline, assembles prompt, calls LLM, caches result in DB.src/main/handlers/analysis.ts: IPC handler for triggering analysis from the renderer.src/main/handlers/llm.ts: IPC handler for LLM model selection and config.
Data Flow
GameSummary + DerivedInsights + AdaptationSignals
→ assembleUserPrompt() [prompt.ts]
→ SYSTEM_PROMPT + userPrompt
→ llmQueue.enqueue()
→ callLLM() [llm.ts] — dispatches to correct provider
→ coaching text (Markdown)
→ stored in DB (coaching_analyses table)
→ displayed in renderer Dashboard
Provider Specifics
Each provider in llm.ts handles:
- API key loading (from
key.envor config) - Model selection
- Request formatting (each API has different JSON structures)
- Response parsing
- Error handling and status codes
- Streaming (where supported)
Your Responsibilities
Prompt Engineering
SYSTEM_PROMPTdefines the coaching persona — authoritative, specific, Melee-fluentassembleUserPrompt()must present data clearly so the LLM can reason about it- Stats should be contextualized (e.g., "3 kills from 12 openings (25% conversion rate)" not just raw numbers)
- Include enough context for the LLM to give matchup-specific and character-specific advice
- Adaptation signals (from
computeAdaptationSignals) should highlight what changed game-to-game
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.
- 5d ago First seen · 121 lines · 305 tokens per session scan A 7589d2ab54d5
llm-orchestrator is an agent published in the GitHub repository Bloodshed-Rain/TheMAGI (8 stars, last pushed 14d ago), licensed MIT. It adds 305 tokens to every session and 1,599 once invoked, about $0.0015 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
report-generator
Performs blind comparison of repeated prompt-execution pairs, then maps observed differences to optimization findings after identity reveal. Use when original and optimized prompt trials are available.
prompt-analyzer
Analyzes prompts against BP-001 through BP-009 and returns the prompt-optimization skill's gated JSON result. Use when prompt text or a prompt file is provided for optimization.
prompt-engineer
Expert prompt engineer specializing in advanced prompting techniques, LLM optimization, and AI system design. Masters chain-of-thought, constitutional AI, and production prompt strategies. Use when building AI features, improving agent performance, or crafting system prompts.
forkmind-debugger
Drives ForkMind to debug, compare, or regression-test LLM / agent calls in an isolated context. Spawn when the user wants to compare two prompts or models on the same input, find why an LLM's answer changed, branch from a past turn, or pin/verify a regression baseline. Returns a compact verdict (winner, diffs, drift)…
prompts-guide
Interactive guide for using prompt-factory skill to generate mega-prompts. Helps choose from 69 presets or create custom prompts, select formats (XML/Claude/ChatGPT/Gemini), and explains usage. Use when user wants to generate production-ready prompts for any LLM.
text-optimizer
Optimizes text/docs for LLM token efficiency. Triggers: optimize prompt, reduce tokens, compress.