TheMAGI: Instructions file for Codex

AGENTS.md

TheMAGI AGENTS.md is an instructions file for Codex, OpenCode from Bloodshed-Rain/TheMAGI. It costs 599 tokens per session, scanned A, original, MIT.

A repository instruction document for TheMAGI, an Electron desktop application with a React user interface. It describes the code layout, development commands, style rules, and testing expectations.

In plain words
What is it for?
Use it when developing, testing, linting, formatting, or packaging TheMAGI. It covers the main process, user interface, build targets, and Vitest tests.
Why use it?
It gives a coding agent the project-specific rules it needs before editing or checking the repository. This reduces mistakes such as using the wrong command, directory, or test process.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is Bloodshed-Rain/TheMAGI's own configuration. It tells Codex and OpenCode 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 →

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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGI

Made for: Codex, OpenCode.

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 TheMAGI AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/bloodshed-rain/themagi/agents-md.svg)](https://agentmods.dev/instructions/bloodshed-rain/themagi/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/bloodshed-rain/themagi/agents-md"><img src="https://agentmods.dev/badge/instructions/bloodshed-rain/themagi/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 599 This file is loaded in full into every session.
When invoked 599 The same file — it is already loaded in full.
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.00599 $0.00599
Opus 5 $0.00300 $0.00300
Sonnet 5 $0.00120 $0.00120
Haiku 4.5 $0.00060 $0.00060

Measured 2d ago against content hash 86bb6d6f6b99, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

TheMAGI AGENTS.md 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 2d 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.

AGENTS.md · 28 lines

How it starts

The opening of the file, as written. The whole thing — 28 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guidelines

Project Structure & Module Organization

src/main/ contains Electron main-process code and IPC handlers, src/preload/ exposes the bridge API, and src/renderer/ holds the Vite + React UI (pages/, components/, styles/, assets/). Core replay parsing, stats, and import logic live in top-level src/ modules plus src/pipeline/. Tests live in tests/*.test.ts. Static marketing assets are under site/, screenshots under screenshots/, and character art in CharacterCards/.

Build, Test, and Development Commands

Use Node.js 18+ and install with npm install.

  • npm run dev starts the Vite renderer, compiles main/preload TS, and launches Electron.
  • npm run build creates a packaged app in release/; use build:win, build:mac, or build:linux for platform-specific builds.
  • npm test runs the Vitest suite once; npm run test:watch keeps tests running during development.
  • npm run lint checks src/ with ESLint; npm run lint:fix applies safe fixes.
  • npm run format and npm run format:check run Prettier on src/**/*.{ts,tsx}.

Create key.env from .env.example when working with AI features or packaging.

Coding Style & Naming Conventions

TypeScript is strict and React uses function components. Follow Prettier defaults in this repo: 2-space indentation, semicolons, double quotes, trailing commas, and printWidth: 120. Use PascalCase for React components and page files (Dashboard.tsx), camelCase for utilities (playerSummary.ts), and keep test files in name.test.ts form. Prefer small modules near their owning layer instead of cross-cutting helpers.

Testing Guidelines

Vitest looks for tests/**/*.test.ts with global APIs enabled. Add or update tests when changing parsing, importer, DB, config, or pipeline behavior. There is no enforced coverage threshold, so contributors should cover new branches and regression-prone paths explicitly. Run npm test before opening a PR.

Commit & Pull Request Guidelines

Recent history uses short imperative subjects such as Fix Dolphin playback... and Update landing page.... Keep commit messages concise, capitalized, and focused on one change. PRs should include a clear summary, testing notes, linked issues when relevant, and screenshots/GIFs for UI changes in src/renderer/ or site/.

Read the full file on GitHub · 28 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. 2d ago First seen · 28 lines · 599 tokens per session scan A 86bb6d6f6b99

Subscribe to this mod's changes

TheMAGI AGENTS.md is an instructions file published in the GitHub repository Bloodshed-Rain/TheMAGI (8 stars, last pushed 11d ago), licensed MIT. It adds 599 tokens to every session, about $0.0030 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 instructions, from other repositories